diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS index d9194b10f..1316335a1 100644 --- a/etc/ORG-NEWS +++ b/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) diff --git a/lisp/org-attach.el b/lisp/org-attach.el index 9fad1c39f..8093527ae 100644 --- a/lisp/org-attach.el +++ b/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."