[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] org-attach-commit optional
From: |
John J Foerch |
Subject: |
[O] org-attach-commit optional |
Date: |
Wed, 10 Feb 2016 17:39:50 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Hello,
I would like for org-attach's automatic committing of attachments to be
easily disabled. Something along the lines of the attached patch.
Thoughts?
Thank you,
John Foerch
>From 2e6b4adb249ea36cd3546068974e97ff50e1e76b Mon Sep 17 00:00:00 2001
From: John Foerch <address@hidden>
Date: Wed, 10 Feb 2016 17:37:03 -0500
Subject: [PATCH] org-attach-attach: make use of git optional with variable
org-attach-commit
diff --git a/lisp/org-attach.el b/lisp/org-attach.el
index 15d4841..8f367a2 100644
--- a/lisp/org-attach.el
+++ b/lisp/org-attach.el
@@ -55,6 +55,12 @@ where the Org file lives."
:group 'org-attach
:type 'directory)
+(defcustom org-attach-commit t
+ "If non-nil, attachments will be committed with git, if the org
+file is in a git repository."
+ :group 'org-attach
+ :type 'boolean)
+
(defcustom org-attach-git-annex-cutoff (* 32 1024)
"If non-nil, files larger than this will be annexed instead of stored."
:group 'org-attach
@@ -373,7 +379,8 @@ METHOD may be `cp', `mv', `ln', or `lns' default taken from
((eq method 'cp) (copy-file file fname))
((eq method 'ln) (add-name-to-file file fname))
((eq method 'lns) (make-symbolic-link file fname)))
- (org-attach-commit)
+ (when org-attach-commit
+ (org-attach-commit))
(org-attach-tag)
(cond ((eq org-attach-store-link-p 'attached)
(org-attach-store-link fname))
--
2.6.4
- [O] org-attach-commit optional,
John J Foerch <=
Re: [O] org-attach-commit optional, Marco Wahl, 2016/02/11