Reputation: 157
Is there a function in org-mode to open the parent directory of a linked file instead of the file itself?
Background: Having links to files under version control (subversion), I want to update the file before opening it.
Upvotes: 1
Views: 217
Reputation: 6422
The main question I have is: when you click on the link, do you always expect to go to the containing directory? If so, why not change the link to point to the directory, instead of pointing to the file?
If you sometimes want to go to the directory and sometimes to the file,
then you might (no guarantees) be able to do it by defining your own link type (but note that org-add-link-type
was declared obsolete in v9.0 and you are supposed to use org-link-set-parameters
instead - the manual needs updating). You'll need to program the criteria (or perhaps supply an argument somehow) for when you want to visit the directory and when you want to visit the file.
Upvotes: 0