Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* Re: Wishlist: gnus-summary-save-parts: save all parts
       [not found] <mailman.336.1144837227.9609.info-gnus-english@gnu.org>
@ 2006-04-12 10:44 ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Magne Ingebrigtsen @ 2006-04-12 10:44 UTC (permalink / raw)


era eriksson <era+gmane@iki.fi> writes:

> On a message with multiple message/rfc822 attachments, I found that
> `X m' would only save the last part (possibly it saved the earlier
> parts under the same name, or something). It would seem that it is
> useful only when each part has a filename= or name= parameter.

Yes.  I think the right fix is to use a unique file name for each part
that doesn't have a *name= parameter.

Fix in CVS Gnus.

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

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

* Wishlist: gnus-summary-save-parts: save all parts
@ 2006-04-12  9:57 era eriksson
  0 siblings, 0 replies; 2+ messages in thread
From: era eriksson @ 2006-04-12  9:57 UTC (permalink / raw)


On a message with multiple message/rfc822 attachments, I found that `X m' would
only save the last part (possibly it saved the earlier parts under the same
name, or something). It would seem that it is useful only when each part has a
filename= or name= parameter.

It would be useful and probably closer to user expectations if it could come up
with a unique name for each part which doesn't otherwise have one.

As a workaround, running Esc 2 K o (filename) RET, Esk 3 K o (filename) RET etc
works when you have a small number of attachments. Then you get to name each
file on the fly.

For a message with 61 attachments, I came up with the following M-x eval:

(let ((i 2)) (while (< i 63)
 ;; This snippet divinely inspired by code from from gnus-sum.el and mm-decode.el
 (set-buffer gnus-article-buffer)
 (gnus-article-goto-part i)
 (mm-save-part-to-file
   (cdr (assq i gnus-article-mime-handle-alist))
   (concat "/tmp/parts/" (int-to-string i) ".msg"))
 (setq i (1+ i)) ) )

Obviously, this could be generalized to a function which loops exactly as many
times as required for each message, asks for a directory name and/or perhaps a
filename template, checks that the directory exists, etc.

I had a quick look at the current CVS sources on Quimby, and could not see any
changes to the parts of the code where this is handled, compared to what I have
in my Gnus 5.10 on Ubuntu Breezy ("Version: 5.10.6-0.CVS.20050610-1")

/* era */

-- 
If this were a real .signature, it would suck less.  Well, maybe not.

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

end of thread, other threads:[~2006-04-12 10:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <mailman.336.1144837227.9609.info-gnus-english@gnu.org>
2006-04-12 10:44 ` Wishlist: gnus-summary-save-parts: save all parts Lars Magne Ingebrigtsen
2006-04-12  9:57 era eriksson

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