Gnus development mailing list
 help / color / mirror / Atom feed
* gnus-article-prepare-hook and friends
@ 2011-02-14 17:03 Antoine Levitt
  2011-02-14 20:15 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: Antoine Levitt @ 2011-02-14 17:03 UTC (permalink / raw)
  To: ding, bbdb-info

Hi,

On name mismatches, with bbdb-accept-name-mismatch set to nil, BBDB
prompts whether the user wants to change the name of the contact. But
point is then at the end of the buffer, which is not that convenient for
reviewing the message.

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?

Antoine



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

* Re: gnus-article-prepare-hook and friends
  2011-02-14 17:03 gnus-article-prepare-hook and friends Antoine Levitt
@ 2011-02-14 20:15 ` Lars Ingebrigtsen
  2011-02-15 11:31   ` Antoine Levitt
  0 siblings, 1 reply; 4+ messages in thread
From: Lars Ingebrigtsen @ 2011-02-14 20:15 UTC (permalink / raw)
  To: bbdb-info; +Cc: ding

Antoine Levitt <antoine.levitt@gmail.com> 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...

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen


------------------------------------------------------------------------------
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/


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

* Re: gnus-article-prepare-hook and friends
  2011-02-14 20:15 ` Lars Ingebrigtsen
@ 2011-02-15 11:31   ` Antoine Levitt
  2011-02-18 23:18     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: Antoine Levitt @ 2011-02-15 11:31 UTC (permalink / raw)
  To: bbdb-info; +Cc: ding

14/02/11 21:15, Lars Ingebrigtsen
> Antoine Levitt <antoine.levitt@gmail.com> 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/


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

* Re: gnus-article-prepare-hook and friends
  2011-02-15 11:31   ` Antoine Levitt
@ 2011-02-18 23:18     ` Lars Ingebrigtsen
  0 siblings, 0 replies; 4+ messages in thread
From: Lars Ingebrigtsen @ 2011-02-18 23:18 UTC (permalink / raw)
  To: bbdb-info; +Cc: ding

Antoine Levitt <antoine.levitt@gmail.com> writes:

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

Thanks; applied.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen


------------------------------------------------------------------------------
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/


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

end of thread, other threads:[~2011-02-18 23:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-14 17:03 gnus-article-prepare-hook and friends Antoine Levitt
2011-02-14 20:15 ` Lars Ingebrigtsen
2011-02-15 11:31   ` Antoine Levitt
2011-02-18 23:18     ` Lars Ingebrigtsen

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