From: Matt Lundin <mdl@imapmail.org>
To: Org Mode <emacs-orgmode@gnu.org>
Subject: [PATCH] Fix git-annex-get call in org-attach
Date: Sun, 25 Mar 2018 22:22:16 -0500 [thread overview]
Message-ID: <87605jr05z.fsf@fastmail.fm> (raw)
[-- Attachment #1: Type: text/plain, Size: 312 bytes --]
I've attached a patch that fixes a minor issue in org-attach related to
git annex. Basically, it ensures that a shell command is called from
within the git-annex repository (i.e., the org-attach-directory).
Otherwise, the command results in an error because it is called in the
incorrect directory.
Best,
Matt
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Fix-default-directory-for-git-annex-checks.patch --]
[-- Type: text/x-patch, Size: 1146 bytes --]
From 6158eee0a36f41d90e78ae59df3cfac03f291157 Mon Sep 17 00:00:00 2001
From: Matt Lundin <mdl@imapmail.org>
Date: Sun, 25 Mar 2018 22:11:09 -0500
Subject: [PATCH] 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.
---
lisp/org-attach.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lisp/org-attach.el b/lisp/org-attach.el
index fdf652822..192815f4f 100644
--- a/lisp/org-attach.el
+++ b/lisp/org-attach.el
@@ -320,7 +320,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
--
2.16.2
next reply other threads:[~2018-03-26 3:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-26 3:22 Matt Lundin [this message]
2018-04-26 23:34 ` [PATCH] Fix git-annex-get call in org-attach Bastien
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87605jr05z.fsf@fastmail.fm \
--to=mdl@imapmail.org \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.