From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kyle Meyer Subject: Re: [PATCH] org-attach.el: Fetch attachments from git annex Date: Tue, 05 Jan 2016 01:21:41 -0500 Message-ID: <87poxg8s22.fsf@kyleam.com> References: <568b532e.d111620a.b25a8.ffffbb7c@mx.google.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47631) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aGL0D-00046r-Kj for emacs-orgmode@gnu.org; Tue, 05 Jan 2016 01:21:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aGL08-0002dv-Kq for emacs-orgmode@gnu.org; Tue, 05 Jan 2016 01:21:53 -0500 Received: from pb-smtp0.int.icgroup.com ([208.72.237.35]:56510 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aGL08-0002dp-Gj for emacs-orgmode@gnu.org; Tue, 05 Jan 2016 01:21:48 -0500 In-Reply-To: <568b532e.d111620a.b25a8.ffffbb7c@mx.google.com> (Erik Hetzner's message of "Mon, 4 Jan 2016 21:09:55 -0800") 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: Erik Hetzner Cc: emacs-orgmode@gnu.org Thanks for the patch. Erik Hetzner writes: > +(defun org-attach-use-annex () > + "Return true if we should use git annex for attachments." s/true/non-nil/ > + (let* ((dir (expand-file-name org-attach-directory)) > + (git-dir (vc-git-root dir))) I'd prefer (let ((git-dir (vc-git-root (expand-file-name org-attach-directory)))) ...) [...] > + (if (and (file-symlink-p path) s/if/when/ > + (org-attach-use-annex) > + (not (file-exists-p (file-symlink-p path)))) > + (call-process "git" nil nil nil "annex" "get" path)) - Should this display a message before calling "git annex get" to let the user know what's happening in case fetching the file takes some time? - Should there be a setting the controls whether attachments are automatically fetched? -- Kyle