summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Lundin <mdl@imapmail.org>2018-03-25 22:11:09 -0500
committerBastien <bzg@gnu.org>2018-04-26 21:17:55 +0200
commit407014e0684796862a1b1d707717f4fdbdccc7da (patch)
tree80abbc1a126b48452ed981a34df4085c128132fe
parent2742211ec69eebe5de8539b1825cf0049adc0d46 (diff)
downloadorg-mode-407014e0684796862a1b1d707717f4fdbdccc7da.tar.gz
Fix default directory for git-annex checks
* lisp/org-attach.el: (org-attach-annex-get-maybe) Ensure shell command that checks whether a git-annex file exists is called from within the git-annex repository. Otherwise, it will result in an error.
-rw-r--r--lisp/org-attach.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/org-attach.el b/lisp/org-attach.el
index 9774e3a..86516e2 100644
--- a/lisp/org-attach.el
+++ b/lisp/org-attach.el
@@ -319,7 +319,8 @@ the ATTACH_DIR property) their own attachment directory."
(defun org-attach-annex-get-maybe (path)
"Call git annex get PATH (via shell) if using git annex.
Signals an error if the file content is not available and it was not retrieved."
- (let ((path-relative (file-relative-name path)))
+ (let* ((default-directory (expand-file-name org-attach-directory))
+ (path-relative (file-relative-name path)))
(when (and (org-attach-use-annex)
(not
(string-equal