Hi Nicolas, Nicolas Richard wrote:
> Hello Viktor, > > Thanks for your input. > > > - I have to load the "cl" module, otherwise the "case" function is > > void. > > Sorry about that. I didn't notice it was from cl. > > > - I had to replace "find-lisp-find-files" with "directory-files" because > > the former does not exist on my Emacs installation. I use GNU Emacs > > 24.2.1 on OS X compiled from MacPorts. > > Oops again. (require 'find-lisp) should fix that. The big difference > with directory-files is that find-lisp-find-files looks also in > subdirectories (I often attach subdirectories and like to link files > from therein). And it returns full paths, too, which explains some parts > of the rest of the code. If "find-lisp-find-files" returns full paths then the discrimination in org-attach-complete-how makes sense. Pretty cool. Cheers, Viktor