Hi Francesco,

Francesco Ariis schrieb am 21.03.2021 12:15:23:
> Is there a way to one-button this? I thought about a macro,
> but I suspect that wouldn’t work, since I am firing up an
> editor.

You could do that with changing the editor then „editing“ then changing
the editor back to vim.

I do something similar with labeling a received email:
macro pager,index y "<enter-command>set editor=\"~/bin/editlabel 
append\"<enter><edit><sync-mailbox><enter><clear-flag>N<enter-command>set 
editor=vim<enter>" "Append label"

(change editor, edit existing email on disk, sync-mailbox, set mail as new, 
change editor back to vim)

I guess you could what you want with vim/ex/sed/awk or else.

Also keep in mind that procmail may be able to automate this process
entirely.

Best Regards,
PM

Reply via email to