dirvish
dirvish copied to clipboard
[Bug] Minor modes missing when buffer is opened with dirvish preview function
Thank you for the bug report
- [X] I am using the latest version of
dirvish
related packages. - [X] I checked CUSTOMIZING|EXTENSIONS.
- [ ] You may also try reproduce the issue using clean environment and minimal configurations with
the command
emacs -Q
.
Bug description
It seems like not all hooks are run on file preview vs opening actual file in Dirvish. When opening file normally, all hooks are run, however when previewed, not all hooks are run and not all minor modes are present in the buffer. In my case, YAML is the biggest outlier, with yaml-pro-mode and prism-whitespace-mode missing from 'preview' buffers.
This is what it looks like when file is opened normally:
This is what it looks like when file is opened via Dirvish preview:
On MacOS, entering the file and then getting back to Dirvish keeps the missing modes:
On WSL2 (Ubuntu 22.04) however, even after entering the buffer from dirvish, minor modes are still missing, and the only way to get those is to kill and reopen the file.
Steps to reproduce
It is not entirely clear to me what makes some minor modes activate, and some not. Yaml is the biggest outlier, as this is the mode I use the most, and prism-whitespace-mode is a big visual cue that there is something wrong with previews.
- Open Dirvish fullscreen mode
- Preview yaml-mode buffer, inspect modes. Some minor modes might be missing.
- Kill the buffer, reopen yaml-mode buffer without use of Dirvish. All minor modes should be present.
- Reopening Dirvish with existing yaml-mode buffer also shows the buffer with all the minor modes.
I know that this is not much, but I kinda don't know where to start with debugging this.
Expected behavior
Opening buffers with preview should activate all minor modes that opening buffer normally does.
OS
MacOS
Emacs Version
29
Emacs Configurations
https://github.com/schrenker/nix/blob/master/emacs/init.el
Error callstack
No response
Anything else
No response