unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#12311: (special-mode-map): Delete binding for `z'.
       [not found] ` <363C856A8EDB4545897D760AD952E828@us.oracle.com>
@ 2012-09-02  5:19   ` Sam Steingold
       [not found]   ` <87fw712e87.fsf@gnu.org>
  1 sibling, 0 replies; 3+ 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] 3+ messages in thread

* bug#12311: (special-mode-map): Delete binding for `z'.
       [not found]   ` <87fw712e87.fsf@gnu.org>
@ 2012-09-02 13:39     ` Drew Adams
  2012-09-03  8:09     ` Chong Yidong
  1 sibling, 0 replies; 3+ 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] 3+ messages in thread

* bug#12311: (special-mode-map): Delete binding for `z'.
       [not found]   ` <87fw712e87.fsf@gnu.org>
  2012-09-02 13:39     ` Drew Adams
@ 2012-09-03  8:09     ` Chong Yidong
  1 sibling, 0 replies; 3+ 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] 3+ messages in thread

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

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <87oblp2nfr.fsf@gnu.org>
     [not found] ` <363C856A8EDB4545897D760AD952E828@us.oracle.com>
2012-09-02  5:19   ` bug#12311: (special-mode-map): Delete binding for `z' Sam Steingold
     [not found]   ` <87fw712e87.fsf@gnu.org>
2012-09-02 13:39     ` Drew Adams
2012-09-03  8:09     ` Chong Yidong

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.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).