From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.user/440 Path: news.gmane.org!not-for-mail From: Paul Moore Newsgroups: gmane.emacs.gnus.user Subject: Re: Mail in agent mode Date: 12 May 2002 21:36:37 +0100 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1138667413 6918 80.91.229.2 (31 Jan 2006 00:30:13 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 31 Jan 2006 00:30:13 +0000 (UTC) Original-X-From: nobody Tue Jan 17 17:27:35 2006 Original-Path: quimby.gnus.org!lackawana.kippona.com!newsfeed.media.kyoto-u.ac.jp!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!kibo.news.demon.net!news.demon.co.uk!demon!morpheus.demon.co.uk!not-for-mail Original-Newsgroups: gnu.emacs.gnus Original-Sender: Gustav@MORPHEUS Original-NNTP-Posting-Host: morpheus.demon.co.uk X-NNTP-Posting-Host: morpheus.demon.co.uk:158.152.8.30 Original-X-Trace: news.demon.co.uk 1021235791 nnrp-01:13534 NO-IDENT morpheus.demon.co.uk:158.152.8.30 Original-X-Complaints-To: abuse@demon.net User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Common Lisp (Windows [1])) Original-Xref: bridgekeeper.physik.uni-ulm.de gnus-emacs-gnus:580 Original-Lines: 59 X-Gnus-Article-Number: 580 Tue Jan 17 17:27:35 2006 Xref: news.gmane.org gmane.emacs.gnus.user:440 Archived-At: Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes: > Editing the file and having Gnus reread it is tantamount to changing > the source code of the program while it is running. > > When was the last time you frobbed the C source of a program while it > was running? More recently than you might think... Oh, you mean "and it worked" :-) > Of course, one should aim at making these problems occur less often. > In particular, the gnus-agentize thing appears to be dangerous. So > what do we do? Maybe there is a hook that Gnus runs at startup > after reading ~/.gnus? Then we could recommend people to say > (add-hook 'gnus-FOO-hook 'gnus-agentize) and then it wouldn't matter > what was the order of that add-hook statement and setting > message-send-mail-function. Could you try this? There isn't such a hook at the moment. Looking at the code, it should be easy enough to add. The following patch should work: --- gnus-start.el.orig Thu Feb 08 09:57:16 2001 +++ gnus-start.el Sun May 12 21:25:16 2002 @@ -348,6 +348,11 @@ :group 'gnus-start :type 'hook) +(defcustom gnus-after-init-files-hook nil + "A hook called after the user initialisation files have been loaded." + :group 'gnus-start + :type 'hook) + (defcustom gnus-started-hook nil "A hook called as the last thing after startup." :group 'gnus-start @@ -675,6 +680,7 @@ (nnheader-init-server-buffer) (setq gnus-slave slave) (gnus-read-init-file) + (gnus-run-hooks 'gnus-after-init-files-hook) (when gnus-simple-splash (setq gnus-simple-splash nil) I'll try it when I exit & restart Gnus :-) > Another idea would be to introduce a user option and to have Gnus > check for this user option on startup. > > Thoughts? The hook sounds better (even though it does require the user to write his .gnus.el in a certain way). I'll report back on results... [Later...] Yes, that seems to work. Good idea... Paul.