3

I want to have a log.org file, in my .../Study/ directory, which lists all the folders, files in the subdirs and hyperlink to them. In that way I can add notes about the files I read and, if I click on a link it opens the file for me outside emacs (pdf, video, etc.).

As I might delete or add files in the subdirs, I want dynamic symbolic links to the updated subdirs structure inside the org file (without compromising the notes taken).

How to get something like that done?

  • 1
    Instead of using links, you might find it easier to add all of those files to your agenda and use org-refile to navigate to headings within those files. That way you don't need to maintain an index (org-mode will do that for you). C-u M-x org-refile – ebpa Feb 4 '17 at 0:19
5

Org is designed to let you create notes that are associated with some context. In the ideal case the context is something that you can visit in Emacs directly, but you can define other kinds of links.

For example, if you are reading a text file in Emacs and want to create a note, the command org-store-link can be used to capture a link to your current place in the file and then you can create a corresponding note in your org file that includes the link. Later when reviewing your notes you might use org-open-at-point on the link to jump to the text associated with the note.

My point here is that creating and maintaining an up-to-date representation of an entire file system tree may not be necessary. Your use case sounds like a common org use case where you want a "my study notes" org file where each time you add a new note you want to include a link to some source file. I would suggest looking at the org-capture and org's external link support. This has the added benefit that you can rearrange and sort your notes in to some meaningful hierarchy that may not be the same as the file system hierarchy of your external resources, or that may include links to web resources etc. that are outside your file system tree.

1

...lists all the folders and files in the sub dirs and hyperlink...

org-fstree by Andreas Burtzlaff is a package that does this. Also has options to filter the files through options on the fstree block. See the comments in the org-fstree.el file.

An easier way might be to just have one link:

file:/home/username/Study

in the org file; then click on it to open files and sub folders. This way you solved the update/refresh problem as well. With Org-fstree, you'll have to remember to C-c C-c to refresh.

Addendum:

does org-fstree list the files in the log.org document? the idea is to keep adding notes under each file.

No, it only provides external links to the files that when clicked open in new buffers. To keep the contents of external files in one master file for editing, then use org mode's tangle feature.

  • does org-fstree list the files in the log.org document? the idea is to keep adding notes under each file. – zotherstupidguy Feb 4 '17 at 12:23
  • 1
    see addendum for updated answer – Emacs User Feb 4 '17 at 14:30
  • Many thanks, it is clearer to me now. – zotherstupidguy Feb 5 '17 at 9:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.