From: Mathias Dahl <mathias.dahl@gmail.com>
To: Stefan Kangas <stefan@marxist.se>
Cc: Glenn Morris <rgm@gnu.org>, 10758@debbugs.gnu.org
Subject: bug#10758: thumbs and image-dired to use built-in ImageMagick
Date: Mon, 25 Oct 2021 21:02:42 +0200 [thread overview]
Message-ID: <CABrcCQ5J7QJ=jfGPftv4MwhaNLjFx=9nVJe9HQLyis-VD8NGrw@mail.gmail.com> (raw)
In-Reply-To: <CADwFkmkcv6PTzAdvL2e8Nyt1sQ0kf-p-S2esDV1L39SrGMbABA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1638 bytes --]
On Sun, Oct 24, 2021 at 11:45 AM Stefan Kangas <stefan@marxist.se> wrote:
> Stefan Kangas <stefan@marxist.se> writes:
>
> > Stefan Kangas <stefan@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
[-- Attachment #2: Type: text/html, Size: 2451 bytes --]
next prev parent reply other threads:[~2021-10-25 19:02 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-08 4:52 bug#10758: thumbs and image-dired to use built-in ImageMagick Glenn Morris
2019-11-01 22:47 ` Stefan Kangas
2021-10-23 6:57 ` Stefan Kangas
2021-10-24 9:14 ` Stefan Kangas
2021-10-24 9:45 ` Stefan Kangas
2021-10-25 19:02 ` Mathias Dahl [this message]
2021-10-25 19:37 ` Stefan Kangas
2021-10-27 22:14 ` Stefan Kangas
2021-11-04 1:08 ` Stefan Kangas
2021-10-27 22:13 ` Stefan Kangas
2021-12-07 22:46 ` Stefan Kangas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CABrcCQ5J7QJ=jfGPftv4MwhaNLjFx=9nVJe9HQLyis-VD8NGrw@mail.gmail.com' \
--to=mathias.dahl@gmail.com \
--cc=10758@debbugs.gnu.org \
--cc=rgm@gnu.org \
--cc=stefan@marxist.se \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).