From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [RFC] Link-type for attachments, more attach options Date: Sat, 06 Jul 2019 23:46:54 +0200 Message-ID: <87tvby4z01.fsf@nicolasgoaziou.fr> References: <87muqo8o68.fsf@nicolasgoaziou.fr> <877eh8vd52.fsf_-_@nicolasgoaziou.fr> <87y39euadx.fsf@nicolasgoaziou.fr> <87pnnfnfio.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:47309) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hjsWR-0005xB-2l for emacs-orgmode@gnu.org; Sat, 06 Jul 2019 17:47:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hjsWP-0005JG-07 for emacs-orgmode@gnu.org; Sat, 06 Jul 2019 17:47:06 -0400 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:39037) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hjsWN-0005Gm-5J for emacs-orgmode@gnu.org; Sat, 06 Jul 2019 17:47:04 -0400 In-Reply-To: ("Gustav =?utf-8?Q?Wikstr=C3=B6m=22's?= message of "Sun, 30 Jun 2019 06:03:32 +0000") 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" To: Gustav =?utf-8?Q?Wikstr=C3=B6m?= Cc: "emacs-orgmode@gnu.org" Hello, Gustav Wikstr=C3=B6m writes: > + (if should-get > + (progn (message "Running git annex get \"%s\"." path-relative) > + (call-process "git" nil nil nil "annex" "get" path-relative)) > + (error "File %s stored in git annex but it is not available, and was = not retrieved" > + path)))))) Nitpick: (unless should-get=20 (error "File %S stored in git annex but unavailable" path)) (message "Running git annex get %S." path-relative) (call-process ...) > +Selective means to respect the inheritance setting in > +`org-use-property-inheritance'." > :group 'org-attach > + :type '(choice > + (const :tag "Don't use inheritance" nil) > + (const :tag "Inherit parent node attachments" t) > + (const :tag "Respect org-use-property-inheritance" selective) > + ) Dangling paren spotted. > + (setq attachment (or (org-attach-dir) > + (quote "Can't find an existing attachment-folder"))) You forgot to remove that weird quote. Maybe you meant `error'? > + (if attach-dir > + (progn (if (not (file-directory-p attach-dir)) > + (make-directory attach-dir t)) > + attach-dir) > + (error "No attachment directory is associated with the current nod= e")))) Same nitpick as above: (unless attach-dir (error "No attachment ...")) (if (file-directory-p attach-dir) attach-dir (make-directory attach-dir)) > +(defun org-attach-dir-from-id (id) > + "Creates a path based on `org-attach-id-dir' and ID." > + (expand-file-name > + (funcall org-attach-id-to-path-function id) > + (expand-file-name org-attach-id-dir))) Creates path -> Return a file name. > +of the entry. Creates relative links if `org-attach-dir-relative' > +is t. Nitpick: is t -> is non-nil. If tests pass, feel free to apply the patches in master. Thank you! Regards, --=20 Nicolas Goaziou