GNU bug report logs - #10758
thumbs and image-dired to use built-in ImageMagick

Previous Next

Package: emacs;

Reported by: Glenn Morris <rgm <at> gnu.org>

Date: Wed, 8 Feb 2012 04:54:02 UTC

Severity: wishlist

Found in version 24.0.93

Fixed in version 29.1

Done: Stefan Kangas <stefan <at> marxist.se>

Bug is archived. No further changes may be made.

Full log


Message #20 received at 10758 <at> debbugs.gnu.org (full text, mbox):

From: Mathias Dahl <mathias.dahl <at> gmail.com>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: Glenn Morris <rgm <at> gnu.org>, 10758 <at> debbugs.gnu.org
Subject: Re: bug#10758: thumbs and image-dired to use built-in ImageMagick
Date: Mon, 25 Oct 2021 21:02:42 +0200
[Message part 1 (text/plain, inline)]
On Sun, Oct 24, 2021 at 11:45 AM Stefan Kangas <stefan <at> marxist.se> wrote:

> Stefan Kangas <stefan <at> marxist.se> writes:
>
> > Stefan Kangas <stefan <at> marxist.se> writes:
> >
> >> So perhaps this feature request is relevant anymore.  WDYT?
> >
> > I now see that Glenn mentioned resizing as well, where using the
> > built-in image scaling seems very relevant.  We currently jump through
> > some unnecessary hoops in `image-dired-display-image' when we could just
> > resize the image in memory.
> >
> > Is there any reason why `image-dired-display-image-mode' doesn't just
> > inherit `image-mode'?  That would avoid code duplication and also allow
> > us to immediately benefit from any improvements to `image-mode'.


Hi, sorry for coming late to the party.

I cannot remember any good reason for not inheriting from `image-mode', but
I opened image-dired.el now and found this:

(defvar image-dired-display-image-mode-map
  (let ((map (make-sparse-keymap)))
    ;; `image-mode-map' has bindings that do not make sense in image-dired
    ;; (set-keymap-parent map image-mode-map)
    (define-key map "f" 'image-dired-display-current-image-full)
    (define-key map "s" 'image-dired-display-current-image-sized)
    (define-key map "g" nil)

    ;; Useful bindings from `image-mode-map'
    (define-key map [remap forward-char] 'image-forward-hscroll)
    (define-key map [remap backward-char] 'image-backward-hscroll)
...

It seems I knew about `image-mode' but perhaps it never crossed my mind
to inherit from it. 16 years later, my memory fails me...

At any rate I have nothing against it, if someone wants to give it a try.

/Mathias
[Message part 2 (text/html, inline)]

This bug report was last modified 3 years and 250 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.