emacs-devel
[Top][All Lists]
Advanced

[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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]