emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Kepa <gnu.cognition199@slmails.com>
To: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: Orgmode keybindings in Dired?
Date: Sun, 25 Aug 2024 01:22:23 +0200	[thread overview]
Message-ID: <172454174968.7.5350852330388450305.414833657@slmails.com> (raw)

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

> From:     Fraga, Eric
> Subject:     Re: Orgmode keybindings in Dired?
> Date:     Fri, 23 Aug 2024 12:51:32 +0000
> User-agent:     gnus (Emacs 31.0.50)
>
> Response below/inline for email Kepa wrote:
> > (original email sent 22 Aug 2024 at 18:27)
> > I'm starting to use Dired and I like it.
>
> dired is an excellent tool!
>
> > I would like to know your opinion, fellow orgmode users about
> > keybindings in Dired:
> > Is it worth modifying Dired's keybindings to match those of Org-mode?
>
> What exactly are you imagining?  org mode keybindings make sense within
> an org file.  I'm not sure what you expect to do in a dired buffer that
> would use org mode keybindings?
>
> Having said that, I do use org-store-link (globally bound to C-c l) all
> the time in dired buffers.
>
> -- 
> : Eric S Fraga, with org 9.7.10-5ebd97 in Emacs 31.0.50

By the way, Eric, thanks for your tip. I probably wouldn't found that 
org-store-link can be used in Dired. Combined with org-super-links and 
org-open-at-point, it makes it joyful.

You asked about what was I imagining, so I will share the configuration 
I have finished with (by now).

My imagination goes beyond, though, like using "r" and "l" to "move" 
subdirectories one level down or up. Although maybe I would never use 
it. As said, the keybindings I am using in Dired, inspired many of them 
by org-mode keybindings:

;; Bind 'TAB' to toggle subtree visibility (cycle through subdirectories)
(with-eval-after-load 'dired
   (define-key dired-mode-map (kbd "TAB") 'dired-subtree-cycle))

;; Create a new directory (similar to 'M-RET' in Org-mode)
   ;; Existing Dired keybinding: '+' is used for 'dired-create-directory'
   ;; New keybinding: 'M-RET'
(define-key dired-mode-map (kbd "M-RET") 'dired-create-directory)

;; (org-speed-move-safe 'outline-up-heading) (similar to 'u' in Org-mode 
for dired-subtree-up)
   ;; Existing Dired keybinding: 'u' for dired-unmark
(define-key dired-mode-map (kbd "u") 'dired-subtree-up)

  ;; Bind 's' to narrow the view to the current subdirectory
(define-key dired-mode-map (kbd "s") 'dired-subtree-narrow)

(define-key dired-mode-map (kbd "U") 'dired-unmark)
(define-key dired-mode-map (kbd "C-g") 'dired-unmark-all-marks)
(define-key dired-mode-map (kbd "N") 'dired-next-line)
(define-key dired-mode-map (kbd "C-<return>") 'dired-w32explore)

[-- Attachment #2: Type: text/html, Size: 3353 bytes --]

             reply	other threads:[~2024-08-24 23:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-24 23:22 Kepa [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-08-22 18:27 Orgmode keybindings in Dired? Kepa
2024-08-23 12:51 ` Fraga, Eric
     [not found] ` <87o75jstll.fsf@mbork.pl>
2024-08-23 14:40   ` Kepa

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.orgmode.org/

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

  git send-email \
    --in-reply-to=172454174968.7.5350852330388450305.414833657@slmails.com \
    --to=gnu.cognition199@slmails.com \
    --cc=emacs-orgmode@gnu.org \
    /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/org-mode.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).