Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* Re: Mail in agent mode
       [not found]     ` <vafznz5jt5o.fsf@lucy.cs.uni-dortmund.de>
@ 2002-05-12 20:36       ` Paul Moore
  0 siblings, 0 replies; only message in thread
From: Paul Moore @ 2002-05-12 20:36 UTC (permalink / raw)


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.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-05-12 20:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <vg9umlbt.fsf@morpheus.demon.co.uk>
     [not found] ` <m38z6qp1jl.fsf@multivac.cwru.edu>
     [not found]   ` <heldfqno.fsf@morpheus.demon.co.uk>
     [not found]     ` <vafznz5jt5o.fsf@lucy.cs.uni-dortmund.de>
2002-05-12 20:36       ` Mail in agent mode Paul Moore

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).