dirvish icon indicating copy to clipboard operation
dirvish copied to clipboard

[Bug] Minor modes missing when buffer is opened with dirvish preview function

Open schrenker opened this issue 1 year ago • 0 comments

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: image

This is what it looks like when file is opened via Dirvish preview: image

On MacOS, entering the file and then getting back to Dirvish keeps the missing modes: image

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.

  1. Open Dirvish fullscreen mode
  2. Preview yaml-mode buffer, inspect modes. Some minor modes might be missing.
  3. Kill the buffer, reopen yaml-mode buffer without use of Dirvish. All minor modes should be present.
  4. 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

schrenker avatar Feb 06 '24 22:02 schrenker