emacs-orgmode
[Top][All Lists]
Advanced

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

Re: Org-attach for a directory


From: Juan Manuel Macías
Subject: Re: Org-attach for a directory
Date: Wed, 08 Jun 2022 10:32:29 +0000

Hi,

Cletip Cletip writes:

> My question is in the object : can we attach a directory to a heading?
> If yes, how, if not, why. Can we solve the problem?

I have in my init the following modification to the org-attach-attach
function so that I can copy a directory. I have replaced the line

((eq method 'cp) (copy-file file attach-file))

with this:

((eq method 'cp) (if (file-directory-p file) 
                     (copy-directory file attach-file)
                   (copy-file file attach-file)))


You can override the old function with advice-add:

(advice-add 'org-attach-attach :override 'my-new-org-attach-attach)

> Subsidiary question:
> Can we use org-attach as a filesystem? 
> Thanks in advance for your future answers

Can you please elaborate more? In my case, I use org-attach almost as a
replacement for my folder system (ie org nodes have come to replace
directories, and many nodes have a folder attached); I access the nodes
via org-ql/helm-org-ql (https://github.com/alphapapa/org-ql). It's very
productive.

Best regards,

Juan Manuel 



reply via email to

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