]> git.cworth.org Git - notmuch-wiki/blobdiff - emacstips.mdwn
Fix script for adding attachments from command line
[notmuch-wiki] / emacstips.mdwn
index fb9742a0c96f1c561b9b761aa65a866c1af7efd5..7a23293783bd467d99b8128b917b3d9c63bd4d8a 100644 (file)
@@ -78,7 +78,8 @@ mentioned as script arguments. (Note: The script expects that you have
     #!/bin/sh
     attach_cmds=""
     while [ "$1" ]; do
-        attach_cmds="$attach_cmds (mml-attach-file \"$1\")"
+        fullpath=$(readlink --canonicalize $1)
+        attach_cmds="$attach_cmds (mml-attach-file \"$fullpath\")"
         shift
     done
     emacsclient -a '' -c -e "(progn (compose-mail) $attach_cmds)"