bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dired should clear marks after most operations [SUGGESTION]


From: Jonathan LF King
Subject: Re: dired should clear marks after most operations [SUGGESTION]
Date: 14 May 2001 17:05:30 -0400

Dear Emacs Cognoscenti

As a non-cognoscento, I am going to add my voice in agreement with Michael
Downes.  Many in times in dired-mode, I marked a LOT a files for "A"
[dired-do-search], which then found the file I wanted.  At this point I
wanted to decompress it to work on it a bit, hitting "Z", only to discover
a massive (de)compression taking place.

At least from this faux pas I can recover.  From   !rm -rf<RET>
I cannot.  Perhaps Eli is right, perhaps Michael is right, about what is
theoretically "right" in terms of the semiotics of the situation; but I, as
a longtime (but naive) user, have blundered into this time and time again.

==  Suggestion ==========================================================

While not entering in to what might be "right"(er) behavior, I have a
practical suggestion.  May I suggest that 

        dired-do-shell-command

be separated into two commands,

        dired-do-shell-command-at-point
        dired-do-shell-command-on-marked-files-only

and that the default binding of "!" be dired-do-shell-command-at-point.  

This won't protect me from my "Z" haste, but it will help for "!", which is
particularly dangerous¹.  I *think* that my suggestion does not involve any
change in philosophy of dired, and one can continue to discuss the issue of
whether marks ought to auto-disappear after certain operations.

        Sincerely, -Jonathan


Footnote¹: Sure, shell cmds are always potentially dangerous.  The issue
that Michael Downes raises is an additional danger in dired-mode, since
there are two different possible meanings for what the command does.

Indeed, one might argue that the problem with the current semiotics in
dired-mode is that it is "discontinuous" in its argument.  If you mark N
files, and apply command "!", then the command operates on these N files,
and does NOT operator on the file "at point" (unless that file happens to
be marked.)
  WAIT  --STOP THE PRESSES!-- The above is true *unless* N is zero.

I think that I prefer consistent "continuous" behavior, rather than the
convenience of the current behavior --but am not sure.  Perhaps it could
be controlled by a user option.  In any case, my suggestion about splitting
dired-do-shell-command into two cmds sidesteps the philosophic issue.

-- 
Prof. Jonathan LF King    Mathematics dept, Univ. of Florida
<squash@math.ufl.edu>,    <http://www.math.ufl.edu/~squash/>



reply via email to

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