Subject: Re: bug#73727: dired-view-file vs. emacs -nw

From: Eli Zaretskii <[email-masked]>
Date: Thu, 10 Oct 2024 14:29:00 +0300

tags 73727 notabug wontfix
thanks

> From: Dan Jacobson <[email-masked]>
> Date: Thu, 10 Oct 2024 18:41:48 +0800
> 
> v runs the command dired-view-file which works great even on images etc.
> except when the user is using emacs -nw, in which case it just spews the
> a lot of binary stuff on the screen which the user was not expecting.
> Therefore it should say "xyz.jpg cannot be shown properly on your
> terminal." (If they really want to see the bytes, they can use
> find-file.)

That's not the Emacs way.  Emacs allows users to visit any kind of
files, including those which display as binary garbage.  Moreover,
even on GUI frames, users can customize Emacs to never show image
files as images when they are visited.  Refusing to visit an image
file just because it cannot be displayed as an image is something
Emacs never did and should not do.

dired-view-file's doc string says:

  In Dired, examine a file in view mode, returning to Dired when done.
  When file is a directory, show it in this buffer if it is inserted.
  Otherwise, display it in another buffer.

There's nothing here about showing image files as images or not at
all.  Perhaps you were confused by the "view" part, but that refers to
view-mode, not to "viewing" an image.

So I don't see any bugs here, and don't think we should "fix" anything
in this matter.