Article View: gnu.emacs.vm.bug
Article #8777Re: vm-reply-include-text not working/vm-5.33/emacs-19.16
From: Barry A. Warsaw
Date: Tue, 13 Jul 1993 20:45
Date: Tue, 13 Jul 1993 20:45
69 lines
3831 bytes
3831 bytes
>>>>> "PS" == Paul Smith
>>>>> "kj" == Kyle Jones
kj> After the trouble we went through to get mail-yank-hooks
kj> standardized, if VM went off and started using another
kj> variable Barry Warsaw would kill me. :-)
PS> Actually, he wouldn't :)
Paul's right, I'd never do *that*. But I might not invite you to any
more gigs (just kidding Kyle :-).
PS> FSF Emacs 19 has introduced a new hook, called
PS> mail-citation-hook, which is supposed to be used exclusively
PS> for mail citation packages.
I guess you didn't get the mail that RMS and I exchanged about this.
Sorry about that Kyle (I can't seem to find the correspondance now
either, though). Anyway, RMS is right when he said that
mail-yank-hooks is wrong for 2 reasons: it should have been called
mail-yank-hook, and it doesn't even act like a real hook. But he
understood the need to keep some backwards compatibility so he still
supports the m-y-h interface, but indicates its obsolete.
PS> If this hook is entirely empty (nil), a default action is
PS> taken instead of no action.")
If you look in mail-yank-original in FSFmacs19's sendmail.el, you'll
see that the "default action" it takes when mail-citation-hook is nil
is to call run-hooks on mail-yank-hooks. That's why the m-y-h
interface still works. If m-c-h is non-nil, it is run-hooks'd
instead. So I *think* the proper thing to do now (if you want to be
compatible with FSF ;-) is something like:
(if mail-citation-hook
(run-hooks 'mail-citation-hook)
(run-hooks 'mail-yank-hooks))))
I think RMS's decision on this is fine. The *really* important part of
the interface is that the original mail headers aren't cleansed out
and that point and mark define the region to cite.
Oh, probably also defvar mail-citation-hook to nil and mail-yank-hooks
to some default action. Look at sendmail.el for how RMS does it now,
but I think it would be great if people could just add:
(add-hooks 'mail-citation-hook 'sc-cite-original)
to get supercite to work with any mail/news agent.
PS> SC 3, which is included in the FSF Emacs 19 distribution, has
PS> already been documented to use this, and RMAIL and (I hear)
PS> GNUS (also distributed with Emacs 19 now) both use it as well.
Actually FSF19 still uses a semi-hacked version of 2.3. I haven't even
looked at FSF19's diffs to the manual yet. SC3 is in beta testing now
and seems pretty stable. I just need to rewrite the manual, which
really is the only place that any of these citation hooks is
referenced in supercite anyway!
PS> After all those years of being on the cutting edge vs. RMAIL
PS> w.r.t. citation hooks, VM has now been leaped over! :)
But it was VM's foresight that proved the concept worked, ensuring
citation bliss for all mankind into the forseeable future. Or
citation torture, depending on your P.O.V. :-)
-Barry
Technical Details
Message-ID:
<WARSAW.93Jul13154514@anthem.nlm.nih.gov>Path:
arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!howland.reston.ans.net!agate!msuinfo!uchinews!cs.umd.edu!lhc!lhc!warsawReferences:
<199307121848.AA01816@regal.cisco.com> <9307130004.AA24741@crystal.WonderWorks.com> <9307131337.AA00813@lemming.wellfleet>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f6829,f10a1a4bd74807e5 X-Google-Attributes: gidf6829,public X-Google-ArrivalTime: 1993-07-13 15:05:38 PST Newsgroups: gnu.emacs.vm.bug Path: arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!howland.reston.ans.net!agate!msuinfo!uchinews!cs.umd.edu!lhc!lhc!warsaw From: warsaw@nlm.nih.gov (Barry A. Warsaw) Subject: Re: vm-reply-include-text not working/vm-5.33/emacs-19.16 In-Reply-To: psmith@wellfleet.com's message of Tue, 13 Jul 1993 09:37:51 EDT Message-ID: <WARSAW.93Jul13154514@anthem.nlm.nih.gov> X-Attribution: BAW Lines: 69 Sender: news@nlm.nih.gov Reply-To: warsaw@nlm.nih.gov (Barry A. Warsaw) Organization: Century Computing, Inc. References: <199307121848.AA01816@regal.cisco.com> <9307130004.AA24741@crystal.WonderWorks.com> <9307131337.AA00813@lemming.wellfleet> Date: 13 Jul 1993 20:45:14 GMT