فهرست منبع

org-attach: Silence byte-compiler

* lisp/org-attach.el (org-attach-attach): Tiny refactoring.
Nicolas Goaziou 7 سال پیش
والد
کامیت
9a297d6531
2فایلهای تغییر یافته به همراه9 افزوده شده و 1 حذف شده
  1. 6 0
      etc/ORG-NEWS
  2. 3 1
      lisp/org-attach.el

+ 6 - 0
etc/ORG-NEWS

@@ -286,6 +286,12 @@ Call ~org-agenda-set-restriction-lock~ from the agenda.
 
 ** Miscellaneous
 
+*** Org Attach obeys ~dired-dwim-target~
+
+When a Dired buffer is opened next to the Org document being edited,
+the prompt for file to attach can start in the Dired buffer's
+directory if `dired-dwim-target' in non-nil.
+
 *** More specific anniversary descriptions
 
 Anniversary descriptions (used in the agenda view, for instance)

+ 3 - 1
lisp/org-attach.el

@@ -42,6 +42,8 @@
 (require 'org-id)
 (require 'vc-git)
 
+(declare-function dired-dwim-target-directory "dired-aux")
+
 (defgroup org-attach nil
   "Options concerning entry attachments in Org mode."
   :tag "Org Attach"
@@ -406,7 +408,7 @@ METHOD may be `cp', `mv', `ln', `lns' or `url' default taken from
              (org-attach-store-link file)))
       (if visit-dir
           (dired attach-dir)
-        (message "File \"%s\" is now a task attachment." basename)))))
+        (message "File %S is now a task attachment." basename)))))
 
 (defun org-attach-attach-cp ()
   "Attach a file by copying it."