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

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

[elpa] master bd958e7 208/399: counsel.el (counsel-org-files): Re-use or


From: Oleh Krehel
Subject: [elpa] master bd958e7 208/399: counsel.el (counsel-org-files): Re-use org-attach-dir
Date: Sat, 20 Jul 2019 14:57:24 -0400 (EDT)

branch: master
commit bd958e7cba9afbd022cb660af9fb9bc0b86d1193
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>

    counsel.el (counsel-org-files): Re-use org-attach-dir
    
    Re #2042
---
 counsel.el | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/counsel.el b/counsel.el
index 3580e2d..5610334 100644
--- a/counsel.el
+++ b/counsel.el
@@ -3315,12 +3315,8 @@ include attachments of other Org buffers."
     (save-excursion
       (goto-char (point-min))
       (while (re-search-forward "^:\\(ATTACH_DIR\\|ID\\):[\t ]+\\(.*\\)$" nil 
t)
-        (let ((dir (match-string-no-properties 2)))
-          (when (string= "ID" (match-string-no-properties 1))
-            (setq dir (expand-file-name
-                       (concat (substring dir 0 2) "/" (substring dir 2))
-                       org-attach-directory)))
-          (when (file-exists-p dir)
+        (let ((dir (org-attach-dir)))
+          (when dir
             (push dir dirs)))))
     (cl-mapcan
      (lambda (dir)



reply via email to

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