Re: using a file selection command
> To a degree. In edit mode, add an Attach: header. When you exit > edit mode, mutt will attach the named file. > Thanks! Very nice trick. -- o W. Luis Mochán, | tel:(52)(777)329-1734 /<(*) Instituto de Ciencias Físicas, UNAM | fax:(52)(777)317-5388 `>/ /\ Apdo. Postal 48-3, 62251 | (*)/\/ \ Cuernavaca, Morelos, México | moc...@fis.unam.mx /\_/\__/ GPG: DD344B85, 2ADC B65A 5499 C2D3 4A3B 93F3 AE20 0F5E DD34 4B85
Re: using a file selection command
Hi Sebastian! On Sa, 04 Mai 2013, Sebastian Tramp wrote: > Hi there, > > 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? If you use Vim as editor you can use my CheckAttach¹² plugin, which supports ranger as external filebrowser and adds appropriate Attach: headers into your file. (you need :set edit_headers for this to work). See the reference in the documentation³. ¹) https://github.com/chrisbra/CheckAttach ²) http://www.vim.org/scripts/script.php?script_id=2796 ³) https://github.com/chrisbra/CheckAttach/blob/master/doc/CheckAttach.txt#L73 regards, Christian
Re: using a file selection command
On 04May2013 16:14, Sebastian Tramp 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; 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 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
using a file selection command
Hi there, 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? Best regards Sebastian Tramp -- WebID: http://sebastian.tramp.name pgpUAUV1qWA_d.pgp Description: PGP signature