GNU bug report logs -
#38818
Dired: mention deleting buffers, not just windows
Previous Next
Reported by: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Date: Mon, 30 Dec 2019 16:45:02 UTC
Severity: wishlist
Tags: notabug
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #35 received at 38818 <at> debbugs.gnu.org (full text, mbox):
積丹尼 Dan Jacobson <jidanni <at> jidanni.org> writes:
> OK, I'll use
> (add-hook
> 'dired-load-hook
> (function
> (lambda ()
> (load "dired-x")
> (define-key dired-mode-map "q" 'kill-current-buffer)
> )))
> until something more fancy is invented.
Slightly better version:
(add-hook
'dired-load-hook
(defun my-dired-load-hook-fun ()
(require 'dired-x)
(define-key dired-mode-map "q" #'kill-current-buffer)))
-- a named function can't accidentally be added multiple times to a
hook, lambda already self-quotes, and `require' doesn't unnecessarily
reload a file.
BTW, the q binding in dired-mode-map originates from special-mode-map
from which dired-mode-map inherits. These are all bindings that it inherits:
SPC scroll-up-command
- negative-argument
0 .. 9 digit-argument
< beginning-of-buffer
> end-of-buffer
? describe-mode
g revert-buffer
h describe-mode
q quit-window
DEL scroll-down-command
S-SPC scroll-down-command
<remap> Prefix Command
So the q binding is somewhat standard, and other modes may share your
problem.
Ok, I can't help further, I don't want to propose a solution.
Michael.
This bug report was last modified 5 years and 122 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.