[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: CUA mode's C-RET binding
From: |
Manoj Srivastava |
Subject: |
Re: CUA mode's C-RET binding |
Date: |
Wed, 12 Mar 2008 12:30:56 -0500 |
User-agent: |
Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.60 (gnu/linux) (x86_64-unknown-linux-gnu) |
On Wed, 12 Mar 2008 11:12:05 -0400, Richard Stallman <address@hidden> said:
> A more plausible scenario is if I have recently run "rm -rf
> .",
> in a directory where that was appropriate. Now I have cd'd to a
> different directory (perhaps even my home directory), where
> executing that command could do damage.
> Yes, it could. But what can we do about that rare case without
> causing lots and lots of hassles in more common cases?
The shell that I occassionally use, zsh, has an optional
mechanism that intercepts "rm -rf *", and asks a y-or-n-p kind of
question, *but* (and this is critical) -- adds a 10 second window where
keystrokes are ignored. I like that feature, it makes me take a time
out, think about what I am doing, and prevents my fingers from learning
"rm -rf *<RET>y<RET>" as the sequence to use.
Could this be a useful model for emacs as well?
manoj
from the zsh manual page:
RM_STAR_SILENT (-H) <K> <S>
Do not query the user before executing ‘rm *’ or ‘rm path/*’.
RM_STAR_WAIT
If querying the user before executing ‘rm *’ or ‘rm path/*’,
first wait ten seconds and ignore anything typed in that time.
This avoids the problem of reflexively answering ‘yes’ to the
query when one didn’t really mean it. The wait and query can
always be avoided by expanding the ‘*’ in ZLE (with tab).
--
A chicken is an egg's way of producing more eggs.
Manoj Srivastava <address@hidden> <http://www.golden-gryphon.com/>
1024D/BF24424C print 4966 F272 D093 B493 410B 924B 21BA DABB BF24 424C
- RE: CUA mode's C-RET binding [was: position on changing defaults?], (continued)
- RE: CUA mode's C-RET binding [was: position on changing defaults?], Drew Adams, 2008/03/09
- Re: CUA mode's C-RET binding [was: position on changing defaults?], Mathias Dahl, 2008/03/10
- Re: CUA mode's C-RET binding [was: position on changing defaults?], Lennart Borgman (gmail), 2008/03/10
- Re: CUA mode's C-RET binding [was: position on changing defaults?], Johan Bockgård, 2008/03/10
- Re: CUA mode's C-RET binding [was: position on changing defaults?], Lennart Borgman (gmail), 2008/03/10
- Re: CUA mode's C-RET binding [was: position on changing defaults?], Juri Linkov, 2008/03/10
- Re: CUA mode's C-RET binding [was: position on changing defaults?], Richard Stallman, 2008/03/11
- Re: CUA mode's C-RET binding, Manoj Srivastava, 2008/03/11
- Re: CUA mode's C-RET binding, Juri Linkov, 2008/03/11
- Re: CUA mode's C-RET binding, Richard Stallman, 2008/03/12
- Re: CUA mode's C-RET binding,
Manoj Srivastava <=
- Dangerous shell commands? (was: CUA mode's C-RET binding), Reiner Steib, 2008/03/12
- Re: Dangerous shell commands?, David Kastrup, 2008/03/12
- Re: Dangerous shell commands?, Manoj Srivastava, 2008/03/12
- Re: CUA mode's C-RET binding [was: position on changing defaults?], Mathias Dahl, 2008/03/11
- RE: CUA mode's C-RET binding [was: position on changing defaults?], Drew Adams, 2008/03/11
- Re: CUA mode's C-RET binding [was: position on changing defaults?], Mathias Dahl, 2008/03/13
- RE: CUA mode's C-RET binding [was: position on changing defaults?], Drew Adams, 2008/03/13
- Re: position on changing defaults?, Richard Stallman, 2008/03/11
- Re: position on changing defaults?, Kim F. Storm, 2008/03/08
- Re: position on changing defaults?, Stefan Monnier, 2008/03/08