Gnus development mailing list
 help / color / mirror / Atom feed
* Suggestion: add a gnus-user-agent.
@ 1999-07-13  0:39 Rob Browning
  1999-07-13  1:27 ` Peter von der Ahé
  0 siblings, 1 reply; 2+ messages in thread
From: Rob Browning @ 1999-07-13  0:39 UTC (permalink / raw)



I was having trouble with C-x m and other "normal ways" of starting a
message not respecting my gnus setup (Gcc's, etc).  I found after some
poking around that I could get nearly everything to work right, using
the same outgoing mail environment that I'd normally get if I ran gnus
and then hit "m" if I just created a "gnus-user-agent" and set
mail-user-agent to point to that.

I'm not sure if (some modification of) this would be appropriate for
inclusion into gnus, but it definitely makes me happier, and at the
very least, I figure someone else might like it.  The only package I
know of that doesn't cooperate with this right now is my version of
bbdb, but the docs say that this is a known problem of this version of
bbdb not respecting mail-user-agent.  Fixing it is on the TODO list.

As far as I know, this hasn't caused me any problems, but YMMV.

(define-mail-user-agent 'gnus-user-agent
  'gnus-mail 'message-send-and-exit
  'message-kill-buffer 'message-send-hook)

(defun gnus-mail (&rest args)
  "Start editing a mail message to be sent gnus style.
Use message mode as the underlying agent."
  (unless (and (fboundp 'gnus-alive-p) (gnus-alive-p))
    (gnus-no-server)
    (gnus-group-suspend))
  (gnus-setup-message 'message (apply 'message-mail args)))

(setq mail-user-agent 'gnus-user-agent)

-- 
Rob Browning <rlb@cs.utexas.edu> PGP=E80E0D04F521A094 532B97F5D64E3930


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

* Re: Suggestion: add a gnus-user-agent.
  1999-07-13  0:39 Suggestion: add a gnus-user-agent Rob Browning
@ 1999-07-13  1:27 ` Peter von der Ahé
  0 siblings, 0 replies; 2+ messages in thread
From: Peter von der Ahé @ 1999-07-13  1:27 UTC (permalink / raw)


This is a great idea!

Just what I have been looking for.

I normally I have two Emacsen running, one for Gnus and one for
everything else (not much :-).  Therefore I had to make a few
adjustments:

(defun gnus-mail (&rest args)
  "Start editing a mail message to be sent gnus style.
Use message mode as the underlying agent."
  (unless (and (fboundp 'gnus-alive-p) (gnus-alive-p))
    (let
	((gnus-inhibit-startup-message t)
	 (nnml-get-new-mail nil)
	 (nnmail-spool-file nil)
	 (mail-sources nil))
      (gnus-no-server 0 t)
      (gnus-group-suspend)))
  (gnus-setup-message 'message (apply 'message-mail args)))

Then the function seems to work even if Gnus is running in another
Emacs (if I don't define nnml-get-new-mail, nnmail-spool-file, or
mail-sources in .gnus.el).

Cheers,
Peter


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

end of thread, other threads:[~1999-07-13  1:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-07-13  0:39 Suggestion: add a gnus-user-agent Rob Browning
1999-07-13  1:27 ` Peter von der Ahé

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