X-Git-Url: https://git.madduck.net/code/mailplate.git/blobdiff_plain/872a6c420ffb2a831287b00dfd991cbeebe233a7..5c4fa1ec93a9581a4cefed72e077a591a3403a88:/mailplate.xml?ds=sidebyside diff --git a/mailplate.xml b/mailplate.xml index 992714f..b59b2e2 100644 --- a/mailplate.xml +++ b/mailplate.xml @@ -97,6 +97,23 @@ and docbook-xsl in your Build-Depends control field. template-name message-file + + &dhpackage; + + + + + + + + + + + + + template-name + < message-data + &dhpackage; @@ -202,8 +219,9 @@ and docbook-xsl in your Build-Depends control field. parts: headers, body, and signature. When is given, an empty instantiation of the - template is written to stdout. At the moment, - cannot be combined with . + template is written to stdout. At the moment, + cannot be combined with + . The template can define two types of headers: mandatory and preservatory. Mandatory headers take precedence over headers in the @@ -222,16 +240,17 @@ and docbook-xsl in your Build-Depends control field. This script can be run in multiple ways: - As a filter, it applies a template to data from stdin - and writes the result to stdout. + As a filter, it applies a template to data from + stdin and writes the result to + stdout. When is passed, the script spawns sensible-editor on the result. It may thus be used as the editor for your mail user agent. Given a file, it modifies the file, unless it cannot - write to the file, in which case it writes to stdout. - + write to the file, in which case it writes to + stdout. @@ -289,7 +308,7 @@ and docbook-xsl in your Build-Depends control field. - Write informational messages to stderr. + Write informational messages to stderr. @@ -321,10 +340,68 @@ and docbook-xsl in your Build-Depends control field. + + MUTT INTEGRATION + + I use mailplate as my $editor for + mutt, with the following setting in my + ~/.mutt/muttrc: + + + + mailplate currently has a bit of a limitation, or at least I have + not figured out a way how to work around it sensibly yet. If you re-edit + a message from mutt’s compose menu, it causes mailplate to reprocess the + message, which you may not want. + + Similarly, if you find yourself editing messages from the index or + pager, you probably also don’t want mailplate to get in the way. For + these cases, I currently use the following two keybindings: + + :set editor=sensible-editor:set editor="$my_editor"' "invoke normal editor to edit message" + macro index,pager e ':set my_editor="$editor":set editor=sensible-editor:set editor="$my_editor"' "invoke normal editor to edit message" + ]]> + + + + + VIM INTEGRATION + + I am often editing a message with vim and + find that I need to use a different identity. For this purpose, I have + the following keybindings in my + ~/.vim/ftplugin/mail.vim: + + :w:%!mailplate --keep-unknown --auto + nmap :w:%!mailplate --keep-unknown private + nmap :w:%!mailplate --keep-unknown debian + ]]> + + Now when I reply to a message, mailplate automatically choses the + right template, and if I later change my mind, I can press C-p, to + override the choice and select the private template, or just hit to have + it re-run the auto-detection. + + + SEE ALSO - http://madduck.net/code/mailplate/ - /usr/share/doc/mailplate/README + + + + http://madduck.net/code/mailplate/ + + + + + /usr/share/doc/mailplate/README + + +