Open iago-pssjd opened 1 month ago
From: iago-pssjd @.***> Date: Mon, 21 Oct 2024 07:05:21 -0700
FYI
https://gitlab.com/protesilaos/dired-preview/-/issues/1
Thanks!
Thank you! I will check there later and report back to you. It seems I did not receive a notification about it, which is strange...
-- Protesilaos Stavrou https://protesilaos.com
I am looking into this but I cannot tell what the problem is. I even used this function, which does not work:
(defun dired-preview-hexl-toggle ()
"Toggle preview between text and `hexl-mode'."
(interactive)
(dired-preview-with-window
(if (derived-mode-p 'hexl-mode)
(cl-letf (((symbol-function 'yes-or-no-p) #'always)
((symbol-function 'y-or-n-p) #'always))
(hexl-mode-exit)
(doc-view-mode))
(hexl-mode)
(dired-preview--add-truncation-message))))
I found what the issue is. In dired-preview--get-buffer
we only insert part of the file, so we cannot toggle to a full buffer view. To do that, we need to kill the preview and then visit the large file. Maybe that is the way to go, though I am not sure this should be done with the current toggle.
FYI
https://gitlab.com/protesilaos/dired-preview/-/issues/1
Thanks!