Gnus development mailing list
 help / color / mirror / Atom feed
From: "G. Todd" <gtodd@yorku.ca>
Subject: getting bbdb to use gnus/gcc
Date: 19 Aug 2000 19:27:48 -0400	[thread overview]
Message-ID: <m3aee8j0nm.fsf@ninga.ellerbeck.org> (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



             reply	other threads:[~2000-08-19 23:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-08-19 23:27 G. Todd [this message]
2000-08-20 21:17 ` Kai Großjohann

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=m3aee8j0nm.fsf@ninga.ellerbeck.org \
    --to=gtodd@yorku.ca \
    /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).