From: Paul Moore <gustav@morpheus.demon.co.uk>
Subject: Re: Mail in agent mode
Date: 12 May 2002 21:36:37 +0100 [thread overview]
Message-ID: <g00x5cvm.fsf@morpheus.demon.co.uk> (raw)
In-Reply-To: <vafznz5jt5o.fsf@lucy.cs.uni-dortmund.de>
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.
parent reply other threads:[~2002-05-12 20:36 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <vafznz5jt5o.fsf@lucy.cs.uni-dortmund.de>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=g00x5cvm.fsf@morpheus.demon.co.uk \
--to=gustav@morpheus.demon.co.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).