Continuing the conversation from last July..

In 2002 Martin Michlmayr wrote
: "I wanted to send some photos I took yesterday to a couple of friends
: and it would be nice to simply do "a" and then say *.jpg.  Why is that
: not possible? Alternatively, it would be nice if you could tag files
: in the file browser and then attach the tagged ones."

http://michael.orlitzky.com/articles/multiple_attachments_in_mutt.php
tells us:

| hit a, then TAB, then hit t for each file to attach, then ENTER

not too bad, but hitting t seventy times feels rather silly.
After hitting the "a" one can type an initial part of the name, and
have TAB TAB complete a list of files starting with the given part.
I have not succeeded in making other patterns work.

Mutt 1.5.21 (2010-09-15)

-----

Moritz Barsnick replied:

>> Press "a" (<attach-file>)
>> -> "Attach file ('?' for list):"
>> Press "?"
>> -> Get directory browser.
>> Press "t" for every file you find appropriate.
>> Indeed, the <tag-pattern> and <untag-pattern> commands
>> would be extremely useful now.

Unfortunately, what happens here is

Press "a"
-> "Attach file ('?' for list):"
Press "?"
-> Get directory browser on the remote mailhost

As far as I can see, there is no way to tell that directory browser
that it is on the wrong host.
In fact, I seem to be unable to do anything at all with this directory browser.
It shows

y:Exit  c:Chdir  m:Mask  ?:Help
 1     IMAP                                  Chats
 2     IMAP                                  Contacts
 3     IMAP                                  Drafts
 4     IMAP                                  Emailed Contacts
 5     IMAP                                  INBOX
 6     IMAP                                  Junk
 7     IMAP                                  Sent
 8     IMAP                                  Trash

and I cannot enter the folders shown (perhaps to attach some
letter from INBOX or Sent): every action in this menu returns
me to

-> "Unable to attach imaps://remote.host:993/Sent!"

Probably there is a bug here. This doesnt look like it could be
intentional. But maybe I overlook a secret keycombo.

-----

Cameron Simpson replied:

> Open the message editor

(that is, press "E")

> and add "Attach: foo.jpg" header lines for every jpg required.
>
> For several files I go:  !!ls *.jpg

Yes, very good, that works and is better than hitting t seventy times.
So what do I do? Go to a separate window, find the proper directory, then

% for i in *pattern*; do echo Attach: "$i"; done

then press "E", and copy&paste the output. Or, if the list is a bit larger

% for i in *pattern*; do echo Attach: "$i"; done > /tmp/att_files

then press "E", and include-file /tmp/att_files, then "rm /tmp/att_files".

For vi users life is a bit easier than for emacs users, since
as far as I know one cannot easily refer to the current directory
from emacs. (Mutt calls emacs on a file /tmp/mutt-xxx and emacs
will set its working directory to /tmp, which is not where the
files to attach live.)

-----

OK, so this works, and I have documented how, so it is only
a wish-list item, but really the present situation is that a user
cannot get mutt to attach multiple files without strange trickery.

The invocation of the directory browser on the remote host
feels buggy.

A microscopic flaw:
The list of attachments truncates the filenames of the attached files
to about 40 characters. This is independent of the width of the window
so that there is a sea of whitespace following the truncated name.
It is a pity that the name is truncated like this, almost a security risk:
before actually sending the letter one wants to check that it has the
correct attachments. But the space of 40 chars is used up by part
of the directory name, and nothing of the actual filenames is visible.

So far for today about adding attachments.

Andries

Reply via email to