From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/76785 Path: news.gmane.org!not-for-mail From: Antoine Levitt Newsgroups: gmane.emacs.bbdb.user,gmane.emacs.gnus.general Subject: Re: gnus-article-prepare-hook and friends Date: Tue, 15 Feb 2011 12:31:51 +0100 Message-ID: <87aahx7cuw.fsf@gmail.com> References: <87mxlymtuh.fsf@gmail.com> <87aahy2x05.fsf@gnus.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1297769603 27709 80.91.229.12 (15 Feb 2011 11:33:23 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 15 Feb 2011 11:33:23 +0000 (UTC) Cc: ding@gnus.org To: bbdb-info@lists.sourceforge.net Original-X-From: bbdb-info-bounces@lists.sourceforge.net Tue Feb 15 12:33:18 2011 Return-path: Envelope-to: bbdb-user@m.gmane.org Original-Received: from lists.sourceforge.net ([216.34.181.88]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PpJ9h-0003UY-PW for bbdb-user@m.gmane.org; Tue, 15 Feb 2011 12:33:18 +0100 Original-Received: from localhost ([127.0.0.1] helo=sfs-ml-3.v29.ch3.sourceforge.com) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.74) (envelope-from ) id 1PpJ8r-00034Z-2r; Tue, 15 Feb 2011 11:32:25 +0000 Original-Received: from sog-mx-2.v43.ch3.sourceforge.com ([172.29.43.192] helo=mx.sourceforge.net) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.74) (envelope-from ) id 1PpJ8q-00034Q-By for bbdb-info@lists.sourceforge.net; Tue, 15 Feb 2011 11:32:24 +0000 Received-SPF: pass (sog-mx-2.v43.ch3.sourceforge.com: domain of m.gmane.org designates 80.91.229.12 as permitted sender) client-ip=80.91.229.12; envelope-from=bbdb-user@m.gmane.org; helo=lo.gmane.org; Original-Received: from lo.gmane.org ([80.91.229.12]) by sog-mx-2.v43.ch3.sourceforge.com with esmtp (Exim 4.74) id 1PpJ8m-0001Xw-Ey for bbdb-info@lists.sourceforge.net; Tue, 15 Feb 2011 11:32:24 +0000 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PpJ8a-0002pD-5q for bbdb-info@lists.sourceforge.net; Tue, 15 Feb 2011 12:32:08 +0100 Original-Received: from portable40.ceremade.dauphine.fr ([193.48.71.40]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 15 Feb 2011 12:32:08 +0100 Original-Received: from antoine.levitt by portable40.ceremade.dauphine.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 15 Feb 2011 12:32:08 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 41 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: portable40.ceremade.dauphine.fr User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:7rymIHPjynY5nzrYXDwOfhmK28Y= X-Spam-Score: -0.9 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain 0.0 FREEMAIL_FROM Sender email is freemail (antoine.levitt[at]gmail.com) -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.0 DKIM_ADSP_CUSTOM_MED No valid author signature, adsp_override is CUSTOM_MED -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -0.0 SPF_PASS SPF: sender matches SPF record 1.2 NML_ADSP_CUSTOM_MED ADSP custom_med hit, and not from a mailing list 0.0 T_TO_NO_BRKTS_FREEMAIL T_TO_NO_BRKTS_FREEMAIL -0.6 AWL AWL: From: address is in the auto white-list X-Headers-End: 1PpJ8m-0001Xw-Ey X-BeenThere: bbdb-info@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: "Bugs, help, discussion about BBDB" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bbdb-info-bounces@lists.sourceforge.net Xref: news.gmane.org gmane.emacs.bbdb.user:2493 gmane.emacs.gnus.general:76785 Archived-At: 14/02/11 21:15, Lars Ingebrigtsen > Antoine Levitt writes: > >> The code is called from gnus-article-prepare-hook. There doesn't seem to >> be any other hook available where the article would be pretty enough for >> bbdb to do its stuff. Old manuals ( for instance >> http://www.chemie.fu-berlin.de/chemnet/use/info/gnus/gnus_6.html ) >> referred to gnus-article-display-hook, what happened to it? What hook >> should BBDB call to get the final view of an article? > > There's `gnus-part-display-hook', which might be the right place to do > this, although I'm not quite sure... Nope, same bug. The following certainly does the trick, and looks like a more reasonable place for gnus-article-prepare-hook (docstring says "after an article has been prepared in the article buffer.") However, I'm not sure whether or not it breaks other code that depends on its behaviour. diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 3e16308..77bea9b 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -4636,6 +4636,7 @@ If ALL-HEADERS is non-nil, no headers are hidden." (forward-line -1)) (set-window-point (get-buffer-window (current-buffer)) (point)) (gnus-configure-windows 'article) + (gnus-run-hooks 'gnus-article-prepare-hook) t)))))) ;;;###autoload @@ -4654,7 +4655,7 @@ If ALL-HEADERS is non-nil, no headers are hidden." (gnus-run-hooks 'gnus-tmp-internal-hook) (when gnus-display-mime-function (funcall gnus-display-mime-function)) - (gnus-run-hooks 'gnus-article-prepare-hook))) + )) ;;; ;;; Gnus Sticky Article Mode ------------------------------------------------------------------------------ The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb _______________________________________________ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/