~protesilaos/general-issues

1

VLF patch for dired-preview

Details
Message ID
<871qeb56bw.fsf@gmail.com>
DKIM signature
missing
Download raw message
Hi Prot,

Here is the patch for dired-preview to view large files.

There are two patches, the second one adds hexl-mode previews, which is
suitable for viewing binary files/byte streams.  At any time, and for
any file (not necessarily binary), the user can switch between viewing
files as text and hexl using C-c C-c.

The commit messages provide details on the design, but the main change
is the following: Instead of calling
`dired-preview--find-file-no-select' on the file to be previewed, I call
`dired-preview--dispatch-file' instead. This is a new function. This
function decides how to preview the file, i.e. as a regular file, a
large file, or (in the future) as an image, video thumbnail, pdf/docview
preview etc.

Please let me know if it works for you. You can test it on any large
file, including binaries.

Best,
Karthik
Details
Message ID
<878r8hr69j.fsf@protesilaos.com>
In-Reply-To
<871qeb56bw.fsf@gmail.com> (view parent)
DKIM signature
missing
Download raw message
> From: karthik.chikmagalur@gmail.com
> Date: Tue,  3 Oct 2023 22:01:39 -0700
>
> Hi Prot,

Hello Karthik,

> Here is the patch for dired-preview to view large files.

Thank you!

> There are two patches, the second one adds hexl-mode previews, which is
> suitable for viewing binary files/byte streams.  At any time, and for
> any file (not necessarily binary), the user can switch between viewing
> files as text and hexl using C-c C-c.
>
> The commit messages provide details on the design, but the main change
> is the following: Instead of calling
> `dired-preview--find-file-no-select' on the file to be previewed, I call
> `dired-preview--dispatch-file' instead. This is a new function. This
> function decides how to preview the file, i.e. as a regular file, a
> large file, or (in the future) as an image, video thumbnail, pdf/docview
> preview etc.
>
> Please let me know if it works for you. You can test it on any large
> file, including binaries.

I install the patches and pushed them.  Everything seems to work fine on
my end.

All the best,
Prot

-- 
Protesilaos Stavrou
https://protesilaos.com
Reply to thread Export thread (mbox)