From: Matthieu Moy <matthieumNOSPAM@yahoo.com.invalid>
Subject: [BBDB] Message shown when adding someone to database (a solution)
Date: Thu, 17 Jan 2002 12:18:29 +0100 [thread overview]
Message-ID: <vpqr8opusxm.fsf@ubaye.imag.fr> (raw)
I found it boring to have to answer to the question "XXX is not in the
db, add ?" while the message is narrowed to headers only.
There is a slight modification to do in bbdb-gnus.el for that :
I think this should be the default behaviour of the next version ...
(defun bbdb/gnus-update-record (&optional offer-to-create)
"returns the record corresponding to the current GNUS message, creating
or modifying it as necessary. A record will be created if
bbdb/news-auto-create-p is non-nil, or if OFFER-TO-CREATE is true and
the user confirms the creation."
(set-buffer gnus-article-buffer)
(save-restriction
(widen)
;;(gnus-article-show-all-headers)
(narrow-to-region (point-min)
(progn (goto-char (point-min))
(if (search-forward "\n\n" nil 'force)
(- (point) 2)
(point))))
(let ((from (mail-fetch-field "from"))
name net)
(if (or (null from)
(string-match (bbdb-user-mail-names)
(mail-strip-quoted-names from)))
;; if logged-in user sent this, use recipients.
(setq from (or (mail-fetch-field "to") from)))
(widen) ; <---------------------- This line should be added **
; (line 67)
(if from
(bbdb-annotate-message-sender from t
(or (bbdb-invoke-hook-for-value
bbdb/news-auto-create-p)
offer-to-create)
(or (bbdb-invoke-hook-for-value
bbdb/prompt-for-create-p)
offer-to-create))))))
--
Matthieu
reply other threads:[~2002-01-17 11:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=vpqr8opusxm.fsf@ubaye.imag.fr \
--to=matthieumnospam@yahoo.com.invalid \
/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).