Re: saving several attachments in a specified directory -> macro adds /path
[ no cc to fefe ] Hi, * Sven Guckes [02-10-09 14:24:56 +0200] wrote: [...] > wish:add an option to set the favourite > directory for saving attachments in. Because mutt sucks in this particular sence I made a patch which is kind of ``works for me''. It's attached. How it works: It prepends the value of $attach_dir _before_ prompting so that one can change it from case to case. bye, Rocco [ not cc'ing to mutt-dev ] --- globals.h.orig Sun Aug 4 13:03:23 2002 +++ globals.h Sun Aug 4 13:03:42 2002 @@ -34,6 +34,7 @@ WHERE char *AliasFmt; WHERE char *AttachSep; WHERE char *Attribution; +WHERE char *AttachDir; WHERE char *AttachFormat; WHERE char *Charset; WHERE char *ComposeFormat; --- init.h.orig Sun Aug 4 13:03:57 2002 +++ init.h Sun Aug 4 13:05:27 2002 @@ -193,6 +193,11 @@ ** If set, Mutt will prompt you for carbon-copy (Cc) recipients before ** editing the body of an outgoing message. */ + { "attach_dir", DT_PATH, R_NONE, UL &AttachDir, UL "~"}, + /* + ** .pp + ** Default location where attached files should be saved to. + */ { "attach_format", DT_STR, R_NONE, UL &AttachFormat, UL "%u%D%I %t%4n %T%.40d%> [%.7m/%.10M, %.6e%?C?, %C?, %s] " }, /* ** .pp --- recvattach.c.orig Wed Sep 26 12:33:09 2001 +++ recvattach.cSun Aug 4 13:07:50 2002 @@ -379,7 +379,16 @@ int append = 0; if (body->filename) -strfcpy (buf, body->filename, sizeof (buf)); + { +if (AttachDir) +{ + snprintf (buf, sizeof (buf), "%s/", AttachDir); + strncat (buf, body->filename, _POSIX_PATH_MAX - + strlen (body->filename) - strlen (AttachDir) + - 1); +} +else strfcpy (buf, body->filename, sizeof (buf)); + } else if(body->hdr && body->encoding != ENCBASE64 && body->encoding != ENCQUOTEDPRINTABLE &&
Re: saving several attachments in a specified directory -> macro adds /path
* jochen issing <[EMAIL PROTECTED]> [2002-10-09 11:55]: > I recently received a message with a huge number of pictures attached. > Now I want to store all these (or tagged ones) pics in a specified > folder. Can anybody tell me how to do this? Perhaps a sample? > I am just able to store the files in my home dir (default...) oh, my, this *is* a faq by now... and the answer is: "use a macro!" macro attach S /path this makes the cursor jump to the "beginning-of-line" ("bol") at the prompt for the filename, thus adding the "/path" before the filename (if there is one). when you to to the attachments menu with "view-attachments" ('v') then you can tag-entry ('t') all the parts you want to save and then use the tag-prefix (';') command before you use save-entry ('s'); mutt will prompt you before saving each "entry" (attachment/file/part), and the macro will add the selected path automatically. drawback:the /path is *fixed* in the macro. workaround: maybe use $DIR_ATTACH in the macro.. wish:add an option to set the favourite directory for saving attachments in. (fefe - can you please add this to the faq?) Sven [who will add this macro to the setup page] -- Sven Guckes [EMAIL PROTECTED] http://www.guckes.net/mutt/the MUTT PAGES: Binaries| Bugs| DOWNLOAD| History| Intro| Installation| Links| MailList| NEWS| Patches| Philosophy| Pictures| Quotes| SETUP| Sites| Usenet| Users| Utilities| Windows| Wishlist -- Comparison to Elm|.. Not for everyone!| Pet Peeves| Sigs.
Re: saving several attachments in a specified directory
jochen issing ([EMAIL PROTECTED]) muttered: > I recently received a message with a huge number of pictures attached. > Now I want to store all these (or tagged ones) pics in a specified > folder. Can anybody tell me how to do this? Perhaps a sample? This has become an FAQ. Check the archives. HTH, Michael -- "Oh, I've seen copies [of Linux Journal] around the terminal room at The Labs." (By Dennis Ritchie) PGP-Key: http://www-stud.ims.uni-stuttgart.de/~tatgeml/public.key
Re: saving several attachments in a specified directory
* jochen issing <[EMAIL PROTECTED]> [09-10-2002 13:56]: > I recently received a message with a huge number of pictures attached. > Now I want to store all these (or tagged ones) pics in a specified > folder. Can anybody tell me how to do this? Perhaps a sample? Currently, mutt asks per file where and under what name this file has to be saved. IM(H)O these are not prompts you want to skip. > I am just able to store the files in my home dir (default...) Change dir to the destination folder and fire mutt from there... -- René Clerc - ([EMAIL PROTECTED]) A Smith and Wesson beats four aces. -Canada Bill Jones msg31673/pgp0.pgp Description: PGP signature
saving several attachments in a specified directory
Hi List, I recently received a message with a huge number of pictures attached. Now I want to store all these (or tagged ones) pics in a specified folder. Can anybody tell me how to do this? Perhaps a sample? I am just able to store the files in my home dir (default...) Thanks, jochen -- jochen issing mailto:[EMAIL PROTECTED] http://www.mcf-music.de GPG:0A121BC