Gnus development mailing list
 help / color / mirror / Atom feed
* getting bbdb to use gnus/gcc
@ 2000-08-19 23:27 G. Todd
  2000-08-20 21:17 ` Kai Großjohann
  0 siblings, 1 reply; 2+ messages in thread
From: G. Todd @ 2000-08-19 23:27 UTC (permalink / raw)



Digging through my .emacs and .gnus rat's nests I found a function I'd
snarfed off the net (see below). It starts gnus whenever message mode
is invoked so that various functions and settings get used and gcc:
headers get inserted. It mostly works but I notice that bbdb doesn't
seem to work correctly with gnus when I use the *m or m commands on a
bbdb buffer. Setting bbdb-send-mail-style to 'message ensures that
message gets used to send the mail

It's not possible to set bbdb-send-mail-style to a self defined
function so asking bbdd to use (send-mail) results in an error.

Has anyone figured out how to get bbdb to use gnus more fully to send
mail?

Gnus v5.8.7
BBDB version 2.00.06

---- snip -----
;; From Thorsten Hilbrich <Torsten.Hilbrich@somewhere>
;; uses gnus to file mail (doesn't work with bbdb though)
(defvar started-gnus-by-send-mail nil
   "Non-nil means that gnus has been invoked by send-mail and can be
closed after sending the mail message.")

(defun send-mail ()
   "Start Gnus if not already present and ensure that it is closed after sending."
  (interactive)
  (if (and (functionp 'gnus-alive-p)
           (gnus-alive-p))
      (setq started-gnus-by-send-mail nil)
    (setq started-gnus-by-send-mail t)
    (add-hook 'bbdb-define-all-aliases 'message-sent-hook 'check-message-and-exit-gnus)
    (gnus-no-server))
  (gnus-group-mail))

(defun check-message-and-exit-gnus ()
   "Closes gnus without any user interaction if it has been invoked by
send-mail."
  (if started-gnus-by-send-mail
      (progn
        (let ((gnus-interactive-exit nil))
          (gnus-group-exit))
        (setq started-gnus-by-send-mail nil)
        (remove-hook 'bbdb-define-all-aliases 'message-sent-hook 'check-message-and-exit-gnus)
        )))
---- snip -----


-- 
G. Todd



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

* Re: getting bbdb to use gnus/gcc
  2000-08-19 23:27 getting bbdb to use gnus/gcc G. Todd
@ 2000-08-20 21:17 ` Kai Großjohann
  0 siblings, 0 replies; 2+ messages in thread
From: Kai Großjohann @ 2000-08-20 21:17 UTC (permalink / raw)
  Cc: ding

On 19 Aug 2000, G. Todd wrote:

> It's not possible to set bbdb-send-mail-style to a self defined
> function so asking bbdd to use (send-mail) results in an error.
> 
> Has anyone figured out how to get bbdb to use gnus more fully to
> send mail?

What you want to do is to create a new user-mail-agent.  I have
discussed with the BBDB maintainers about modifying the code such that
compose-mail is used to compose a message (and thus the
user-mail-agent setting is honored).  I'm not sure about the result,
though.  Maybe you would like to take that up on the BBDB mailing
list.

The archive of this list (the Gnus mailing list) should have something
if you search for `define-mail-user-agent' and `gnus-user-agent'.

kai
-- 
I like BOTH kinds of music.



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

end of thread, other threads:[~2000-08-20 21:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-08-19 23:27 getting bbdb to use gnus/gcc G. Todd
2000-08-20 21:17 ` Kai Großjohann

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