emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/gnorb 4f16002 029/449: gnorb-org.el: Fix attaching atta


From: Stefan Monnier
Subject: [elpa] externals/gnorb 4f16002 029/449: gnorb-org.el: Fix attaching attachments to outgoing messages.
Date: Fri, 27 Nov 2020 23:15:02 -0500 (EST)

branch: externals/gnorb
commit 4f160029cd364dbea61dfc68d0b332af03c19240
Author: Eric Abrahamsen <eric@ericabrahamsen.net>
Commit: Eric Abrahamsen <eric@ericabrahamsen.net>

    gnorb-org.el: Fix attaching attachments to outgoing messages.
    
    org-attach files weren't being attached with the right file path.
---
 lisp/gnorb-org.el | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/lisp/gnorb-org.el b/lisp/gnorb-org.el
index 8ade90f..6046d01 100644
--- a/lisp/gnorb-org.el
+++ b/lisp/gnorb-org.el
@@ -99,7 +99,10 @@ point."
 (defsubst gnorb-org-attachment-list ()
   (when (featurep 'org-attach)
     (let* ((attach-dir (org-attach-dir t))
-          (files (org-attach-file-list attach-dir)))
+          (files
+           (mapcar (lambda (f)
+                     (expand-file-name f attach-dir))
+                   (org-attach-file-list attach-dir))))
       files)))
 
 (defun gnorb-org-handle-mail (&optional from-agenda)
@@ -116,7 +119,9 @@ point."
     (message-goto-body)
     (when attachments
       (dolist (a attachments)
-       (and (yes-or-no-p (format "Attach %s to outgoing message? " a))
+       (and (yes-or-no-p
+             (format "Attach %s to outgoing message? "
+                     (file-name-nondirectory a)))
             (mml-attach-file a
              (mm-default-file-encoding a)
              nil "attachment"))))))
@@ -230,7 +235,9 @@ default set of parameters."
        nil "attachment"))
     (when attachments
       (dolist (a attachments)
-       (and (yes-or-no-p (format "Attach %s to outgoing message? " a))
+       (and (yes-or-no-p (format
+                          "Attach %s to outgoing message? "
+                          (file-name-nondirectory a)))
             (mml-attach-file a
                              (mm-default-file-encoding a)
                              nil "attachment"))))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]