emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [PATCH] org-attach.el: Fetch attachments from git annex


From: Kyle Meyer
Subject: Re: [O] [PATCH] org-attach.el: Fetch attachments from git annex
Date: Tue, 26 Jan 2016 12:34:50 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Erik Hetzner <address@hidden> writes:

> Kyle Meyer <address@hidden> wrote:

>> s/if/when/
>
> I’m sorry, you said this before, but I’ve always used =if= except in the case
> where I’d otherwise need =progn=. Is the principle here that =when= should be
> used when there is no else block?

Yes, for an 'if' without an 'else', I'd prefer to use 'when', especially
with a 'then' that isn't executed for its return value.  But it's not a
strong preference.

[...]

>> > -                            (mapcar #'list files) nil t))))
>> > -    (org-open-file (expand-file-name file attach-dir) in-emacs)))
>> > +                            (mapcar #'list files) nil t)))
>> > +         (path (expand-file-name file attach-dir)))
>> > +    (org-attach-annex-get-maybe path)
>> > +    (org-open-file path in-emacs)))
>> 
>> I think it's a mistake to always run git annex get and to remove the
>> message, because this process can hang if all the repos with the file
>> are unavailable.
>> 
>> This is also one of the reasons why I think there should be an option to
>> turn off automatic fetching.  Users should be able to stop org-attach
>> from trying to make connections.
>
> I have to admit I am reluctant to add another option to org-mode. What do you
> think about a y-or-n-p if the file needs fetching that will ask if the user
> would like to get the file from git annex?

I think a y-or-n-p prompt would be fine.  It also has the advantage that
it would make it clear that any hanging is from the 'git annex get'
call.

-- 
Kyle



reply via email to

[Prev in Thread] Current Thread [Next in Thread]