Re: org-attach a directory?

2021-06-15 Thread Henrik Frisk
Den fre 11 juni 2021 18:37John Kitchin skrev: > I discovered another way to do this that is already built in with > `org-attach-dired-to-subtree` that would help sometimes. > > You split your window, open dired in one of them, mark some files, and > then run that command in the dired window. > >

Re: org-attach a directory?

2021-06-15 Thread stardiviner
> On Jun 12, 2021, at 12:35 AM, John Kitchin wrote: > > I discovered another way to do this that is already built in with > `org-attach-dired-to-subtree` that would help sometimes. > > You split your window, open dired in one of them, mark some files, and then > run that command in the dire

Re: org-attach a directory?

2021-06-11 Thread Juan Manuel Macías
I have put the Ihor's snippet in my init file. I find it very useful, and everything is done from a simple Helm session. The only case it doesn't work is when I just want to copy a directory --not a file-- (instead of moving or giving it a symbolic link). So I have done this little modification (ju

Re: org-attach a directory?

2021-06-11 Thread John Kitchin
I discovered another way to do this that is already built in with `org-attach-dired-to-subtree` that would help sometimes. You split your window, open dired in one of them, mark some files, and then run that command in the dired window. John --- Professor John Kit

Re: org-attach a directory?

2021-06-10 Thread stardiviner
I want this feature patch too. Hope Org Mode can add this. I remember old version org-mode can do this. But later delete this feature? I forget what version is. I suggest to add this feature. > On Jun 8, 2021, at 11:49 PM, John Kitchin wrote: > > Is it possible to attach a directory to an org

Re: org-attach a directory?

2021-06-10 Thread Ypo
In case you don't know it, take a look at the inheritance option for attachments. Very very very useful: You can use the same DIRectory with many subtrees without being necessary to attach the directory to each of them.

Re: org-attach a directory?

2021-06-10 Thread Juan Manuel Macías
You could also modify some line in org-attach-attach, for example: ... ((eq method 'cp) (if (file-directory-p file) (copy-directory file attach-file) (copy-file file attach-file))) ... Best regards, Juan Manuel Juan Manuel Macías writes: >

Re: org-attach a directory?

2021-06-10 Thread Juan Manuel Macías
This only works when you create the attach folder manually, but not when you want org-attach to generate the attach directory for the current node. If I have to stay with a workaround that covers many scenarios, I would stay with Ihor's snippet, which seems to me simpler than the patch that I sugg

Re: org-attach a directory?

2021-06-10 Thread Christian Barthel
On Thu, Jun 10 2021, John Kitchin wrote: > isn't that just org-attach-attach-mv? or what happens if you set > org-attach-method to mv? Ah right. I always just looked only at the *Org Attach* buffer and haven't seen a move method. The echo area lists a few more commands: it seems that doing `or

Re: org-attach a directory?

2021-06-10 Thread John Kitchin
isn't that just org-attach-attach-mv? or what happens if you set org-attach-method to mv? John --- Professor John Kitchin (he/him/his) Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin ht

Re: org-attach a directory?

2021-06-10 Thread Christian Barthel
On Thu, Jun 10 2021, Ypo wrote: > C-c C-a > > s > > (not "S" like in the video, but "s") Thanks, that is an interesting workaround: Setting the directory twice and using the copy/delete action accordingly. Does anyone know if there is a workaround to attach a file and delete the old one (or move

Re: org-attach a directory?

2021-06-09 Thread Ypo
C-c C-a s (not "S" like in the video, but "s") El 10/06/2021 a las 1:39, John Kitchin escribió: can you give an example of those commands, I tried the key commands C-c C-a which opens the dispatcher s to set a directory then C-c C-a z to sync, but it did not do anything but add a :DIR: prope

Re: org-attach a directory?

2021-06-09 Thread Ypo
Hi John :-) Take a look: https://mega.nz/file/hKgECBqY#8UVEURWQBvDpno9DPEk8gb8E-zxAJq3F3E8Y9I9xRFk El 10/06/2021 a las 1:39, John Kitchin escribió: can you give an example of those commands, I tried the key commands C-c C-a which opens the dispatcher s to set a directory then C-c C-a z to sy

Re: org-attach a directory?

2021-06-09 Thread John Kitchin
can you give an example of those commands, I tried the key commands C-c C-a which opens the dispatcher s to set a directory then C-c C-a z to sync, but it did not do anything but add a :DIR: property. it didn't move or copy files anywhere. Here is the code I am currently using that basically does

Re: org-attach a directory?

2021-06-09 Thread Ypo
Firstly you set the folder where your files are as attachment DIRectory. Then, you set your target attachment DIRectory (always using the attachment commands). After doing this, you will be offered the option to copy and delete all the files from the former to the target folder. Hugs

[patch] Re: org-attach a directory?

2021-06-08 Thread Juan Manuel Macías
Hi John, John Kitchin writes: > I want to attach all the files in a directory on my desktop to the > attachment directory, something that is more like > org-attach-attach-mv-directory (that is not an existing command, but > what I was thinking of doing). Did I misunderstand what > org-attach-set

Re: org-attach a directory?

2021-06-08 Thread Ihor Radchenko
John Kitchin writes: > Is it possible to attach a directory to an org heading? > > I have only seen how to attach a file so far. I use the code below to attach directories and allow multiple selection while attaching files. Also, if more people are interested in this kind of functionality, I can

Re: org-attach a directory?

2021-06-08 Thread John Kitchin
I am not sure that is what I meant, it looks like that specifies/changes the attachment directory for a heading. I want to attach all the files in a directory on my desktop to the attachment directory, something that is more like org-attach-attach-mv-directory (that is not an existing command, bu

Re: org-attach a directory?

2021-06-08 Thread Henrik Frisk
Den tis 8 juni 2021 kl 17:56 skrev John Kitchin : > Is it possible to attach a directory to an org heading? > > > Yes, you do arg-attach-set-directory. After that you need to sync it to make the files in the directory visible: org-attach-sync It's quite neat, I use it all the time. /Henrik

org-attach a directory?

2021-06-08 Thread John Kitchin
Is it possible to attach a directory to an org heading? I have only seen how to attach a file so far. John --- Professor John Kitchin (he/him/his) Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @j