unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>, emacs-devel@gnu.org
Subject: RE: [found the culprit]
Date: Wed, 14 Nov 2018 11:40:23 -0800 (PST)	[thread overview]
Message-ID: <2e24a1f8-944a-4f04-aa71-491a670a15f5@default> (raw)
In-Reply-To: <jwv36s31rds.fsf-monnier+gmane.emacs.devel@gnu.org>

> > I just mentioned what it uses, and has used for a
> > long time.  And it's a general scheme, applied to `dired-do-*'
> > commands generally.  The conflict is not a minor one, e.g.,
> > affecting just `Z'.
> 
> FWIW, I don't think it's a good scheme.

And I (who use it) think it's a good scheme. ;-)

> Better would have more mark-management commands that
> you can then combine with any dired command

We already have great mark-management commands,
including the ability to define multiple sets of
files using different marks (not-known-well-enough
key `* c').

> without having to fight with conflicting uses of C-u.

There's no fight with conflicting uses of `C-u'.
I already explained that it fits well with the
existing prefix arg use for `dired-do-*'.  It
only interprets multiple plain `C-u' specially.

Do you really think that someone needs to rely on
being able to use `C-u C-u C-u' to specify the
current file, instead of just `C-u'?  That makes
no sense to me.

> E.g. commands to "push" and "pop" the current set of marked files,

See `* c'.  I'm guessing that that's the kind of
thing you're aiming for.  But it's more general
than just a stack: direct access to anywhere in
the "stack", to change any set of markings to
another, anytime.

> and a command that you can iterate like your C-u which will first mark
> the current file, then the files in the current directory, then ...
> A nice advantage to C-u is that these would give you visual feedback
> about which files are selected.

So you in fact propose a completely different
use of `C-u' from what Emacs has always used
for `dired-do-*'.  Talk about fighting with
conflicting uses of `C-u'!  That retains
nothing of what we have now wrt a prefix arg.

Anyway, if that's what you want for vanilla
Emacs, go for it.

> > 2. How does the above C-u usage "not follow
> >    Emacs's use of C-u"?
> 
> Emacs usually does not use multiple C-u

"Usually does not use" does not mean that using
multiple `C-u' does not follow Emacs's use of
`C-u'.  Not in the sense of some prescribed use,
in any case.

