On 23.08.16 19:47, Jethro Tull wrote:
> So I could save and close the current composition,

It is elementary to postpone the composition if desired. (See the
manual) A collection of postponed messages presents as a message index,
just as for any other mail folder. You can work on many of them in a
day.

If, instead, the composition is completed and sent, then automated
default or ...-hook saving is provided by mutt. (See the manual)

> then from that point I would need to browse my emails and edit the
> ones I want to select what I want and dump the selection into the
> email I was composing before without a copy/paste process

The task you initially described is just that, but it is much simpler to
collect the input messages in the composition (automatically done by
mutt when they are tagged and then a ";r" reply is chosen. (The question
presented will be answered in the affirmative, just by hitting return.)
Please read again the several simple available process flows, described
upthread. And try them.

>which would complicate things if I need the content of many emails. 

Simple repetition is not complication; it is just tedium. (See below for
the case where they're not all in one mail folder. That is a small
complication, readily dealt with.)

> The tricky thing I'm searching about is how to select the right file which
> corresponds to the email I was composing. I could of course browse the
> files in my maildir repo from within vim,

No, you are working too hard to make things difficult for yourself. The
optimal method described upthread involves tagging the emails in mutt,
so they are all popped into the vim session for you, by a ":r". Normally
the emails are in the one (e.g. list-related) mail folder, so that works
well. But what of a worst-case scenario, where you need to pull together
messages from a number of mailboxes. It is still optimal to use your MUA
(mutt) for mail, because oddly enough, that's what it's for. All you
need to do is browse the mail folders in mutt, and 'C' copy the chosen
messages to e.g. /tmp/ooh-de-elephants. When they're all there, 'c'
change folder to /tmp/ooh-de-elephants, and tag all the messages in the
index with "T~A", then ";r" to reply to them all.

Now they're all in your vim session, and it can be postponed (by mutt)
if that's all you can manage before lunch. And when you resume the
composition, everything's there. Nothing is needed but the editing and
composing. (When using that method, d} (in vim) make very light work of
eliding message headers en mass. Each message can be trimmed in
seconds.)

And, to repeat, it's even simpler if the messages are all in one
mail folder, as they can all be found in the one mutt index, and be
tagged there.

> but it doesn't look like a right way

Indeed. Trying to do things backwards isn't optimal. Re-reading the
methods described upthread, and trying them is advised. 

> because, first, the files in the maildir repo seem to be named
> randomly, second, what if my emails were stored in an mbox format?

That's not over-analysis, it's vague speculation. It has no purpose.
When you browse a mail folder in mutt, it makes no difference which
storage format is used. The index is the same in each case.

Goal-oriented thinking involves considering what _is_ available, and
trying out these methods which do work.

> It's a complicated thing because edition is made from within vim and
> email browing is done with mutt.

No, that is not the reality. ;-)
The reality is that it's a simple thing because editing is in vim and
browsing is done with mutt. Try the described methods and you will learn
the truth of that.

If you can stop trying to eat soup with a fork, and use the offered
spoon, success will follow.

Erik

Reply via email to