Article View: gnu.emacs.vm.bug
Article #209Suggested fix to vm-pipe-message-part
From: blueman
Date: Mon, 04 Jan 2010 16:19
Date: Mon, 04 Jan 2010 16:19
39 lines
3136 bytes
3136 bytes
The various routines that use vm-pipe-message-part reference: "Runs a shell command with contents from the current message as input. By default, the entire message is used. With one \\[universal-argument] the text portion of the message is used. With two \\[universal-argument]'s the header portion of the message is used. With three \\[universal-argument]'s the visible header portion of the message plus the text portion is used. HOWEVER, vm-pipe-message-part is skipping the initial 'From' line since it is using (vm-headers-of m) as the start rather than (vm-start-of m). Similarly, it uses (vm-text-end-of m) rather than (vm-end-of m) Since the usual reason for splitting/piping messages to an external shell command is to pass the message to some standard 3rd program, it would be helpful to use standard conventions -- by which I mean something relatively consistent with 'formail' or better yet the RFC's. In particular, when you ask for the "entire message", I at least expect the entire message. In my case, spamassassin thinks a collection of messages is just one big message since it doesn't see the 'From' line. I would suggest making the following change so that the default "entire message" truly includes the entire message and perhaps add an option with four universal arguments that gives the current default behavior. (defun vm-pipe-message-part (m arg) "Return (START END) bounds for piping to external command, based on ARG." (cond ((equal prefix-arg '(4)) (list (vm-text-of m) (vm-text-end-of m))) ((equal prefix-arg '(16)) (list (vm-headers-of m) (vm-text-of m))) ((equal prefix-arg '(64)) (list (vm-vheaders-of m) (vm-text-end-of m))) + ((equal prefix-arg '(256)) + (list (vm-headers-of m) (vm-text-end-of m))) (t - (list (vm-headers-of m) (vm-text-end-of m))))) + (list (vm-start-of m) (vm-end-of m)))))
Technical Details
Message-ID:
<m2d41p7sho.fsf@consult.pretender>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news3.google.com!feeder3.cambriumusenet.nl!feed.tweaknews.nl!193.201.147.78.MISMATCH!feeder.news-service.com!188.40.43.213.MISMATCH!feeder.eternal-september.org!eternal-september.org!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: a16957f451,747cd7667796b3e3,start X-Google-Attributes: gida16957f451,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news3.google.com!feeder3.cambriumusenet.nl!feed.tweaknews.nl!193.201.147.78.MISMATCH!feeder.news-service.com!188.40.43.213.MISMATCH!feeder.eternal-september.org!eternal-september.org!not-for-mail From: blueman <NOSPAM@nospam.com> Newsgroups: gnu.emacs.vm.bug Subject: Suggested fix to vm-pipe-message-part Date: Mon, 04 Jan 2010 11:19:15 -0500 Organization: A noiseless patient Spider Lines: 39 Message-ID: <m2d41p7sho.fsf@consult.pretender> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.eternal-september.org U2FsdGVkX18VzfKi2itbHkD4cylYL8yzsvPdjH5l+LKFK+UeqOG22bgpb4hF7ugHwwpKl1IQyzeJ3FlFN5KU+grwjFB59IgQl8PAvgLCXzAWtDNDRY17Wev1TqGa38MspChOR6BgmLwSd6C5z90geg== X-Complaints-To: abuse@eternal-september.org NNTP-Posting-Date: Mon, 4 Jan 2010 16:19:16 +0000 (UTC) X-Auth-Sender: U2FsdGVkX19/9uNl+lb3EeDJ8gU+FtFIAoHr2Aqisf9fCk5PjI4RRw== Cancel-Lock: sha1:NwACdTHHB4KQ3nlQTQ4K0izImC8= sha1:dzDs/GE15tq28+IoLiSDOPCaVdQ= User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)