X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=emacstips.mdwn;h=9c5c3d87b115295ec9cb70da7369acae90e73967;hb=c43e6b0a9afeceeb70e36834cf3e707727fec0e3;hp=5f483355b2579d57fd36124953a2a44489f8514e;hpb=b155f6009c63f09745768ae00da816b428910891;p=notmuch-wiki diff --git a/emacstips.mdwn b/emacstips.mdwn index 5f48335..9c5c3d8 100644 --- a/emacstips.mdwn +++ b/emacstips.mdwn @@ -70,6 +70,20 @@ from a file manager into a mail composition window to have it attached (assuming you are using emacs with X support). At least in Ubuntu it works by dragging from the file manager without any modifications. +And for those who prefer working from command line, the following +script opens new emacs window with empty message and attaches files +mentioned as script arguments. (Note: The script expects that you have +`(server-start)` in your .emacs) + + #!/bin/sh + attach_cmds="" + while [ "$1" ]; do + attach_cmds="$attach_cmds (mml-attach-file \"$1\")" + shift + done + emacsclient -a '' -c -e "(progn (compose-mail) $attach_cmds)" + + -----

Advanced tips and tweaks