Erik Hetzner <e...@e6h.org> writes: > Kyle Meyer <k...@kyleam.com> 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