On 04May2013 16:14, Sebastian Tramp <[email protected]> wrote:
| instead of using the file browser of mutt to select an attachment, I want to
| start a specific script / application which returns the file I want to attach.
| 
| more concrete: I want to select one of the most recent edited documents from
| the desktop index so I do not need to remember where the file is and to browse
| through many dir levels.
| 
| Is there a way to configure that somehow?

To a degree. In edit mode, add an Attach: header. When you exit
edit mode, mutt will attach the named file.

I have a macro (in vi; we're in the eitor here) bound to ^A that
prompts me for a filename, with filename completion, which I use
for this. You could easily write something to run a script that
adds the desired Attach: header.

For comparison, this is my vi macro bound to ^A:

  map  1G}-:.r!exec </dev/tty 2>/dev/tty; readline -B 'Attach: '
IAttach: 

There's a literal ^M and ^[ (escape) in there.

Of course, I do not know you preferred editor, and I haven't given
a great deal of thought to addressing your need from outside the
editor mode, though one idea might be to write your script to find
the file and emit the mutt commands needed to add that as an
attachment, and bind a macro to invoke it.

Cheers,
-- 
Cameron Simpson <[email protected]>

Q: How does a hacker fix a function which doesn't work for all of the elements 
in its domain?
A: He changes the domain.
- Rich Wareham <[email protected]>

Reply via email to