Article View: gnu.emacs.vm.bug
Article #8970Re: hooks
From: Jamie Zawinski
Date: Wed, 08 Jul 1992 21:29
Date: Wed, 08 Jul 1992 21:29
38 lines
2459 bytes
2459 bytes
In message <9207082116.AA02044@wendy-fate.UU.NET> Kyle Jones wrote: > > > vm-preview-message-hook Called when a message is first displayed if > > you have previewing enabled. > > What would hook functions expect the operating environment to be? > Current buffer, clipping region, etc. This question applies to > all of these hooks. I think the obvious thing would be that the current buffer is the folder buffer, and the clipping region is the message as it is about to be displayed. This would generally mean that the hidden headers aren't visible, and in the case of previewing, most of the body isn't visible either. But it doesn't matter. This is what my patch implemented, but if you want to implement something else, that's fine too. We can adapt. > > vm-show-new-message-hook Called just after vm-show-message-hook when > > the message being selected is new (has just > > been incorperated into the folder.) > > Why _after_ vm-show-message-hook? My first impression would have > been that this hook would be called first, and _perhaps_ > vm-show-message-hook wouldn't be called if this hook were non-nil. Before, after, whichever you like. I do think that both hooks should be run, however, since it seems most likely to me that someone would want to run code whenever any message is selected. It would be unfortunate if, in order to do this, they had to add code to three distinct hook variables. > I will probably resolve the -hook vs. -hooks naming issue by > making VM run hooks under both names. I think that's kind of gross, and you should just rename the existing -hooks variables to -hook (the fact that vm-version contains "beta" gives you all the license you need for this kind of change :-)). Or just call the new ones -hooks. I think running both could be confusing. -- Jamie
Technical Details
Message-ID:
<9207082129.AA01993@thalidomide.lucid>Path:
arc1-ca.pugleaf.net!sparky!uunet!documail!wendy-fate.uu.net!bug-vmReferences:
<9207050920.AA22276@thalidomide.lucid> <9207082116.AA02044@wendy-fate.UU.NET>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f6829,58e2dd845b76f6d1 X-Google-Attributes: gidf6829,public X-Google-ArrivalTime: 1992-07-08 00:22:48 PST Newsgroups: gnu.emacs.vm.bug Sender: bug-vm-request@uunet.uu.net Date: Wed, 8 Jul 92 14:29:10 PDT Message-ID: <9207082129.AA01993@thalidomide.lucid> X-Windows: It could be worse, but it'll take time. From: Jamie Zawinski <jwz@lucid.com> Subject: Re: hooks References: <9207050920.AA22276@thalidomide.lucid> <9207082116.AA02044@wendy-fate.UU.NET> Path: arc1-ca.pugleaf.net!sparky!uunet!documail!wendy-fate.uu.net!bug-vm Lines: 38