[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Transposing words over middle words
From: |
Drew Adams |
Subject: |
RE: Transposing words over middle words |
Date: |
Fri, 17 Nov 2017 09:26:28 -0800 (PST) |
> > > > C-u 0 M-t works fine.
> > >
> > > BTW, I'd argue that C-u M-t should work as well: currently it is
> treated
> > > like C-u 4 M-t, but I think it's a poor choice.
> >
> > Really? That a lone C-u means an arg of 4 is burnt into our muscle
> > memory for decades. Compare with "C-u C-n". A command that receives
> > a numerical argument normally treats all of its arguments as numbers.
> > Breaking that in a single command sounds like a misfeature.
>
> Org mode (at least) is full of functions for which C-u means change some
> behavior (C-u C-u changes more) and has nothing to do with some magic
> number 4
It's fine for `C-u' to be interpreted numerically (as 4)
by any command. It's also fine for plain `C-u' to have
a different behavior from `C-u 4' or `M-4' for any given
command. As long as the doc string makes the prefix arg
possibilities clear.
The fact that `C-u', when interpreted numerically, is
"burnt into our muscle memory" is important. But it is
only important for commands that interpret the prefix
arg only numerically, and do not interpret plain `C-u'
in some other way.
The ability to provide different behaviors for plain
`C-u', plain `C-u C-u', plain `C-u C-u C-u', and plain
`-' is important - just as important as the ability to
give different behaviors to a numeric prefix arg for
> 0, = 0, < 0, => 0, <= 0 cases.
It is wonderful that Emacs lets a command let users
distinguish `-' from `-1', just as it can let users
distinguish `-1' from `-2'.
This not an argument that commands should always or
often provide many, many alternative behaviors via
a prefix arg. It's an argument that they should be
able to (and they are able to) use all the various
raw prefix-arg possibilities however they want.
There are plenty of commands for which a prefix
arg is not at all used numerically - commands for
which a numeric interpretation has no meaning.
Not all commands are like motion commands such as
`C-n'.
Even commands that can interpret a prefix arg
numerically can sometimes benefit from providing
additional interpretations for plain `C-u' etc.
- Re: Transposing words over middle words, (continued)
- Re: Transposing words over middle words, Stefan Monnier, 2017/11/17
- Re: Transposing words over middle words, Robert Pluim, 2017/11/17
- Re: Transposing words over middle words, Marcin Borkowski, 2017/11/17
- Re: Transposing words over middle words, Eli Zaretskii, 2017/11/17
- Re: Transposing words over middle words, Stefan Monnier, 2017/11/17
- Re: Transposing words over middle words, Emanuel Berg, 2017/11/17
- Message not available
- Re: Transposing words over middle words, Rusi, 2017/11/17
- RE: Transposing words over middle words,
Drew Adams <=
- Re: Transposing words over middle words, Eli Zaretskii, 2017/11/17
- Re: Transposing words over middle words, Stefan Monnier, 2017/11/17
- Re: Transposing words over middle words, Emanuel Berg, 2017/11/17
- Re: Transposing words over middle words, Tomas Nordin, 2017/11/21
- Re: Transposing words over middle words, Arnaldo Mandel, 2017/11/22
- Re: Transposing words over middle words, Emanuel Berg, 2017/11/22
- Re: Transposing words over middle words, Stefan Monnier, 2017/11/22
- Re: Transposing words over middle words, Marcin Borkowski, 2017/11/17
- Re: Transposing words over middle words, Robert Thorpe, 2017/11/18
Re: Transposing words over middle words, Michael Piotrowski, 2017/11/16