all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#75410: [PATCH] image-dired: Add extra keybinds for navigation
@ 2025-01-06 20:07 Gabriel Santos via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 0 replies; only message in thread
From: Gabriel Santos via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2025-01-06 20:07 UTC (permalink / raw)
  To: 75410; +Cc: Stefan Kangas

[-- 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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2025-01-06 20:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-06 20:07 bug#75410: [PATCH] image-dired: Add extra keybinds for navigation Gabriel Santos via Bug reports for GNU Emacs, the Swiss army knife of text editors

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.