From mboxrd@z Thu Jan 1 00:00:00 1970 From: John J Foerch Subject: org-attach-commit optional Date: Wed, 10 Feb 2016 17:39:50 -0500 Message-ID: <87pow4rxzd.fsf@hecubus.retroj.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38389) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aTdQc-00006X-Iy for emacs-orgmode@gnu.org; Wed, 10 Feb 2016 17:40:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aTdQZ-0000pZ-Cy for emacs-orgmode@gnu.org; Wed, 10 Feb 2016 17:40:06 -0500 Received: from plane.gmane.org ([80.91.229.3]:53167) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aTdQZ-0000p8-5c for emacs-orgmode@gnu.org; Wed, 10 Feb 2016 17:40:03 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1aTdQT-0000Yk-01 for emacs-orgmode@gnu.org; Wed, 10 Feb 2016 23:39:57 +0100 Received: from 152.160.144.141 ([152.160.144.141]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 10 Feb 2016 23:39:56 +0100 Received: from jjfoerch by 152.160.144.141 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 10 Feb 2016 23:39:56 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain 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 --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-org-attach-attach-make-use-of-git-optional-with-vari.patch Content-Description: org-attach-commit optional >From 2e6b4adb249ea36cd3546068974e97ff50e1e76b Mon Sep 17 00:00:00 2001 From: John Foerch 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 --=-=-=--