Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* "You should byte-compile Gnus" ?
@ 2008-02-25  3:50 William Xu
  2008-02-25  6:49 ` Bastien
  0 siblings, 1 reply; 19+ messages in thread
From: William Xu @ 2008-02-25  3:50 UTC (permalink / raw)
  To: info-gnus-english

Whenever i start gnus, it welcomes me with "You should byte-compile
Gnus". I looked into "/Users/william/share/emacs/22.1.91/lisp/gnus"
(emacs-version is 22.1.91.2): 

,----
| zen:~/share/emacs/22.1.91/lisp/gnus$ ls *.elc | wc -l
|      135
| zen:~/share/emacs/22.1.91/lisp/gnus$ ls *.el.gz | wc -l
|      135
| zen:~/share/emacs/22.1.91/lisp/gnus$ 
`----

Why it still annoy me ?

-- 
William

http://williamxu.net9.org

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: "You should byte-compile Gnus" ?
  2008-02-25  3:50 "You should byte-compile Gnus" ? William Xu
@ 2008-02-25  6:49 ` Bastien
  2008-02-25  6:58   ` William Xu
  0 siblings, 1 reply; 19+ messages in thread
From: Bastien @ 2008-02-25  6:49 UTC (permalink / raw)
  To: William Xu; +Cc: info-gnus-english

William Xu <william.xwl@gmail.com> writes:

> Whenever i start gnus, it welcomes me with "You should byte-compile
> Gnus". I looked into "/Users/william/share/emacs/22.1.91/lisp/gnus"
> (emacs-version is 22.1.91.2): 
>
> ,----
> | zen:~/share/emacs/22.1.91/lisp/gnus$ ls *.elc | wc -l
> |      135
> | zen:~/share/emacs/22.1.91/lisp/gnus$ ls *.el.gz | wc -l
> |      135
> | zen:~/share/emacs/22.1.91/lisp/gnus$ 
> `----
>
> Why it still annoy me ?

You sure your .el files are not more recent than your .elc files?

-- 
Bastien

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: "You should byte-compile Gnus" ?
  2008-02-25  6:49 ` Bastien
@ 2008-02-25  6:58   ` William Xu
  2008-02-25  7:07     ` Bastien
  0 siblings, 1 reply; 19+ messages in thread
From: William Xu @ 2008-02-25  6:58 UTC (permalink / raw)
  To: info-gnus-english

Bastien <bzg@altern.org> writes:

> You sure your .el files are not more recent than your .elc files?

Yes(or No? naughty English...).  All .elc files are more recent.

-- 
William

http://williamxu.net9.org

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: "You should byte-compile Gnus" ?
  2008-02-25  6:58   ` William Xu
@ 2008-02-25  7:07     ` Bastien
  2008-02-25  7:35       ` William Xu
  0 siblings, 1 reply; 19+ messages in thread
From: Bastien @ 2008-02-25  7:07 UTC (permalink / raw)
  To: William Xu; +Cc: info-gnus-english

William Xu <william.xwl@gmail.com> writes:

> Bastien <bzg@altern.org> writes:
>
>> You sure your .el files are not more recent than your .elc files?
>
> Yes(or No? naughty English...).  All .elc files are more recent.

The function where this warning lives is `gnus' in gnus.el:

