* bug#12311: 24.1.50; z in special-mode-map
@ 2012-08-30 14:41 Richard Stallman
2012-08-30 15:40 ` Drew Adams
2012-08-30 15:54 ` Stefan Monnier
0 siblings, 2 replies; 4+ messages in thread
From: Richard Stallman @ 2012-08-30 14:41 UTC (permalink / raw)
To: 12311
I just discovered why some of the Dired buffers I always keep
occasionally disappear. It is because the binding of z in
special-mode-map makes it so easy to kill them.
I just got rid of that binding in my .emacs, but I think that binding
is a bad idea. Not all the buffers in special modes are things people
don't mind deleting, and this key can cause annoyance if typed by
accident.
In GNU Emacs 24.1.50.1 (mips64el-unknown-linux-gnu, GTK+ Version 2.12.12)
of 2012-07-31 on chiefs-gnewsense
Bzr revision: 109352 rgm@gnu.org-20120801021420-vmw6vrsr9w2xgkxf
Configured using:
`configure 'CFLAGS=-g -O0' '--with-gif=no' '--with-tiff=no''
Important settings:
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix
default enable-multibyte-characters: t
Major mode: Emacs-Lisp
Minor modes in effect:
shell-dirtrack-mode: t
gpm-mouse-mode: t
tooltip-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
abbrev-mode: t
Recent input:
RET g z C-x b o u t g TAB RET C-g C-h l C-x b o u t
g TAB C-g C-x d o u t g TAB RET C-h c z C-h f d i r
e d - m o r e DEL DEL d e RET C-x o TAB RET C-s k i
l l - t h C-s C-a C-x b . e m a c s RET C-x k RET C-x
C-f . e m a c s RET C-x C-v ESC DEL ESC DEL ESC DEL
ESC DEL RET C-s k i l l - t h ESC < C-x 1 C-s k i l
l - t h C-x b RET ESC < C-s C-s ESC x g r e p RET k
i l l - t h i s - b u f f e r RET ESC x g r e p RET
ESC p SPC * . e l RET C-x o C-u C-n C-n C-n C-n C-n
C-n C-u C-v C-u C-v C-x 1 C-u C-n C-n C-n C-n RET C-x
1 C-a C-u C-p C-u C-p C-p C-p C-p ESC f C-f C-@ C-e
ESC w C-x b . e m a c s RET ESC > RET ( d e f n e DEL
DEL i n e 0 k DEL DEL - k e y SPC C-y C-x 4 b RET C-a
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-x o SPC
" z " SPC n i l ESC DEL u n d e f i n e d ) ESC b '
ESC C-x C-x C-s ESC x r e p o r t SPC e m a s SPC DEL
c s SPC b u g RET
Recent messages:
Mark set
Mark saved where search started
Mark set
Grep finished with no matches found
Grep finished (matches found)
Mark set [4 times]
undefined
Saving file /home/rms/.emacs...
Wrote /home/rms/.emacs
Scanning for dabbrevs...done
Load-path shadows:
None found.
Features:
(ispell byte-opt bytecomp byte-compile cconv macroexp rmailsum
compare-w novice doc-view image-mode arc-mode archive-mode jka-compr
bookmark pp shadow emacsbug edmacro kmacro vc-bzr find-func help-fns
apropos ind-util tabify man parse-time vc-cvs sgml-mode etags
dired-aux cal-china lunar solar cal-dst cal-bahai cal-islam cal-hebrew
holidays hol-loaddefs cal-move cal-menu calendar cal-loaddefs epa-mail
epa derived epg epg-config rmailout rlogin dabbrev misearch
multi-isearch quail help-mode qp mule-util shell pcomplete grep
compile comint ansi-color ring mailalias rmailmm message sendmail
format-spec rfc822 mml easymenu mml-sec mm-decode mm-bodies mm-encode
mailabbrev gmm-utils mailheader mail-parse rfc2231 dired t-mouse
time-date rmailedit rmail rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mail-utils paren cus-start cus-load tooltip ediff-hook
vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list newcomment lisp-mode register page
menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core frame cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer
loaddefs button faces cus-face files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process dbusbind
dynamic-setting system-font-setting font-render-setting move-toolbar
gtk x-toolkit x multi-tty emacs)
--
Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
USA
www.fsf.org www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
Use Ekiga or an ordinary phone call
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#12311: 24.1.50; z in special-mode-map
2012-08-30 14:41 bug#12311: 24.1.50; z in special-mode-map Richard Stallman
@ 2012-08-30 15:40 ` Drew Adams
2012-08-30 15:54 ` Stefan Monnier
1 sibling, 0 replies; 4+ messages in thread
From: Drew Adams @ 2012-08-30 15:40 UTC (permalink / raw)
To: rms, 12311
> I just discovered why some of the Dired buffers I always keep
> occasionally disappear. It is because the binding of z in
> special-mode-map makes it so easy to kill them.
>
> I just got rid of that binding in my .emacs, but I think that binding
> is a bad idea. Not all the buffers in special modes are things people
> don't mind deleting, and this key can cause annoyance if typed by
> accident.
+1
---
FWIW, I have long bound `z' to `diredp-compress-this-file', which is just a
this-file version of `Z' (`dired-do-compress').
(defun diredp-compress-this-file ()
"In Dired, compress or uncompress the file on the cursor line."
(interactive) (dired-do-compress 1))
---
Why do we even bother to have `dired-mode-map' inherit from `special-mode-map'?
These are the only keys from `special-mode-map' that Dired does not already
override:
- and 0-9 negative-argument and digit-argument
? and h describe-mode
g revert-buffer
q quit-window
z kill-this-buffer
(That and the fact that `s-m-m' uses `suppress-keymap'.) And when you consider
that for `g' Dired defines its own `revert-function', there is not a lot that is
really taken from `s-m-m'.
Dired overrides `SPC', `DEL', `>', and `<'. And `h' could also be overridden to
serve a Dired purpose in the future (`h' just duplicates `?').
We might as well just define the keys we want directly in `dired-mode-map' and
call `suppress-keymap' there.
Inheritance is useful if it really saves (factors out) something significant, or
if we want to be able to change something in one place and have that affect
other places. The tradeoff is the extra coupling/dependency - someone changing
`s-m-m' needs to think carefully about how that change might affect each mode
that inherits from it.
In the case of Dired, inheritance of `s-m-m' doesn't offer much, IMHO.
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#12311: 24.1.50; z in special-mode-map
2012-08-30 14:41 bug#12311: 24.1.50; z in special-mode-map Richard Stallman
2012-08-30 15:40 ` Drew Adams
@ 2012-08-30 15:54 ` Stefan Monnier
2012-08-30 23:26 ` Richard Stallman
1 sibling, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2012-08-30 15:54 UTC (permalink / raw)
To: rms; +Cc: 12311
> I just got rid of that binding in my .emacs, but I think that binding
> is a bad idea. Not all the buffers in special modes are things people
> don't mind deleting, and this key can cause annoyance if typed by
> accident.
Feel free to remove it in the trunk, yes.
Stefan
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-08-30 23:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-30 14:41 bug#12311: 24.1.50; z in special-mode-map Richard Stallman
2012-08-30 15:40 ` Drew Adams
2012-08-30 15:54 ` Stefan Monnier
2012-08-30 23:26 ` Richard Stallman
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.