Gnus development mailing list
 help / color / mirror / Atom feed
From: "Davide G.M.Salvetti" <salve@debian.org>
Cc: Ding <ding@hpc.uh.edu>
Subject: Re: Sending outgoing messages while unplugged.
Date: Tue, 16 Jul 2002 17:18:11 +0200	[thread overview]
Message-ID: <87lm8bzop8.fsf@hal.Olympus.INVALID> (raw)
In-Reply-To: <vafn0srpxo0.fsf@INBOX.auto.gnus.tok.lucy.cs.uni-dortmund.de> (Kai.Grossjohann@CS.Uni-Dortmund.DE's message of "Tue, 16 Jul 2002 16:14:39 +0200")

>>>>> "Kai" == Kai Großjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> writes:

Kai> Invoking the Agent installs gnus-agent-send-mail as the value of
Kai> message-send-mail-function, I think.  I think that setting it back
Kai> to message-send-mail-with-sendmail (or whatever) ought to do the
Kai> trick.

Thank you very much Kai, you got me started.

Kai> But newer Oorts have another mechanism of enabling the Agent (not
Kai> gnus-agentize), so I'm not sure how to set
Kai> message-send-mail-function after this happens.  Anyone?

I see Oort bind message-send-mail-real-function to
gnus-agent-send-mail.

One may bind it back to nil, letting message use
message-send-mail-function instead.  I haven't followed this route,
though.

A quick inspection of gnus-agent-send-mail showed to me that the
simplest thing appears to be redefining it this way

(defun gnus-agent-send-mail ()
  (funcall gnus-agent-send-mail-function))

after gnus has been loaded (one may put the previous defun near the end
of her ~/.gnus).

I think that this behavior should be configurable.  A quick (untested!)
patch may be the following one.

<======================================================================>
*** /tmp/gnus-agent.el5768cWt	Tue Jul 16 17:16:30 2002
--- /tmp/gnus-agent.el5768pgz	Tue Jul 16 17:16:30 2002
***************
*** 82,87 ****
--- 82,92 ----
    :group 'gnus-agent
    :type 'hook)
  
+ (defcustom gnus-agent-send-mail-while-unplugged nil
+   "If non-nil, Gnus will always send outgoing mail immediately.
+ In other words, if non-nil Gnus will not queue your outgoing mail while
+ unplugged, but will call message-send-mail-function immediately.")
+ 
  ;; Extracted from gnus-xmas-redefine in order to preserve user settings
  (when (featurep 'xemacs)
    (add-hook 'gnus-agent-group-mode-hook 'gnus-xmas-agent-group-menu-add))
***************
*** 431,437 ****
       "nndraft:queue" 'gnus-dummy '((gnus-draft-mode)))))
  
  (defun gnus-agent-send-mail ()
!   (if gnus-plugged
        (funcall gnus-agent-send-mail-function)
      (goto-char (point-min))
      (re-search-forward
--- 436,442 ----
       "nndraft:queue" 'gnus-dummy '((gnus-draft-mode)))))
  
  (defun gnus-agent-send-mail ()
!   (if (or gnus-agent-send-mail-while-unplugged gnus-plugged)
        (funcall gnus-agent-send-mail-function)
      (goto-char (point-min))
      (re-search-forward
<======================================================================>

(The doc string should really be rewritten.)

-- 
Salve, | GNU PG (GPG) Key ID: 9396865D
Davide | <http://www.linux.it/~salve/>



      reply	other threads:[~2002-07-16 15:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-16 12:11 Davide G.M.Salvetti
2002-07-16 14:14 ` Kai Großjohann
2002-07-16 15:18   ` Davide G.M.Salvetti [this message]

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=87lm8bzop8.fsf@hal.Olympus.INVALID \
    --to=salve@debian.org \
    --cc=ding@hpc.uh.edu \
    /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).