From mboxrd@z Thu Jan 1 00:00:00 1970 From: John J Foerch Subject: Re: org-attach-commit optional Date: Thu, 11 Feb 2016 13:32:27 -0500 Message-ID: <87egcjrtc4.fsf@hecubus.retroj.net> References: <87pow4rxzd.fsf@hecubus.retroj.net> <87io1vy5ob.fsf@nicolasgoaziou.fr> <87io1vs10g.fsf@hecubus.retroj.net> <87bn7n5f5s.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59053) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aTw2q-0000lI-Gs for emacs-orgmode@gnu.org; Thu, 11 Feb 2016 13:32:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aTw2n-0001q2-BX for emacs-orgmode@gnu.org; Thu, 11 Feb 2016 13:32:48 -0500 Received: from plane.gmane.org ([80.91.229.3]:38861) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aTw2n-0001pk-4B for emacs-orgmode@gnu.org; Thu, 11 Feb 2016 13:32:45 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1aTw2k-0000AO-US for emacs-orgmode@gnu.org; Thu, 11 Feb 2016 19:32:43 +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 ; Thu, 11 Feb 2016 19:32:42 +0100 Received: from jjfoerch by 152.160.144.141 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 11 Feb 2016 19:32:42 +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 Nicolas Goaziou writes: > Hello, > > John J Foerch writes: > >> I would be glad to do the paperwork, but as it's such a simple change, I >> have no objections to anybody else implementing this feature request in >> my place if they want to. I think it would save time. > > There is no rush. Besides, your patch can still fit within the > TINYCHANGE limit, albeit it would unfortunately be the last one. > >> Let me know if this works for this community, or whether it is >> preferred for me to go through the FSF process. > > I think the best solution for the community is to finish the patch and > apply it with a TINYCHANGE tag, while at the same time going through the > FSF process for future patches. It's always best to eat the cake and > have it too. > > Regards, Okay, will do. Here is an updated version of the patch. I started the process for copyright assignment as well. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-org-attach-Make-use-of-git-optional.patch Content-Description: org-attach make use of git optional >From e89c4e833deb6a55bbb2aa231afebe0fe8bd7f23 Mon Sep 17 00:00:00 2001 From: John Foerch Date: Wed, 10 Feb 2016 17:37:03 -0500 Subject: [PATCH] org-attach: Make use of git optional * lisp/org-attach.el (org-attach-commit): New variable. (org-attach-attach): Use new variable. TINYCHANGE diff --git a/lisp/org-attach.el b/lisp/org-attach.el index 15d4841..ebea435 100644 --- a/lisp/org-attach.el +++ b/lisp/org-attach.el @@ -55,6 +55,14 @@ where the Org file lives." :group 'org-attach :type 'directory) +(defcustom org-attach-commit t + "If non-nil commit attachments with git. +This is only done if the Org file is in a git repository." + :group 'org-attach + :type 'boolean + :version "25.1" + :package-version '(Org . "9.0")) + (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 +381,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 --=-=-=--