all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* (special-mode-map): Delete binding for `z'.
@ 2012-09-02  2:00 Sam Steingold
  2012-09-02  2:26 ` Chong Yidong
  2012-09-02  2:38 ` Drew Adams
  0 siblings, 2 replies; 7+ messages in thread
From: Sam Steingold @ 2012-09-02  2:00 UTC (permalink / raw)
  To: emacs-devel

What is the rationale for this change?
I use this all the time in buffers like *Help*, *Dired* &c.
How is a ding more valuable than a useful behavior?
What am I supposed to use instead? C-u q?

2012-08-30  Richard Stallman  <rms@gnu.org>

	* simple.el (special-mode-map): Delete binding for `z'.


-- 
Sam Steingold (http://sds.podval.org/) on Ubuntu 12.04 (precise) X 11.0.11103000
http://www.childpsy.net/ http://honestreporting.com http://www.memritv.org
http://iris.org.il http://thereligionofpeace.com http://memri.org
He who laughs last thinks slowest.




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: (special-mode-map): Delete binding for `z'.
  2012-09-02  2:00 (special-mode-map): Delete binding for `z' Sam Steingold
@ 2012-09-02  2:26 ` Chong Yidong
  2012-09-02  2:38 ` Drew Adams
  1 sibling, 0 replies; 7+ messages in thread
From: Chong Yidong @ 2012-09-02  2:26 UTC (permalink / raw)
  To: sds; +Cc: emacs-devel

Sam Steingold <sds@gnu.org> writes:

> What is the rationale for this change?
> I use this all the time in buffers like *Help*, *Dired* &c.
> How is a ding more valuable than a useful behavior?
> What am I supposed to use instead? C-u q?

See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=12311

The reported problem was that "z" is easy to accidentally type.  You can
just type C-x k RET to kill these buffers, like any other buffer.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: (special-mode-map): Delete binding for `z'.
  2012-09-02  2:00 (special-mode-map): Delete binding for `z' Sam Steingold
  2012-09-02  2:26 ` Chong Yidong
@ 2012-09-02  2:38 ` Drew Adams
  2012-09-02  5:19   ` Sam Steingold
  2012-09-02  5:19   ` Sam Steingold
  1 sibling, 2 replies; 7+ messages in thread
From: Drew Adams @ 2012-09-02  2:38 UTC (permalink / raw)
  To: sds, emacs-devel

> What is the rationale for this change?

Not needed?  Error prone?  Could be used for something more useful/appropriate?

This was the reason RMS gave (bug thread #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.

> I use this all the time in buffers like *Help*, 

Why bother to kill *Help*?  Why do that rather than `q'?

> *Dired* &c.  What am I supposed to use instead? C-u q?

Sure, why not?  Or `q' if you don't need to kill it.
Or `C-x v' if you want to replace it.

You want to kill Dired but you don't want to use `C-u q'.
OK, so bind `z' to killing once again if you want to.

Or is it about other special-mode buffers?  That's the useful question, to me.
I would say forget about *Help* (which doesn't need to be killed) and Dired
(which you sometimes don't want to kill).

But are there special-mode buffers where `z' killing the buffer is really
useful?  If so, then maybe the fix was too heavy-handed.

> How is a ding more valuable than a useful behavior?

Killing the buffer is not the only or the most useful behavior `z' could have in
Dired.  Dired is a rich mode with lots of keys already taken and with plenty of
commands that could be bound to keys.

Whether `z' should be bound to killing the buffer in `special-mode-map' is a
different question.  RMS's fix was to remove that binding.

I argued instead that Dired should not inherit from `special-mode-map' - it
should just define the few keys from `s-m-m' that it needs.

The question really is whether the binding of `z' makes sense for special modes
in general (e.g., beyond *Help* and Dired).  RMS apparently thinks not.  But the
problem (annoyance) he reported was really about Dired.

[Followup should really be in the bug thread, BTW.
Moving it here means people can miss that discussion:
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=12311.]




^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#12311: (special-mode-map): Delete binding for `z'.
  2012-09-02  2:38 ` Drew Adams
  2012-09-02  5:19   ` Sam Steingold
@ 2012-09-02  5:19   ` Sam Steingold
  1 sibling, 0 replies; 7+ messages in thread
From: Sam Steingold @ 2012-09-02  5:19 UTC (permalink / raw)
  To: Drew Adams; +Cc: 12311

The following message is a courtesy copy of an article
that has been posted to gmane.emacs.devel as well.

> * Drew Adams <qerj.nqnzf@benpyr.pbz> [2012-09-01 19:38:28 -0700]:
>
>> I use this all the time in buffers like *Help*, 
>
> Why bother to kill *Help*?  Why do that rather than `q'?

because 'q' will eventually start showing old *Help* buffers.
because 'q' deletes the window which I want to keep.

>> *Dired* &c.  What am I supposed to use instead? C-u q?
>
> Sure, why not?  Or `q' if you don't need to kill it.

because C-u q is two keystrokes; quite often I keep hitting 'z' until I
get to a buffer where z self-inserts.

> Or `C-x v' if you want to replace it.

C-x v is the vc prefix for me.

> You want to kill Dired but you don't want to use `C-u q'.
> OK, so bind `z' to killing once again if you want to.

the question is whether this is a generally useful binding.
I think it is.

> Or is it about other special-mode buffers?  That's the useful question, to me.
> I would say forget about *Help* (which doesn't need to be killed) and Dired
> (which you sometimes don't want to kill).
>
> But are there special-mode buffers where `z' killing the buffer is really
> useful?  If so, then maybe the fix was too heavy-handed.

I don't think special-mode buffers are "precious" - they are easily
restored, so killing them accidentally should not be a problem.
Apparently others disagree.

>> How is a ding more valuable than a useful behavior?
>
> Killing the buffer is not the only or the most useful behavior `z'
> could have in Dired.  Dired is a rich mode with lots of keys already
> taken and with plenty of commands that could be bound to keys.

So bind it in dired mode. The change affects all the other special modes!


-- 
Sam Steingold (http://sds.podval.org/) on Ubuntu 12.04 (precise) X 11.0.11103000
http://www.childpsy.net/ http://dhimmi.com http://truepeace.org
http://think-israel.org http://pmw.org.il http://mideasttruth.com
Do the arithmetic or be doomed to talk nonsense. --John McCarthy





^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: (special-mode-map): Delete binding for `z'.
  2012-09-02  2:38 ` Drew Adams
@ 2012-09-02  5:19   ` Sam Steingold
  2012-09-02 13:39     ` bug#12311: " Drew Adams
  2012-09-03  8:09     ` Chong Yidong
  2012-09-02  5:19   ` Sam Steingold
  1 sibling, 2 replies; 7+ messages in thread
From: Sam Steingold @ 2012-09-02  5:19 UTC (permalink / raw)
  To: emacs-devel; +Cc: 12311

> * Drew Adams <qerj.nqnzf@benpyr.pbz> [2012-09-01 19:38:28 -0700]:
>
>> I use this all the time in buffers like *Help*, 
>
> Why bother to kill *Help*?  Why do that rather than `q'?

because 'q' will eventually start showing old *Help* buffers.
because 'q' deletes the window which I want to keep.

>> *Dired* &c.  What am I supposed to use instead? C-u q?
>
> Sure, why not?  Or `q' if you don't need to kill it.

because C-u q is two keystrokes; quite often I keep hitting 'z' until I
get to a buffer where z self-inserts.

> Or `C-x v' if you want to replace it.

C-x v is the vc prefix for me.

> You want to kill Dired but you don't want to use `C-u q'.
> OK, so bind `z' to killing once again if you want to.

the question is whether this is a generally useful binding.
I think it is.

> Or is it about other special-mode buffers?  That's the useful question, to me.
> I would say forget about *Help* (which doesn't need to be killed) and Dired
> (which you sometimes don't want to kill).
>
> But are there special-mode buffers where `z' killing the buffer is really
> useful?  If so, then maybe the fix was too heavy-handed.

I don't think special-mode buffers are "precious" - they are easily
restored, so killing them accidentally should not be a problem.
Apparently others disagree.

>> How is a ding more valuable than a useful behavior?
>
> Killing the buffer is not the only or the most useful behavior `z'
> could have in Dired.  Dired is a rich mode with lots of keys already
> taken and with plenty of commands that could be bound to keys.

So bind it in dired mode. The change affects all the other special modes!


-- 
Sam Steingold (http://sds.podval.org/) on Ubuntu 12.04 (precise) X 11.0.11103000
http://www.childpsy.net/ http://dhimmi.com http://truepeace.org
http://think-israel.org http://pmw.org.il http://mideasttruth.com
Do the arithmetic or be doomed to talk nonsense. --John McCarthy




^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#12311: (special-mode-map): Delete binding for `z'.
  2012-09-02  5:19   ` Sam Steingold
@ 2012-09-02 13:39     ` Drew Adams
  2012-09-03  8:09     ` Chong Yidong
  1 sibling, 0 replies; 7+ messages in thread
From: Drew Adams @ 2012-09-02 13:39 UTC (permalink / raw)
  To: 12311

> > Or `C-x v' if you want to replace it.
> 
> C-x v is the vc prefix for me.

I meant C-x C-v.

> > But are there special-mode buffers where `z' killing the 
> > buffer is really useful?  If so, then maybe the fix was
> > too heavy-handed.
> 
> I don't think special-mode buffers are "precious" - they are easily
> restored, so killing them accidentally should not be a problem.
> Apparently others disagree.

I don't necessarily disagree, for one.

Richard's point was that not all special-mode buffers are non-precious.  Your
point is that not all special-mode buffers are precious.

My point was about Dired (only): to not have Dired inherit from
special-mode-map.  The problem was expressed in terms of Dired mode.  But the
fix was to special-mode-map.

So far, the only special-mode buffers mentioned have been *Help* and Dired.  To
me, *Help* is far from precious and Dired is one where I agree with Richard that
you don't want to be accidentally killing the buffer.

I can't speak to what is most appropriate for special mode in general.  My point
was about Dired, where I agree with Richard about the annoyance/problem, but I
don't agree about the wider-ranging fix.

> > Killing the buffer is not the only or the most useful behavior `z'
> > could have in Dired.  Dired is a rich mode with lots of keys already
> > taken and with plenty of commands that could be bound to keys.
> 
> So bind it in dired mode. The change affects all the other 
> special modes!

That is what I proposed: separate Dired from special-mode.






^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#12311: (special-mode-map): Delete binding for `z'.
  2012-09-02  5:19   ` Sam Steingold
  2012-09-02 13:39     ` bug#12311: " Drew Adams
@ 2012-09-03  8:09     ` Chong Yidong
  1 sibling, 0 replies; 7+ messages in thread
From: Chong Yidong @ 2012-09-03  8:09 UTC (permalink / raw)
  To: 12311

Sam Steingold <sds@gnu.org> writes:

> because 'q' will eventually start showing old *Help* buffers.
> because 'q' deletes the window which I want to keep.

The first point seems irrelevant; `q' should only show old buffers if
there is nothing better to show.

As for the second, we could add a defcustom to prevent `quit-window'
from deleting windows; would that be suitable for your usage?

> I don't think special-mode buffers are "precious" - they are easily
> restored, so killing them accidentally should not be a problem.
> Apparently others disagree.

One example of a special buffer which may be annoying to accidentally
delete is a *Packages* buffer, whose contents are fetched over a
network.  Similarly with a non-DVCS VC-Dir buffer.  But these are
personal value judgements, a.k.a. bikeshedding.  There are two simple
solutions:

  (define-key special-mode-map "z" ...)

or

  C-x k RET

Emacs should strive to present a consistent user interface, so it's good
for special buffers to share as many keybindings as possible, when it
comes to basic operations like dismissal.  That's why we've worked hard
to make these buffers use `q' (`quit-window').  In that context, it's
unacceptable to provide `z' for buffer-killing in some special buffers
but not others, for such a fuzzy reason as "precious" vs "non-precious".





^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-09-03  8:09 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-02  2:00 (special-mode-map): Delete binding for `z' Sam Steingold
2012-09-02  2:26 ` Chong Yidong
2012-09-02  2:38 ` Drew Adams
2012-09-02  5:19   ` Sam Steingold
2012-09-02 13:39     ` bug#12311: " Drew Adams
2012-09-03  8:09     ` Chong Yidong
2012-09-02  5:19   ` Sam Steingold

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.