Emacs usually does not distinguish plain `C-u' from
numeric use.  It doesn't usually do so because
usually - for most commands - there is only one
prefix-arg behavior.  (Actually zero, for most.)

It would be silly to suppose that there were some
unwritten "rule" that "Emacs use" is to not use
prefix args, just because most commands don't use
a prefix arg.  Same thing for a command recognizing
different kinds of prefix arg: don't confuse
frequency of use with prescription of whether or
not to use.

> and also tries to avoid
> distinguishing between "just C-u" and "a numeric
> argument".

I see no indication that Emacs avoids that.  Just
because most commands offer only one prefix-arg
behavior, and so there is no need to distinguish,
that doesn't mean that there is an unwritten
convention to avoid such distinction.

And if there were such a convention (preferably
written), I'd oppose it - but that's just me.
I think the existence of the prefix-arg "feature"
is a good thing.  If it didn't exist it would be
good to invent it.  Same thing for the various
different kinds of prefix arg - I'm thankful for
them.  (I sometimes even wish there were more.)

> There are exceptions to both of those "rules",

I don't agree that there any such rules.  There
are just commands that do not (yet) offer more
than one behavior.  Lots of them.  So what?

And I don't think Emacs should have such "rules".
On the contrary, I think there are many commands
that could benefit from adding alternative
behaviors by way of a prefix arg.  As opposed,
for example, to adding lots of additional key
bindings.

Give me one command and key binding for a related
set of operations, some of which I use much less
often, rather than N commands, bound to N keys,
with N doc strings that are similar but subtly
different ... for the same set of behaviors as
that one key with prefix-arg possibilities.

Saves keys, puts less-used behaviors on slightly
more cumbersome bindings (you have to use a prefix
arg for them), groups related behaviors on similar
keys, facilitates discoverability and recall...

> and I'm to blame for some of those
> exceptions, but I think this case is not a good candidate for an
> exception because there are too many "sets of files" that the user
> might like to specify, so we'll be better served by providing this separately
> than trying to cleverly cram some common cases into the narrow C-u.

It's OK to disagree. ;-)  If I thought there were
other, more common sets of files that users typically
want to act on with Dired then I'd no doubt use
those sets instead.

These are the most common sets that I, at least, want
to act on - they are all ways of acting on "all" files.

Such cases are about as important to me as the case of
wanting to act on just the current-line file.  Just like
that special case (yes, yet another special prefix-arg
case that is built into Emacs), it's about being able
to act on files while ignoring (and so not needing to
change and restore) the current markings.

I'll add this, which you might or might not agree might
be relevant: you've said in the past that you don't
even use Dired, or at least that you don't use it much.

(That doesn't in any way invalidate your arguments,
either about acting on files in Dired or about the
prefix arg in general.)



  reply	other threads:[~2018-11-14 19:40 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-13 13:18 tgz extension and dired-do-compress Uwe Brauer
2018-11-13 17:31 ` Eli Zaretskii
2018-11-13 18:15   ` Uwe Brauer
2018-11-14 12:07   ` [emacs -q versus empty .emacs file] (was: tgz extension and dired-do-compress) Uwe Brauer
2018-11-14 12:12     ` [found the culprit] (was: [emacs -q versus empty .emacs file]) Uwe Brauer
2018-11-14 13:15       ` Noam Postavsky
2018-11-14 13:50         ` [found the culprit] Uwe Brauer
2018-11-14 15:43       ` [found the culprit] (was: [emacs -q versus empty .emacs file]) Eli Zaretskii
2018-11-14 15:49         ` [found the culprit] Uwe Brauer
2018-11-14 16:09           ` Eli Zaretskii
2018-11-14 16:39         ` Stefan Monnier
2018-11-14 16:57           ` Uwe Brauer
2018-11-14 17:31             ` Drew Adams
2018-11-14 18:20               ` Stefan Monnier
2018-11-14 19:58                 ` Drew Adams
2018-11-14 20:24                 ` Eli Zaretskii
2018-11-14 20:43                   ` Stefan Monnier
2018-11-14 19:59           ` Eli Zaretskii
2018-11-14 20:38             ` Stefan Monnier
2018-11-14 21:01               ` jpff
2018-11-16  6:45                 ` Van L
2018-11-16  0:51         ` [found the culprit] (was: [emacs -q versus empty .emacs file]) Richard Stallman
2018-11-14 12:21     ` [emacs -q versus empty .emacs file] (was: tgz extension and dired-do-compress) Alan Mackenzie
2018-11-14 13:16       ` [emacs -q versus empty .emacs file] Uwe Brauer
     [not found]     ` <<87tvkjq2mh.fsf_-_@mat.ucm.es>
     [not found]       ` <<834lcj8y1f.fsf@gnu.org>
2018-11-14 16:17         ` [found the culprit] (was: [emacs -q versus empty .emacs file]) Drew Adams
2018-11-14 16:37           ` Eli Zaretskii
2018-11-14 16:48             ` [found the culprit] Stefan Monnier
2018-11-14 17:22               ` Drew Adams
2018-11-14 18:03                 ` Stefan Monnier
2018-11-14 19:40                   ` Drew Adams [this message]
2018-11-14 20:33           ` Davis Herring
2018-11-14 21:21             ` Drew Adams
2018-11-15  2:34             ` Mike Kupfer
2018-11-16  0:55               ` Richard Stallman
2018-11-16  2:24                 ` Clément Pit-Claudel
2018-11-16  7:48                   ` Eli Zaretskii
2018-11-16 13:04                     ` Stefan Monnier
2018-11-16 22:59                     ` Richard Stallman
2018-11-16 16:17                   ` Drew Adams
2018-11-16 23:01                     ` Richard Stallman
2018-11-17  8:04                       ` Yuri Khan
2018-11-18  0:24                         ` Richard Stallman
2018-11-17  1:05                     ` Clément Pit-Claudel
2018-11-16 23:01                   ` Richard Stallman
2018-11-17  7:42                     ` Yuri Khan
2018-11-15  4:57           ` [found the culprit] (was: [emacs -q versus empty .emacs file]) Yuri Khan
2018-11-15  9:46             ` [found the culprit] Andreas Schwab
2018-11-15 15:21               ` Yuri Khan
     [not found]     ` <<<87tvkjq2mh.fsf_-_@mat.ucm.es>
     [not found]       ` <<<834lcj8y1f.fsf@gnu.org>
     [not found]         ` <<f0a3a374-d8ac-45b6-8de6-0e8ccc0ea696@default>
     [not found]           ` <<83y39v7gym.fsf@gnu.org>
2018-11-14 17:10             ` [found the culprit] (was: [emacs -q versus empty .emacs file]) Drew Adams
     [not found] <<875zx1xgiq.fsf@mat.ucm.es>
     [not found] <<<875zx1xgiq.fsf@mat.ucm.es>

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2e24a1f8-944a-4f04-aa71-491a670a15f5@default \
    --to=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).