Hi Prot,
Just a heads up that `dired-preview-trigger' does not work as intended:
(defun dired-preview-trigger ()
"Trigger display of file at point after `dired-preview-trigger-commands'."
(when (memq last-command dired-preview-trigger-commands)
(dired-preview-display-file)))
Since this is on `post-command-hook', we should be checking
`this-command' against `dired-preview-trigger-commands', not
`last-command'. Right now it matches against the previous command and
does not update the preview if you are doing anything other than
pressing `n' and `p' continuously.
Karthik
> From: Karthik Chikmagalur <contact@karthinks.com>> Date: Wed, 28 Jun 2023 12:51:00 -0700>> Hi Prot,
Hello Karthik,
> Just a heads up that `dired-preview-trigger' does not work as intended:>> (defun dired-preview-trigger ()> "Trigger display of file at point after `dired-preview-trigger-commands'."> (when (memq last-command dired-preview-trigger-commands)> (dired-preview-display-file)))>> Since this is on `post-command-hook', we should be checking> `this-command' against `dired-preview-trigger-commands', not> `last-command'. Right now it matches against the previous command and> does not update the preview if you are doing anything other than> pressing `n' and `p' continuously.
Oh, right! Do you want to send a patch?
All the best,
Prot
--
Protesilaos Stavrou
https://protesilaos.com
> From: Karthik Chikmagalur <contact@karthinks.com>> Date: Wed, 28 Jun 2023 13:30:58 -0700>>> Oh, right! Do you want to send a patch?>> Since this is a one-sexp fix, please go ahead and make the change.
Done. Thank you!
--
Protesilaos Stavrou
https://protesilaos.com