* [PATCH] Fix git-annex-get call in org-attach
@ 2018-03-26 3:22 Matt Lundin
2018-04-26 23:34 ` Bastien
0 siblings, 1 reply; 2+ messages in thread
From: Matt Lundin @ 2018-03-26 3:22 UTC (permalink / raw)
To: Org Mode
[-- 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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Fix git-annex-get call in org-attach
2018-03-26 3:22 [PATCH] Fix git-annex-get call in org-attach Matt Lundin
@ 2018-04-26 23:34 ` Bastien
0 siblings, 0 replies; 2+ messages in thread
From: Bastien @ 2018-04-26 23:34 UTC (permalink / raw)
To: Matt Lundin; +Cc: Org Mode
Hi Matt,
Matt Lundin <mdl@imapmail.org> writes:
> 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.
applied in maint, thanks!
--
Bastien
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-04-26 23:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-26 3:22 [PATCH] Fix git-annex-get call in org-attach Matt Lundin
2018-04-26 23:34 ` Bastien
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).