• Can I set a separate default save folder for attachments

    From cjsmall@21:1/5 to All on Thu Sep 2 13:50:42 2021
    Mutt 1.13.2
    Xubuntu 20.04

    In my .muttrc file I have "set folder=~/lib/Mail" and all my saved mail resides under this location. I was wondering if there is a setting that would apply separately to attachments. I almost always want to save attachments in "~/Downloads" and have
    to manually add this path to the save line each time.

    Alternately, maybe there is a way to make a single key alias for "~/Downloads" just as "=" or '+' substitutes for the folder string.

    Not a big problem, but I wanted to check whether I was missing something obvious. Thanks.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From cjsmall@21:1/5 to Tavis Ormandy on Thu Sep 2 20:10:12 2021
    On Thursday, September 2, 2021 at 7:48:25 PM UTC-7, Tavis Ormandy wrote:
    Hmm, I guess I would just write a macro like this:
    [...]
    macro attach s "<save-entry>~/Downloads/"

    I guess this is better, so as not to overwrite the filename:

    macro attach s "<save-entry><Home>~/Downloads/<End>"

    Tavis: Thanks for the simple solution. It works! Regarding the <Home> and <End>, I see that they cause the attachment name to be inserted on the save line, but I really don't understand why or how. If you can enlighten me as to what is happening
    here, I'd appreciate it. Regards.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Tavis Ormandy@21:1/5 to Tavis Ormandy on Fri Sep 3 02:48:23 2021
    On 2021-09-03, Tavis Ormandy wrote:
    On 2021-09-02, cjsmall wrote:
    Alternately, maybe there is a way to make a single key alias for "~/Downloads" just as "=" or '+' substitutes for the folder string.

    Not a big problem, but I wanted to check whether I was missing something obvious. Thanks.

    Hmm, I guess I would just write a macro like this:

    macro attach s "<save-entry>~/Downloads/"

    Does that solve it?


    I guess this is better, so as not to overwrite the filename:

    macro attach s "<save-entry><Home>~/Downloads/<End>"

    Tavis.

    --
    _o) $ lynx lock.cmpxchg8b.com
    /\\ _o) _o) $ finger taviso@sdf.org
    _\_V _( ) _( ) @taviso

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Tavis Ormandy@21:1/5 to cjsmall on Fri Sep 3 02:38:43 2021
    On 2021-09-02, cjsmall wrote:
    Alternately, maybe there is a way to make a single key alias for "~/Downloads" just as "=" or '+' substitutes for the folder string.

    Not a big problem, but I wanted to check whether I was missing something obvious. Thanks.

    Hmm, I guess I would just write a macro like this:

    macro attach s "<save-entry>~/Downloads/"

    Does that solve it?

    Tavis.


    --
    _o) $ lynx lock.cmpxchg8b.com
    /\\ _o) _o) $ finger taviso@sdf.org
    _\_V _( ) _( ) @taviso

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rich@21:1/5 to cjsmall on Fri Sep 3 03:34:58 2021
    cjsmall <jefferysmall@gmail.com> wrote:
    On Thursday, September 2, 2021 at 7:48:25 PM UTC-7, Tavis Ormandy wrote:
    Hmm, I guess I would just write a macro like this:
    [...]
    macro attach s "<save-entry>~/Downloads/"

    I guess this is better, so as not to overwrite the filename:

    macro attach s "<save-entry><Home>~/Downloads/<End>"

    Tavis: Thanks for the simple solution. It works! Regarding the
    <Home> and <End>, I see that they cause the attachment name to be
    inserted on the save line, but I really don't understand why or how.
    If you can enlighten me as to what is happening here, I'd appreciate
    it. Regards.

    They don't. Mutt inserts the attachment name automatically. <Home>
    simply moves the insertion cursor to the start of the name, then
    "~/Downloads/" is entered as if you had typed those characters, then
    <End> moves the insertion cursor back to the very end of the filename
    field.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From cjsmall@21:1/5 to Rich on Fri Sep 3 08:43:09 2021
    On Thursday, September 2, 2021 at 8:35:00 PM UTC-7, Rich wrote:
    They don't. Mutt inserts the attachment name automatically. <Home>
    simply moves the insertion cursor to the start of the name, then "~/Downloads/" is entered as if you had typed those characters, then
    <End> moves the insertion cursor back to the very end of the filename
    field.

    OK, I see now. That's what you meant previously by overwriting the attachment name. Without the <Home>/<End> the name was being inserted and then overwritten by "~/Download/" which is why I wasn't seeing it with your first example. Thanks for the
    great solution and the explanation.

    I wrote all my mutt macros probably 15-20 years ago and have been using them pretty much unchanged since then. I'm really rusty at this point! :-)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)