-
-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
denote-dired-mode ("fontification") not triggered in subdirectory if subdirectory is symlinked #346
Comments
From: Julian Hoch ***@***.***>
Date: Sat, 11 May 2024 10:46:06 -0700
I am not sure if this is a defect in Denote, or something that is just not possible in Emacs, but if
you
- set up multiple subdirectories below your main denote directory
- configure the hook for dired-mode
- enable denote-mode in dired for subdirectories using denote-dired-directories-include-subdirectories
Okay, let's try to find out:
- Go to the root of your denote-directory.
- Do M-x eval-expression
- Or type M-: with default key bindings.
- At the eval-expression prompt, write (denote-directory-subdirectories) and hit RET.
- You will get the return value of that function. Does it include the symlinks?
…--
Protesilaos Stavrou
https://protesilaos.com
|
Hi Prot!
"file-truename" resolves symlinks, so this will compare the directories I configured in my emacs config with the "true" path of the dorectory I am in - which will not resolve to the same path in my case. In my case, I set up the denote directories as ~/denote/private, ~/denote/customer, which link to ~/git/denote-private-kb and ~/git/denote-customer-kb, just for convenience. So the "member" test will fail if I access them via the symlink (but it works if I dired into the "real" path). I suspect this could be fixed by also applying file-truename to all the directories in the "dirs" list. |
Thank you for looking into this!
Maybe we can just remove the |
My understanding is that the advantage of using file-truename is that it does not matter if you use a symlink to look at your files.
|
What we can do is introduce a variable like |
I am not sure if this is a defect in Denote, or something that is just not possible in Emacs, but if
you
you will get dired mode only for subdirectories that are physical subdirectories, not symlinks. I am wondering if there is a way to make sure dired follows the symlink when determining whether to enable the denote mode.
A workaround is to manually add the symlinked directories to "denote-dired-directories", but obviously this only works if there are few subdirectories (and makes it a bit cumbersome to configure for cases where the same config is used on different computers with a different subfolder structure on the respective denote directory).
The text was updated successfully, but these errors were encountered: