From: John J Foerch <jjfoerch@earthlink.net>
To: emacs-orgmode@gnu.org
Subject: org-attach-commit optional
Date: Wed, 10 Feb 2016 17:39:50 -0500 [thread overview]
Message-ID: <87pow4rxzd.fsf@hecubus.retroj.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 182 bytes --]
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
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: org-attach-commit optional --]
[-- Type: text/x-diff, Size: 1246 bytes --]
From 2e6b4adb249ea36cd3546068974e97ff50e1e76b Mon Sep 17 00:00:00 2001
From: John Foerch <jjfoerch@earthlink.net>
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
next reply other threads:[~2016-02-10 22:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-10 22:39 John J Foerch [this message]
2016-02-11 9:09 ` org-attach-commit optional Nicolas Goaziou
2016-02-11 15:46 ` John J Foerch
2016-02-11 17:29 ` Nicolas Goaziou
2016-02-11 18:32 ` John J Foerch
2016-02-14 16:57 ` Nicolas Goaziou
2016-02-14 17:09 ` John J Foerch
2016-02-11 9:16 ` Marco Wahl
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
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87pow4rxzd.fsf@hecubus.retroj.net \
--to=jjfoerch@earthlink.net \
--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 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).