🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.vm.bug
Article #232

Re: Suggested fix to vm-pipe-message-part

#232
From: Uday S Reddy
Date: Wed, 06 Jan 2010 16:02
64 lines
3586 bytes
blueman wrote:
> Brief testing show it works -- indeed piping all messages in a folder to
> an external file matches exactly the original file -- which is what I
> think we want...

It didn't work for me.  I needed to make at least the following fixes.

Running it on cat (on Windows Cygwin) still hangs for me.  I think it 
has something to do with the asynchronous handler.  But I will punt 
that issue for now.

Cheers,
Uday


--- vm-save.el.blueman	2010-01-06 14:21:26.000000000 +0000
+++ vm-save.el	2010-01-06 15:31:42.000000000 +0000
@@ -642,20 +642,21 @@
  	   current-prefix-arg)))
    (vm-pipe-message-to-command command prefix-arg t))

-(defun vm-pipe-command-exit-handler (process discard-output
+(defun vm-pipe-command-exit-handler (process command discard-output
  					     &optional exit-handler)
-  "Switch to output buffer of PROCESS if DISCARD-OUTPUT non-nil.
+"Switch to output buffer of PROCESS that ran COMMAND, if
+DISCARD-OUTPUT non-nil.
  If non-nil call EXIT-HANDLER with the two arguments COMMAND and 
OUTPUT-BUFFER."
    (let ((exit-code (process-exit-status process))
  	(buffer (process-buffer process))
-	(command (process-command process)))
+	(process-command (process-command process)))
    (if (not (zerop exit-code))
        (message "Command '%s' exit code is %d." command exit-code))
    (vm-display nil nil '(vm-pipe-message-to-command)
  	      '(vm-pipe-message-to-command))
    (vm-switch-to-command-output-buffer command buffer discard-output)
    (if exit-handler
-      (funcall exit-handler command buffer))))
+      (funcall exit-handler process-command buffer))))

  (defvar vm-pipe-messages-to-command-start ""
    "*The leading message separator to be used by












> 
> Just one minor syntax error - I left off the final closing paren from
> the following:
> 
> ;;Start message separator
> (defsubst vm-start-separator-of (message)
>   (list (vm-start-of message)
> 		(vm-headers-of message)))
Technical Details
Message-ID: <hi2c72$l5i$1@north.jnrs.ja.net>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!feeder.news-service.com!tudelft.nl!txtfeed1.tudelft.nl!dedekind.zen.co.uk!zen.net.uk!hamilton.zen.co.uk!feed4.jnfs.ja.net!feed2.jnfs.ja.net!jnfs.ja.net!times.reader.netnews.ja.net!not-for-mail
References: <m2d41p7sho.fsf@consult.pretender> <hht5o0$9pd$1@scotsman.ed.ac.uk> <m23a2l7myy.fsf@consult.pretender> <hhti24$9ua$1@scotsman.ed.ac.uk> <m2tyv15eaz.fsf@consult.pretender> <hhv7u9$bf4$1@scotsman.ed.ac.uk> <m2iqbg5zjg.fsf@consult.pretender> <hi0018$1gk$1@north.jnrs.ja.net> <m21vi45kxy.fsf@consult.pretender> <hi0e67$5b2$1@north.jnrs.ja.net> <m2tyv03yq9.fsf@consult.pretender> <m2pr5o3ycq.fsf@consult.pretender> <m2ljgc3xd3.fsf@consult.pretender>

Show Full Headers
Complete Article Headers
X-Google-Thread: a16957f451,747cd7667796b3e3
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!news3.google.com!feeder.news-service.com!tudelft.nl!txtfeed1.tudelft.nl!dedekind.zen.co.uk!zen.net.uk!hamilton.zen.co.uk!feed4.jnfs.ja.net!feed2.jnfs.ja.net!jnfs.ja.net!times.reader.netnews.ja.net!not-for-mail
From: Uday S Reddy <uDOTsDOTreddy@cs.bham.ac.uk>
Newsgroups: gnu.emacs.vm.bug
Subject: Re: Suggested fix to vm-pipe-message-part
Date: Wed, 06 Jan 2010 16:02:52 +0000
Organization: Janet Usenet Reading Service.
Lines: 64
Message-ID: <hi2c72$l5i$1@north.jnrs.ja.net>
References: <m2d41p7sho.fsf@consult.pretender> <hht5o0$9pd$1@scotsman.ed.ac.uk> <m23a2l7myy.fsf@consult.pretender> <hhti24$9ua$1@scotsman.ed.ac.uk> <m2tyv15eaz.fsf@consult.pretender> <hhv7u9$bf4$1@scotsman.ed.ac.uk> <m2iqbg5zjg.fsf@consult.pretender> <hi0018$1gk$1@north.jnrs.ja.net> <m21vi45kxy.fsf@consult.pretender> <hi0e67$5b2$1@north.jnrs.ja.net> <m2tyv03yq9.fsf@consult.pretender> <m2pr5o3ycq.fsf@consult.pretender> <m2ljgc3xd3.fsf@consult.pretender>
NNTP-Posting-Host: gromit.cs.bham.ac.uk
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: north.jnrs.ja.net 1262793763 21682 147.188.193.16 (6 Jan 2010 16:02:43 GMT)
X-Complaints-To: usenet@north.jnrs.ja.net
NNTP-Posting-Date: Wed, 6 Jan 2010 16:02:43 +0000 (UTC)
User-Agent: Thunderbird 2.0.0.23 (Windows/20090812)
In-Reply-To: <m2ljgc3xd3.fsf@consult.pretender>