all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Gabriel Santos via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: 75410@debbugs.gnu.org
Cc: Stefan Kangas <stefankangas@gmail.com>
Subject: bug#75410: [PATCH] image-dired: Add extra keybinds for navigation
Date: Mon, 06 Jan 2025 17:07:24 -0300	[thread overview]
Message-ID: <87o70j4sg3.fsf@disroot.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 750 bytes --]

Greetings,

I discovered this mode through a blog post from Sacha:

<https://sachachua.com/blog/2025/01/using-image-dired-to-browse-the-latest-screenshots-from-multiple-directories/>

And I really liked it.

Though, I felt that it was missing something:

Some keybinds for navigation besides C-n and C-p, like those found in
other read-only modes, such as dired-mode.

This patch binds the following keys in `image-dired-thumbnail-mode-map':

- "f" :: `image-dired-forward-image'
- "b" :: `image-dired-backward-image'
- "n" :: `image-dired-next-line'
- "p" :: `image-dired-previous-line'
- "a" :: `image-dired-move-beginning-of-line'
- "e" :: `image-dired-move-end-of-line'

These keys are currently unused in the mode.

Regards,

--
Gabriel Santos


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: [PATCH] image-dired: Add extra keybinds for navigation --]
[-- Type: text/x-patch, Size: 1239 bytes --]

From 8f7a1234ce7642f587e435347bf7ba22b397ce18 Mon Sep 17 00:00:00 2001
From: Gabriel Santos <gabrielsantosdesouza@disroot.org>
Date: Mon, 6 Jan 2025 16:56:31 -0300
Subject: [PATCH] image-dired: Add extra keybinds for navigation

* lisp/image/image-dired.el (image-dired-thumbnail-mode-map):
Bind previously unused keys for alternative navigation.
---
 lisp/image/image-dired.el | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/lisp/image/image-dired.el b/lisp/image/image-dired.el
index 71c272e4388..b35199c60d4 100644
--- a/lisp/image/image-dired.el
+++ b/lisp/image/image-dired.el
@@ -944,6 +944,15 @@ You probably want to use this together with
 
 (defvar-keymap image-dired-thumbnail-mode-map
   :doc "Keymap for `image-dired-thumbnail-mode'."
+
+  ;; Regular navigation
+  "f"          #'image-dired-forward-image
+  "b"          #'image-dired-backward-image
+  "n"          #'image-dired-next-line
+  "p"          #'image-dired-previous-line
+  "a"          #'image-dired-move-beginning-of-line
+  "e"          #'image-dired-move-end-of-line
+
   "d"          #'image-dired-flag-thumb-original-file
   "<delete>"   #'image-dired-flag-thumb-original-file
   "m"          #'image-dired-mark-thumb-original-file
-- 
2.47.1


                 reply	other threads:[~2025-01-06 20:07 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o70j4sg3.fsf@disroot.org \
    --to=bug-gnu-emacs@gnu.org \
    --cc=75410@debbugs.gnu.org \
    --cc=gabrielsantosdesouza@disroot.org \
    --cc=stefankangas@gmail.com \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.