unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: rms@gnu.org
Cc: michael.albinus@gmx.de, eliz@gnu.org, fgunbin@fastmail.fm,
	emacs-devel@gnu.org
Subject: RE: Introducing thread-safe Tramp
Date: Sun, 5 Aug 2018 08:36:23 -0700 (PDT)	[thread overview]
Message-ID: <39939ea5-a7c2-400a-9ac1-4df7cf4fcb42@default> (raw)
In-Reply-To: <E1fm8KL-0001B7-Fl@fencepost.gnu.org>

>  > Even `C-u' (`universal-argument') is not a prefix argument. It is a command
>  > that begins reading a prefix argument and that, possibly together with other
> > commands (such as `digit-argument') provides that prefix argument to a
> > followup command.
> 
> We think of C-u as beginning a prefix argument, without exception.
> Sometimes the prefix argument consists of C-u and nothing but C-u.

If your point is that my "possibly" needs to be scoped only to the "other commands", and that `C-u' _always_ provides a prefix arg, even when alone, then yes, of course - that's what I meant for the scope of the "possibly".

My point was really that `C-u' is a key sequence, not a prefix argument.

`C-u', along with other prefix-arg forming keys (e.g., digits) provides a prefix argument to a command. I don't see those keys as _being_ a prefix argument. But sure, the two could be identified to some extent, when speaking loosely.

The doc describes/defines "raw prefix argument" and "numeric prefix argument", which is the "numeric value" of the raw prefix argument. Those are Lisp values, which include conses, atoms like `-', and integers. They are not key sequences.

When talking about the key sequences, we (I, at least) distinguish "plain `C-u'", which provides a prefix arg of `(4)', double plain `C-u', which provides an arg of `(16)', and so on. Other key sequences provide different raw prefix args.

I think it could make sense to speak of `C-u', `C-u C-u', `C-u 3 4', `M--', etc. as "prefix-arg key sequences" or "prefix arg-providing key sequences" or some such. But I think it would be misleading (except perhaps in certain contexts where the difference was already made clear) to speak of them as "prefix arguments".

Just one opinion.

> However, I agree it is clearest NOT to think of C-x RET c
> as a prefix argument.  The prefix argument is a specific kind of value
> and that is not how C-x RET c works.

Yes. And in particular (IMO, at least), a prefix arg is a Lisp value - just one of those values documented as such, which doesn't include (so far) any key-sequence Lisp values.

I'm not trying to be pedantic. I think it helps users to keep the terminology clear, here. 

It's OK with me if someone providing help to another says, e.g., "use a plain prefix arg to do XYZ", meaning "use plain `C-u' to do XYZ". That's fine, as long as both understand what is meant. 

But I don't think the Emacs doc should talk that way, in general. It's better for the doc to keep these things separate - key sequences are not prefix args.

And wrt this discussion, `C-x RET c' is neither a prefix argument nor a key sequence that provides a prefix arg. IIUC, it has nothing to do with a prefix arg. It is _not_ like `C-u' or `M--'.

At most, `C-x RET c' could be said to be a key sequence that always precedes (is always followed by) another key sequence, which it reads. 

It's not a _prefix key_, because it's not bound to a keymap. The key sequence that follows it is not looked up in a map that `C-x RET c' is bound to. Instead, that following key sequence is read by the command bound to `C-x RET c', and then invoked. (And `C-x RET c' can set some context for that following command - bind variables or whatever.)

It's the behavior of a key sequence such as `C-x RET c' (or rather its command) that's being discussed here. AFAIK, we don't have a name for such key sequences/commands/behavior. Until now, the only instance of such a thing (AFAIK) was `C-x RET c'. Now there might be a second: `C-x &'.

Is it perhaps time to come up with some terminology/concepts for this, and to document it?

And maybe to come up with some constructs that make defining such key sequences/commands/behavior easier for users?

 We added `define-minor-mode' to capture the programming cliche of defining a minor mode. Perhaps something like that could help here. Dunno whether it would be jumping the gun or overkill to do that now, since there has been so little use of the cliche, so far. (I.e., unlike defining a minor mode, it's not really a cliche yet - just a rarely used technique.)



  parent reply	other threads:[~2018-08-05 15:36 UTC|newest]

Thread overview: 125+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-23 15:58 Introducing thread-safe Tramp Michael Albinus
2018-07-23 16:06 ` Eli Zaretskii
2018-07-23 16:11   ` Michael Albinus
2018-07-23 16:37     ` Eli Zaretskii
2018-07-23 16:55       ` Michael Albinus
2018-07-24  8:25 ` Ken Raeburn
2018-07-24 12:52   ` Michael Albinus
2018-07-24 13:20     ` martin rudalics
2018-07-25  9:51       ` Michael Albinus
2018-07-25 14:44         ` Eli Zaretskii
2018-07-25 17:32           ` Eli Zaretskii
2018-07-25 17:53             ` Michael Albinus
2018-07-26  7:56             ` martin rudalics
2018-07-26  8:14               ` Michael Albinus
2018-07-26  9:02                 ` martin rudalics
2018-07-26 17:24               ` Eli Zaretskii
2018-07-24 15:06     ` Drew Adams
2018-07-25  9:46       ` Michael Albinus
2018-07-25 11:54         ` Phil Sainty
2018-07-25 12:14           ` Andreas Schwab
2018-07-25 13:02           ` Michael Albinus
2018-07-25 13:31             ` Robert Pluim
2018-07-27 15:05               ` Michael Albinus
2018-08-01 16:27                 ` Robert Pluim
2018-08-01 21:28                   ` Michael Albinus
2018-07-27 19:04         ` Filipp Gunbin
2018-07-27 19:42           ` Michael Albinus
2018-07-28  0:14             ` Filipp Gunbin
2018-07-28  7:01               ` Eli Zaretskii
2018-07-28  9:48             ` Michael Albinus
2018-07-29 18:29               ` Drew Adams
2018-07-30  8:44                 ` Michael Albinus
2018-07-30 14:23                   ` Eli Zaretskii
2018-08-04 12:47                     ` Michael Albinus
2018-08-04 12:49                       ` Michael Albinus
2018-08-04 15:00                         ` Eli Zaretskii
2018-08-04 15:12                           ` Michael Albinus
2018-08-04 15:43                             ` Eli Zaretskii
2018-08-04 15:58                               ` Michael Albinus
2018-08-04 16:11                                 ` Eli Zaretskii
2018-08-04 16:18                                   ` Michael Albinus
2018-08-04 16:58                                     ` Eli Zaretskii
2018-08-04 17:29                                       ` Michael Albinus
2018-08-04 18:34                                         ` Eli Zaretskii
2018-08-05  9:51                                           ` Michael Albinus
2018-08-05 15:06                                             ` Eli Zaretskii
2018-08-06 10:54                                               ` Michael Albinus
2018-08-06 14:55                                                 ` Drew Adams
2018-08-06 15:25                                                   ` C-x & (was: Introducing thread-safe Tramp) Michael Albinus
2018-08-06 17:59                                                     ` Drew Adams
2018-08-06 19:17                                                       ` C-x & Michael Albinus
2018-08-06 20:57                                                         ` Drew Adams
2018-08-06 23:16                                                           ` Drew Adams
2018-08-07  7:05                                                             ` Michael Albinus
2018-08-07  7:01                                                           ` Michael Albinus
2018-08-06 15:48                                                   ` Introducing thread-safe Tramp Stefan Monnier
2018-08-06 15:24                                                 ` Eli Zaretskii
2018-08-06 15:29                                                   ` C-x & (was: Introducing thread-safe Tramp) Michael Albinus
2018-08-06 18:32                                                 ` Introducing thread-safe Tramp Filipp Gunbin
2018-08-07 14:20                                                   ` Michael Albinus
2018-08-07 14:53                                                     ` Stephen Berman
2018-08-07 15:02                                                       ` Robert Pluim
2018-08-07 15:06                                                         ` Stephen Berman
2018-08-07 16:00                                                           ` Michael Albinus
2018-08-07 15:58                                                         ` Michael Albinus
2018-08-07 15:33                                                       ` Drew Adams
2018-08-07 16:01                                                         ` Michael Albinus
2018-08-07 16:12                                                         ` Drew Adams
2018-08-07 16:18                                                           ` Michael Albinus
2018-08-07 15:56                                                       ` Michael Albinus
2018-08-07 16:24                                                         ` Eli Zaretskii
2018-08-07 16:30                                                           ` Michael Albinus
2018-08-07 15:56                                                     ` Eli Zaretskii
2018-08-07 16:09                                                       ` Michael Albinus
2018-08-07 16:23                                                         ` Drew Adams
2018-08-07 16:46                                                           ` Drew Adams
2018-08-07 16:54                                                             ` Michael Albinus
2018-08-07 17:11                                                             ` Eli Zaretskii
2018-08-08  8:18                                                           ` Michael Albinus
2018-08-08 19:01                                                     ` Filipp Gunbin
2018-08-08 20:52                                                       ` Stefan Monnier
2018-08-08 20:54                                                         ` Drew Adams
2018-08-04 15:42                         ` Drew Adams
2018-08-04 15:56                           ` Michael Albinus
2018-08-04 16:16                             ` Drew Adams
2018-08-04 17:36                               ` Michael Albinus
2018-08-04 22:41                                 ` Drew Adams
2018-08-05 10:03                                   ` Michael Albinus
2018-08-04 16:08                           ` Eli Zaretskii
     [not found]                         ` <<7c28f9d8-e2bb-4778-ab92-92707f12718f@default>
     [not found]                           ` <<837el6t8r3.fsf@gnu.org>
2018-08-04 16:27                             ` Drew Adams
2018-08-04 16:59                               ` Eli Zaretskii
2018-08-05  1:59                               ` Richard Stallman
2018-08-05 10:07                                 ` Michael Albinus
2018-08-06  1:20                                   ` Richard Stallman
2018-08-05 15:36                                 ` Drew Adams [this message]
2018-08-06  4:21                                   ` Howard Melman
2018-08-06  4:39                                     ` Werner LEMBERG
2018-08-06  8:07                                     ` Michael Albinus
2018-08-06 13:50                                       ` Clément Pit-Claudel
2018-08-06 14:57                                         ` Drew Adams
2018-08-06 14:52                                       ` Drew Adams
2018-08-06 15:52                                         ` Howard Melman
2018-08-06 15:46                                     ` Stefan Monnier
2018-07-27 21:08           ` Eli Zaretskii
2018-07-28  0:24             ` Filipp Gunbin
2018-07-28  9:02               ` Michael Albinus
2018-07-27 19:19         ` Dmitry Gutov
2018-07-27 19:32           ` Michael Albinus
2018-07-27 19:40             ` Yuri Khan
2018-07-27 19:43               ` Michael Albinus
2018-07-27 20:09                 ` Yuri Khan
2018-07-27 21:15                   ` Eli Zaretskii
2018-07-28  9:11                     ` Michael Albinus
2018-07-28  9:57                       ` Eli Zaretskii
2018-07-28 10:04                         ` Michael Albinus
2018-07-27 22:57             ` Dmitry Gutov
2018-07-27 22:59         ` Dmitry Gutov
2018-07-28  9:18           ` Michael Albinus
2018-07-28  9:36             ` Dmitry Gutov
2018-07-28  9:51               ` Michael Albinus
2018-07-28  9:59 ` Dmitry Gutov
2018-07-28 10:13   ` Michael Albinus
2018-07-28 22:20     ` Dmitry Gutov
2018-07-29  9:54       ` Michael Albinus
2018-08-08 16:49         ` Dmitry Gutov

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=39939ea5-a7c2-400a-9ac1-4df7cf4fcb42@default \
    --to=drew.adams@oracle.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=fgunbin@fastmail.fm \
    --cc=michael.albinus@gmx.de \
    --cc=rms@gnu.org \
    /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).