From b925c865e943f1cf21dd19593f2b7fdcaf92bbc3 Mon Sep 17 00:00:00 2001 From: Michal Sojka Date: Tue, 28 Dec 2010 14:38:20 +0100 Subject: [PATCH] Fix script for adding attachments from command line It is better to specify the attachment via its full path, because if the attachment markup is copied to another buffer, the relative path may not be valid there. --- emacstips.mdwn | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/emacstips.mdwn b/emacstips.mdwn index fb9742a..7a23293 100644 --- a/emacstips.mdwn +++ b/emacstips.mdwn @@ -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)" -- 2.43.0