<<< Date Index >>>     <<< Thread Index >>>

Re: Feature request: missing attachment (was: tag-push and tag-pop for tag-prefixing macros)



On 15Jan2006 23:24, Matthias Andree <matthias.andree@xxxxxx> wrote:
| Thomas Roessler schrieb am 2006-01-15:
| > Well, you can actually put an "Attach" pseudoheader into your
| > message while you compose it, if you have header editing turned
| > on.  Mutt will attach the file that's identified there.
| 
| Great, that's good enough.
| Does anyhone happen to have some vim magic to do...
| 
| > With the mail-mode that I'm using with jed, I can actually type
| > C-c a and then use jed's file selection mechanism to select the
| > attachment for mutt.
| 
| ...this?

Try this:

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

That contains embedded ^a etc. Cut and paste precisely (i.e. via via -
a terminal emulator will just mangle it).

[ Has a thought... Saves the macro line to a file and types ^A, and lo!
  attached!  So just grab the attached one line file with the vi macro in
  it:-)
]

You will also need this script:

  http://www.cskk.ezoshosting.com/cs/css/bin/readline

which does a file-completion capable read.

Note: you can do multiple files in one read with this, and that seems
to work just fine.

Works scarily well for a 5 minute hack:-)
It's now in my standard vi macros. I hadn't realised about the Attach: header
before. Cool!

Cheers,
-- 
Cameron Simpson <cs@xxxxxxxxxx> DoD#743
http://www.cskk.ezoshosting.com/cs/

He who will not reason is a bigot; he who cannot is a fool; and he who dares
not is a slave. - Sir William Drummond, Academical Questions
map  1G}-:.r!exec </dev/tty 2>/dev/tty; readline 'Attach: '
IAttach: