bug#81491: 30.2; Doc of `image-dired-display-*

"Drew Adams" <[email protected]> Sat, 1 Aug 2026 08:26:27 -0700
Newsgroups gmane.emacs.bugs
Message-ID <[email protected]>
> > > Before I answer, I need you to try and describe what happens in a
> > > modern Emacs when you don't pass that argument.  I suspect that what
> > > happens completely removes the need for the argument.
> > 
> > With Emacs 30.2 I get the error "No buffer named
> > *image-dired-display-image*", whether or not I
> > provide a prefix arg.
> > 
> > I added my command, `diredp-image-show-this-file', in
> > 2015, and I don't use Emacs with images much, if at all.
> > I just tried it now with Emacs 26.3 and 24.5, as well
> > as 30.2.
> > 
> > In 26 with no prefix arg, the image is in a square
> > window, shown in a separate frame.  The image is full
> > size, and the window/frame is not fit to the window.
> > I see the message "Could not resize image".
> > 
> > In 26 with a prefix arg, the image is still full size,
> > but the window/frame has a small height.  Same message.
> > 
> > If I turn OFF option
> > `diredp-image-show-this-file-use-frame-flag' then the
> > image window is in the same frame as the Dired buffer
> > where I invoke the command.  With the option ON, the
> > image window is in a separate frame.  The rest is the
> > same: image original size, only the window size (height)
> > changes with/without prefix arg.
> > 
> > In 24 with no prefix arg I get an error: "Invalid image
> > specification".  With a prefix arg there's no error but
> > there's no image - just a blank (white) buffer, and the
> > window has a small height.
> > 
> > I don't recall which Emacs release was current in 2015,
> > when I added the command, but I'm pretty sure it worked
> > then, at least with my PC etc.  Of course, that was
> > with a different MS Windows, different PC, etc.
> 
> What happens if you don't pass the prefix argument to
> image-dired-display-image?

I believe I covered that above.  For Emacs 30.2 (which
I think is what you're asking about) - I get an error:

  > > > Before I answer, I need you to try and describe what
  > > > happens in a modern Emacs when you don't pass that
  > > > argument.  I suspect that what happens completely
  > > > removes the need for the argument.
  > > 
  > > With Emacs 30.2 I get the error "No buffer named
  > > *image-dired-display-image*", whether or not I
  > > provide a prefix arg.

(I also mentioned what happens for earlier releases.)

> (I couldn't try your code, because it's incomplete: some functions it
> calls are missing.)

To be clear, I'm willing to not belabor this and just
remove (give up on) my command.  But if you really do
want to try the code:

`diredp-image-dired-required-msg' (in interactive spec)
just raises an error if `image-dired.el' isn't loaded.

`diredp-get-image-filename' returns the image-file name
on the current Dired line, or nil if no image file.

Option `diredp-image-show-this-file-use-frame-flag':

 Non-nil means `diredp-image-show-this-file' uses another frame.
 If nil then it uses another window.  Using another frame means you
 have more control over the image size when you use a prefix arg.
 If it uses another window then the prefix arg controls only the
 minimum window height, not necessarily the image scale (height).

(`diredp-string-match-p' (used in `diredp-get-image-filename')
is just an alias for 'string-match-p', for releases where
that predicate exists.)

I've attached the entire file that contains the code.
Don't feel obliged to dig further into this, unless
you feel it might help Emacs.  I'm willing to give up
on this - I don't have the time to dig into it.

Thx.
dired+.el (application/octet-stream, 913.5 KB) - not displayed