,----
| (defun gnus (&optional arg dont-connect slave)
|   "Read network news.
| If ARG is non-nil and a positive number, Gnus will use that as the
| startup level.  If ARG is non-nil and not a positive number, Gnus will
| prompt the user for the name of an NNTP server to use."
|   (interactive "P")
|   (unless (byte-code-function-p (symbol-function 'gnus))
|     (message "You should byte-compile Gnus")
|     (sit-for 2))
|   (gnus-1 arg dont-connect slave))
`----

So it looks like either your gnus.el is not byte-compiled or there is
another one lingering somewhere on your system.

-- 
Bastien

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: "You should byte-compile Gnus" ?
  2008-02-25  7:07     ` Bastien
@ 2008-02-25  7:35       ` William Xu
  2008-02-25  7:48         ` Charles philip Chan
  0 siblings, 1 reply; 19+ messages in thread
From: William Xu @ 2008-02-25  7:35 UTC (permalink / raw)
  To: info-gnus-english

Bastien <bzg@altern.org> writes:

> The function where this warning lives is `gnus' in gnus.el:
>
> ,----
> | (defun gnus (&optional arg dont-connect slave)
> |   "Read network news.
> | If ARG is non-nil and a positive number, Gnus will use that as the
> | startup level.  If ARG is non-nil and not a positive number, Gnus will
> | prompt the user for the name of an NNTP server to use."
> |   (interactive "P")
> |   (unless (byte-code-function-p (symbol-function 'gnus))
> |     (message "You should byte-compile Gnus")
> |     (sit-for 2))
> |   (gnus-1 arg dont-connect slave))
> `----
>
> So it looks like either your gnus.el is not byte-compiled or there is
> another one lingering somewhere on your system.

Ooh, it is complaining about the .gnus? My gnus config file is in
xwl-gnus.el. All my configs are not byte-compiled, and i don't like to,
since at times it confuses me whenever i forgot to recompile after
modifications.

Why does gnus insist on that? How much speed would be gained after
enabling that? 

-- 
William

http://williamxu.net9.org

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: "You should byte-compile Gnus" ?
  2008-02-25  7:35       ` William Xu
@ 2008-02-25  7:48         ` Charles philip Chan
  2008-02-25  9:02           ` William Xu
  0 siblings, 1 reply; 19+ messages in thread
From: Charles philip Chan @ 2008-02-25  7:48 UTC (permalink / raw)
  To: info-gnus-english


[-- Attachment #1.1: Type: text/plain, Size: 458 bytes --]

William Xu <william.xwl@gmail.com> writes:

> Ooh, it is complaining about the .gnus? My gnus config file is in
> xwl-gnus.el. All my configs are not byte-compiled, and i don't like
> to, since at times it confuses me whenever i forgot to recompile after
> modifications.

No, it is not complaining about you gnus config file. Either your el
files are newer then your elc files or you have another copy of gnus.el
somewhere that is being picked up.

Charles

[-- Attachment #1.2: Type: application/pgp-signature, Size: 193 bytes --]

[-- Attachment #2: Type: text/plain, Size: 161 bytes --]

_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
http://lists.gnu.org/mailman/listinfo/info-gnus-english

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: "You should byte-compile Gnus" ?
  2008-02-25  7:48         ` Charles philip Chan
@ 2008-02-25  9:02           ` William Xu
  2008-02-25  9:46             ` Bastien
  0 siblings, 1 reply; 19+ messages in thread
From: William Xu @ 2008-02-25  9:02 UTC (permalink / raw)
  To: info-gnus-english

"Charles philip Chan" <cpchan@sympatico.ca> writes:

> No, it is not complaining about you gnus config file. Either your el
> files are newer then your elc files or you have another copy of gnus.el
> somewhere that is being picked up.

I use `describe-function gnus' for locating gnus.el, it is under: 
"/Users/william/share/emacs/22.1.91/lisp/gnus/":

,----
| zen:~/share/emacs/22.1.91/lisp/gnus$ ls -lthr gnus.el*
| -rw-r--r--  1 william  staff    36K  2  4 18:42 gnus.el.gz
| -rw-r--r--  1 william  staff   155K  2 21 20:02 gnus.elc
| zen:~/share/emacs/22.1.91/lisp/gnus$ 
`----

The elc file is definitely newer than el file.

Actually when i start emacs with `-Q', then start gnus, it won't
complain that. So the problem looks like in my xwl-gnus.el. While, i
byte-compile all my config files, restart, the problem still
exists. What the hell...?
 
-- 
William

http://williamxu.net9.org

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: "You should byte-compile Gnus" ?
  2008-02-25  9:02           ` William Xu
@ 2008-02-25  9:46             ` Bastien
  2008-02-25 10:01               ` William Xu
       [not found]               ` <mailman.7894.1203933733.18990.info-gnus-english@gnu.org>
  0 siblings, 2 replies; 19+ messages in thread
From: Bastien @ 2008-02-25  9:46 UTC (permalink / raw)
  To: William Xu; +Cc: info-gnus-english

William Xu <william.xwl@gmail.com> writes:

> "Charles philip Chan" <cpchan@sympatico.ca> writes:
>
>> No, it is not complaining about you gnus config file. Either your el
>> files are newer then your elc files or you have another copy of gnus.el
>> somewhere that is being picked up.
>
> I use `describe-function gnus' for locating gnus.el, it is under: 
> "/Users/william/share/emacs/22.1.91/lisp/gnus/":
>
> ,----
> | zen:~/share/emacs/22.1.91/lisp/gnus$ ls -lthr gnus.el*
> | -rw-r--r--  1 william  staff    36K  2  4 18:42 gnus.el.gz
> | -rw-r--r--  1 william  staff   155K  2 21 20:02 gnus.elc
> | zen:~/share/emacs/22.1.91/lisp/gnus$ 
> `----
>
> The elc file is definitely newer than el file.
>
> Actually when i start emacs with `-Q', then start gnus, it won't
> complain that. So the problem looks like in my xwl-gnus.el. While, i
> byte-compile all my config files, restart, the problem still
> exists. What the hell...?

Maybe you should compare the location of C-h f gnus RET when running
emacs -Q against its location when you're running a normal emacs
session, with all your config.  

-- 
Bastien

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: "You should byte-compile Gnus" ?
  2008-02-25  9:46             ` Bastien
@ 2008-02-25 10:01               ` William Xu
       [not found]               ` <mailman.7894.1203933733.18990.info-gnus-english@gnu.org>
  1 sibling, 0 replies; 19+ messages in thread
From: William Xu @ 2008-02-25 10:01 UTC (permalink / raw)
  To: info-gnus-english

Bastien <bzg@altern.org> writes:

> Maybe you should compare the location of C-h f gnus RET when running
> emacs -Q against its location when you're running a normal emacs
> session, with all your config.  

Okay, I caught it. It is all because I have defadvice gnus in my config file:

,----
| (defadvice gnus (around switch-or-start)
|   "Start `gnus' or switch to started *Group* buffer."
|   (if (gnus-alive-p)
|       (switch-to-buffer "*Group*")
|     ad-do-it
|     (gnus-demon-init)))
| 
| (ad-deactivate 'gnus)
`----

When I removed the them, everything goes fine. 

I don't quite understand, though. A defadvice will forbid it from being
byte-compiled?
 
-- 
William

http://williamxu.net9.org

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: "You should byte-compile Gnus" ?
       [not found]               ` <mailman.7894.1203933733.18990.info-gnus-english@gnu.org>
@ 2008-02-25 11:10                 ` Katsumi Yamaoka
  2008-02-25 11:21                   ` Katsumi Yamaoka
                                     ` (2 more replies)
  0 siblings, 3 replies; 19+ messages in thread
From: Katsumi Yamaoka @ 2008-02-25 11:10 UTC (permalink / raw)
  To: info-gnus-english

>>>>> William Xu wrote:

> I don't quite understand, though. A defadvice will forbid it from being
> byte-compiled?

The default value of `ad-default-compilation-action' is `maybe'
which means not to compile advised functions if bytecomp.elc is
not loaded.  Though that advice to gnus seems needless now ;-),
there are several ways to force the byte-compilation:

1. Load bytecomp, i.e. (require 'bytecomp), before performing advice.
2. Add the `compile' flag to the arglist of defadvice.  E.g.;
   (defadvice FUNCTION (CLASS NAME ... compile) ...)
3. Set `ad-default-compilation-action' to `always'.

Regards,

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: "You should byte-compile Gnus" ?
  2008-02-25 11:10                 ` Katsumi Yamaoka
@ 2008-02-25 11:21                   ` Katsumi Yamaoka
  2008-02-25 12:31                   ` William Xu
  2008-03-06 17:07                   ` Hallvard B Furuseth
  2 siblings, 0 replies; 19+ messages in thread
From: Katsumi Yamaoka @ 2008-02-25 11:21 UTC (permalink / raw)
  To: info-gnus-english

>>>>> Katsumi Yamaoka wrote:

> Though that advice to gnus seems needless now ;-),

Sorry, I meant `gnus-other-frame'.  (It is useful for finding out
the Gnus frame that is behind the other frames.)

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: "You should byte-compile Gnus" ?
  2008-02-25 11:10                 ` Katsumi Yamaoka
  2008-02-25 11:21                   ` Katsumi Yamaoka
@ 2008-02-25 12:31                   ` William Xu
  2008-03-06 17:07                   ` Hallvard B Furuseth
  2 siblings, 0 replies; 19+ messages in thread
From: William Xu @ 2008-02-25 12:31 UTC (permalink / raw)
  To: info-gnus-english

Katsumi Yamaoka <yamaoka@jpl.org> writes:

> The default value of `ad-default-compilation-action' is `maybe'
> which means not to compile advised functions if bytecomp.elc is
> not loaded.  Though that advice to gnus seems needless now ;-),
> there are several ways to force the byte-compilation:
>
> 1. Load bytecomp, i.e. (require 'bytecomp), before performing advice.
> 2. Add the `compile' flag to the arglist of defadvice.  E.g.;
>    (defadvice FUNCTION (CLASS NAME ... compile) ...)
> 3. Set `ad-default-compilation-action' to `always'.

Thanks for explaining!

As for switching to gnus, I replaced the defadvice with a lambda
function:

,----
| (global-set-key (kbd "<f6>") (lambda ()
|                                (interactive)
|                                (let ((buf (get-buffer "*Group*")))
|                                  (if buf
|                                      (switch-to-buffer buf)
|                                    (call-interactively 'gnus)
|                                    (gnus-demon-init)))))
`----

I dislike frames. Never use any. :P

-- 
William

http://williamxu.net9.org

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: "You should byte-compile Gnus" ?
  2008-02-25 11:10                 ` Katsumi Yamaoka
  2008-02-25 11:21                   ` Katsumi Yamaoka
  2008-02-25 12:31                   ` William Xu
@ 2008-03-06 17:07                   ` Hallvard B Furuseth
  2008-03-06 20:41                     ` Reiner Steib
  2 siblings, 1 reply; 19+ messages in thread
From: Hallvard B Furuseth @ 2008-03-06 17:07 UTC (permalink / raw)
  To: info-gnus-english

Katsumi Yamaoka writes:
> The default value of `ad-default-compilation-action' is `maybe'
> which means not to compile advised functions if bytecomp.elc is
> not loaded.  Though that advice to gnus seems needless now ;-),
> there are several ways to force the byte-compilation:

This looks like a Gnus buglet to me.  I think the reason you should
compile Gnus is that it can be horribly slow uncompiled.  But that is
the gnus _package_, not the gnus _function_.

So the test needs to see past the defadvise.  Something like this, I
guess - though I don't know defadvise so I'm not sure:

(defconst gnus-is-compiled)		;declare constant before use
(defun gnus (...)
  ...
  (unless gnus-is-compiled
    (message "You should byte-compile Gnus")
  ...))
(defconst gnus-is-compiled (byte-code-function-p (symbol-function 'gnus)))

-- 
Hallvard

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: "You should byte-compile Gnus" ?
  2008-03-06 17:07                   ` Hallvard B Furuseth
@ 2008-03-06 20:41                     ` Reiner Steib
  2008-03-07 17:22                       ` Hallvard B Furuseth
  0 siblings, 1 reply; 19+ messages in thread
From: Reiner Steib @ 2008-03-06 20:41 UTC (permalink / raw)
  To: info-gnus-english

On Thu, Mar 06 2008, Hallvard B Furuseth wrote:

> Katsumi Yamaoka writes:
[...]
> I think the reason you should compile Gnus is that it can be
> horribly slow uncompiled.  But that is the gnus _package_, not the
> gnus _function_.

Yes.

> So the test needs to see past the defadvise.  

I think advising `gnus' is rare enough that adding a hint like ...

>> 2. Add the `compile' flag to the arglist of defadvice.  E.g.;
>>    (defadvice FUNCTION (CLASS NAME ... compile) ...)

... in a comment in/near the defun seem sufficient to me.  After all,
it is just message plus a (sit-for 2), not an error.

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: "You should byte-compile Gnus" ?
  2008-03-06 20:41                     ` Reiner Steib
@ 2008-03-07 17:22                       ` Hallvard B Furuseth
  0 siblings, 0 replies; 19+ messages in thread
From: Hallvard B Furuseth @ 2008-03-07 17:22 UTC (permalink / raw)
  To: info-gnus-english

Reiner Steib writes:
> On Thu, Mar 06 2008, Hallvard B Furuseth wrote:
> (...)
>> So the test needs to see past the defadvise.  
>
> I think advising `gnus' is rare enough that adding a hint like ...
>
>>> 2. Add the `compile' flag to the arglist of defadvice.  E.g.;
>>>    (defadvice FUNCTION (CLASS NAME ... compile) ...)
>
> ... in a comment in/near the defun seem sufficient to me.  After all,
> it is just message plus a (sit-for 2), not an error.

I prefer 3 lines of code over 2 lines of otherwise-unneeded comments
myself.

-- 
Hallvard

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: "You should byte-compile Gnus"
  2009-01-02 10:20 ` Reiner Steib
@ 2009-01-03  1:11   ` Joe Fineman
  0 siblings, 0 replies; 19+ messages in thread
From: Joe Fineman @ 2009-01-03  1:11 UTC (permalink / raw)
  To: info-gnus-english

Reiner Steib <reinersteib+gmane@imap.cc> writes:

> Because the function `gnus' isn't byte-compiled.  Check `M-x
>locate-library RET gnus RET' if it picks up the .el or .elc file.

I did look at it, before I posted.  The file is byte-compiled, as is
the function gnus.
-- 
---  Joe Fineman    joe_f@verizon.net

||:  One death is a tragedy; a hundred deaths are a disaster; a  :||
||:  million deaths are a statistic.                             :||

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: "You should byte-compile Gnus"
  2009-01-02  1:47 "You should byte-compile Gnus" Joe Fineman
  2009-01-02 10:01 ` Leo
@ 2009-01-02 10:20 ` Reiner Steib
  2009-01-03  1:11   ` Joe Fineman
  1 sibling, 1 reply; 19+ messages in thread
From: Reiner Steib @ 2009-01-02 10:20 UTC (permalink / raw)
  To: info-gnus-english

On Fri, Jan 02 2009, Joe Fineman wrote:

> I have just installed Gnus 5.10.10 under Emacs 22.3.1.  

The Gnus version bundled with Emacs 22.3 (called Gnus 5.11) basically
is Gnus 5.10.10 plus bugfixes (to be released as Gnus 5.10.12 soon).
So it makes no sense to go back to a buggier versions by installing
Gnus 5.10.10.

> However, there is an oddity.  Whenever I start Gnus, I get a message
> "You should byte-compile Gnus".  It is already byte-compiled AFAICT --
> every .el file in lisp/gnus has its .elc file.  Why am I being told
> this?

Because the function `gnus' isn't byte-compiled.  Check `M-x
locate-library RET gnus RET' if it picks up the .el or .elc file.

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: "You should byte-compile Gnus"
  2009-01-02  1:47 "You should byte-compile Gnus" Joe Fineman
@ 2009-01-02 10:01 ` Leo
  2009-01-02 10:20 ` Reiner Steib
  1 sibling, 0 replies; 19+ messages in thread
From: Leo @ 2009-01-02 10:01 UTC (permalink / raw)
  To: info-gnus-english

On 2009-01-02 01:47 +0000, Joe Fineman wrote:
> However, there is an oddity.  Whenever I start Gnus, I get a message
> "You should byte-compile Gnus".  It is already byte-compiled AFAICT --
> every .el file in lisp/gnus has its .elc file.  Why am I being told
> this?

This is to tell users to compile gnus to speed it up. However, I can
confirm it is not robust i.e. if you eval-defun `gnus', you will get
this message.

-- 
.:  Leo  :.  [ sdl.web AT gmail.com ]  .: I use Emacs :.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* "You should byte-compile Gnus"
@ 2009-01-02  1:47 Joe Fineman
  2009-01-02 10:01 ` Leo
  2009-01-02 10:20 ` Reiner Steib
  0 siblings, 2 replies; 19+ messages in thread
From: Joe Fineman @ 2009-01-02  1:47 UTC (permalink / raw)
  To: info-gnus-english

I have just installed Gnus 5.10.10 under Emacs 22.3.1.  It has gotten
rid of a number of annoyances, including especially the problem in
reading certain groups at Mozzarella, which I described some time ago.

However, there is an oddity.  Whenever I start Gnus, I get a message
"You should byte-compile Gnus".  It is already byte-compiled AFAICT --
every .el file in lisp/gnus has its .elc file.  Why am I being told
this?
-- 
---  Joe Fineman    joe_f@verizon.net

||:  Gray hairs are the only object of respect that cannot excite  :||
||:  envy.                                                         :||

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2009-01-03  1:11 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-25  3:50 "You should byte-compile Gnus" ? William Xu
2008-02-25  6:49 ` Bastien
2008-02-25  6:58   ` William Xu
2008-02-25  7:07     ` Bastien
2008-02-25  7:35       ` William Xu
2008-02-25  7:48         ` Charles philip Chan
2008-02-25  9:02           ` William Xu
2008-02-25  9:46             ` Bastien
2008-02-25 10:01               ` William Xu
     [not found]               ` <mailman.7894.1203933733.18990.info-gnus-english@gnu.org>
2008-02-25 11:10                 ` Katsumi Yamaoka
2008-02-25 11:21                   ` Katsumi Yamaoka
2008-02-25 12:31                   ` William Xu
2008-03-06 17:07                   ` Hallvard B Furuseth
2008-03-06 20:41                     ` Reiner Steib
2008-03-07 17:22                       ` Hallvard B Furuseth
2009-01-02  1:47 "You should byte-compile Gnus" Joe Fineman
2009-01-02 10:01 ` Leo
2009-01-02 10:20 ` Reiner Steib
2009-01-03  1:11   ` Joe Fineman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).