all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* C-x @
@ 2002-04-30  9:30 Dave Love
  0 siblings, 0 replies; 6+ messages in thread
From: Dave Love @ 2002-04-30  9:30 UTC (permalink / raw)


I think the C-x @ map should be documented (as opposed to just
mentioned once in the manual).

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: C-x &
  2018-08-06 17:59                                       ` Drew Adams
@ 2018-08-06 19:17                                         ` Michael Albinus
  2018-08-06 20:57                                           ` Drew Adams
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Albinus @ 2018-08-06 19:17 UTC (permalink / raw)
  To: Drew Adams; +Cc: Eli Zaretskii, fgunbin, emacs-devel

Drew Adams <drew.adams@oracle.com> writes:

Hi Drew,

>> And of course, "C-x &" invokes a command. 
>
> Yes. But invoking a command is not being a command.

Yes. I haven't said otherwise, at least in my last email.

>> This is equivalent to "M-x universal-async-argument". 
>
> Presumably you mean that using key sequence `C-x &' is equivalent to
> using `M-x universal-async-argument'. That's another way of saying
> that `C-x &' invokes command `universal-async-argument'.
>
> If you wanted to call command `universal-async-argument' a "prefix
> command" you could do so. But `C-x &' is not a prefix command or any
> other kind of command.

I haven't said that `C-x &' is any kind of command, at least in my last
email.

>> So I don't see what's wrong with "prefix command" - it is a command
>> which precedes another command.
>
> Command `universal-async-argument', when invoked, precedes invocation
> of the command bound to the key sequence read by
> `universal-asyn-argument'. Yes.
>
> And using `C-x &' precedes reading of that second key sequence. But
> neither of those things make `C-x &' into a command, prefix, postfix,
> or *fix.

Again, I haven't said that `C-x &' is a command, in my last email.

Let's agree the obvious: `universal-async-argument' is a command, by
default bound to the key sequences `C-x &' and `M-x  u n i v e r s a l -
a s y n c - a r g u m e n t RET.'

The only raison d'être of `universal-async-argument' is to read another
key sequence, which invokes the command bound to that key sequence. This
means, the command `universal-async-argument' always precedes another
command, which I call a prefix in my understanding. Therefore, I've
proposed to call `universal-async-argument' a "prefix command".

The Emacs manual distinguishes between commands and the key (sequence) a
command is bound to. But it explicitely says, that both could be used
equal:

--8<---------------cut here---------------start------------->8---
   In this manual, we will often speak of keys like ‘C-n’ as commands,
even though strictly speaking the key is bound to a command.
--8<---------------cut here---------------end--------------->8---

See (info "(emacs) Commands")

So it would be also allowed to speak about the key sequence `C-x &' as a
command, but I don't insist on this if it makes you feel bad.

Best regards, Michael.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: C-x &
  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:01                                             ` Michael Albinus
  0 siblings, 2 replies; 6+ messages in thread
From: Drew Adams @ 2018-08-06 20:57 UTC (permalink / raw)
  To: Michael Albinus; +Cc: Eli Zaretskii, fgunbin, emacs-devel

> Yes. I haven't said otherwise, at least in my last email.
> 
> > If you wanted to call command `universal-async-argument' a "prefix
> > command" you could do so. But `C-x &' is not a prefix command or any
> > other kind of command.
> 
> I haven't said that `C-x &' is any kind of command, at least in my last
> email.

Right. You didn't. But some others did. And it wasn't obvious (to me) that you didn't mean to say that `C-x &' is a "prefix command". If you meant only that `universal-sync-argument' is a prefix command then, as I said, that's OK by me. (The doc should then define "prefix command".)

> >> So I don't see what's wrong with "prefix command" - it is a command
> >> which precedes another command.
> >
> > Command `universal-async-argument', when invoked, precedes invocation
> > of the command bound to the key sequence read by
> > `universal-asyn-argument'. Yes.
> >
> > And using `C-x &' precedes reading of that second key sequence. But
> > neither of those things make `C-x &' into a command, prefix, postfix,
> > or *fix.
> 
> Again, I haven't said that `C-x &' is a command, in my last email.
> 
> Let's agree the obvious: `universal-async-argument' is a command, by
> default bound to the key sequences `C-x &' and `M-x  u n i v e r s a l -
> a s y n c - a r g u m e n t RET.'

Agreed.

(Although I wouldn't say that the command is bound to `M-x...'. That sequence of keys invokes `u-a-a', but the command is not bound to it. We just don't say that kind of thing in Emacs. The key sequences bound to a command are well defined, and they don't include `M-x' followed by keys spelling out the command name. Similarly, the command is not bound to `M-x uni-a-arg TAB RET' etc.)

> The only raison d'être of `universal-async-argument' is to read another
> key sequence, which invokes the command bound to that key sequence. This
> means, the command `universal-async-argument' always precedes another
> command, which I call a prefix in my understanding. 

Agreed. (Although the command that is preceded by `u-a-a' is, if anything, a suffix of it, not a prefix. I suspect you just misspoke in the last phrase.)

> Therefore, I've proposed to call `universal-async-argument' a "prefix command".

OK by me (where "it" is the command, not `C-x &'). "Prefix command" then needs to be described/defined/explained in the manual.

> The Emacs manual distinguishes between commands and the key (sequence) a
> command is bound to. But it explicitely says, that both could be used
> equal:
> 
> --8<---------------cut here---------------start------------->8---
>    In this manual, we will often speak of keys like ‘C-n’ as commands,
> even though strictly speaking the key is bound to a command.
> --8<---------------cut here---------------end--------------->8---
> 
> See (info "(emacs) Commands")

Yeah. I was afraid someone might quote that passage. ;-) 

I don't have a problem with that text, because its purpose is to state that we sometimes speak that way even though it is not really correct. It's not defining a key sequence as the command that it's bound to - quite the opposite. It both (1) points out that a key sequence is not the same thing as the command that it's bound to and (2) mentions that sometimes we gloss over that difference, for brevity and when the context makes the meaning clear.

> So it would be also allowed to speak about the key sequence `C-x &' as a
> command, but I don't insist on this if it makes you feel bad.

It would be allowed to say "command `C-x &'", yes, for brevity. That's a far cry from defining a new term "prefix command" and applying it to `C-x &'. (Especially since there is also a notion of prefix key, which is something quite different.)

In sum, I don't have a problem with calling `universal-async-argument' a "prefix command", if that term is defined in the manual.

----

About the command name (FWIW):

I'm not crazy about the name "universal-async-argument'. I realize that it's modeled on `universal-argument', and I can live with it. But I wish that both of those commands were named differently. (No, I'm not proposing a name change for `u-a' at this late date.)

`u-a-a' doesn't necessarily provide a (non-default) prefix arg to a command. It invokes a command (bound to a key sequence that it reads).

It's somewhat akin to `execute-extended-command' or `comint-redirect-send-command'. Those read a command name and not a key sequence, so in that respect they differ. But I think it might be better for `u-a-a' to be named `<something>-command', where <something> does not suggest "universal argument".

Unlike `u-a', you need not provide a prefix arg to `u-a-a'. It's not really the same kind of command. `u-a-a' does accept and take into account a prefix arg, if you provide one; but it's not required (IIUC). (Maybe I'm wrong about this. What prefix arg does bare `C-x &' provide? Does it provide `(4)', as `C-u' does?

No, I don't feel strongly about the command name. Yes, I understand why you proposed "universal-async-argument". But I think its association with `universal-argument' confuses more than clarifies. No, I don't have a great suggestion for the command name. Ideally it should convey "read a key sequence and invoke the command bound to it" (and the doc string would explain that it will also read a prefix arg and pass that to the command). Maybe `invoke-command-bound-to' or some such.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: C-x &
  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
  1 sibling, 1 reply; 6+ messages in thread
From: Drew Adams @ 2018-08-06 23:16 UTC (permalink / raw)
  To: Michael Albinus; +Cc: Eli Zaretskii, fgunbin, emacs-devel

> No, I don't feel strongly about the command name. Yes, I understand why
> you proposed "universal-async-argument". But I think its association with
> `universal-argument' confuses more than clarifies. No, I don't have a great
> suggestion for the command name. Ideally it should convey "read a key
> sequence and invoke the command bound to it" (and the doc string would
> explain that it will also read a prefix arg and pass that to the command).
> Maybe `invoke-command-bound-to' or some such.

Sorry; I meant to mention asynchronous execution.

> Ideally it should convey "read a key
> sequence and invoke the command bound to it

, in an asynchronous way"

> (and the doc string would
> explain that it will also read a prefix arg and pass that to the command).
> Maybe `invoke-command-bound-to' or some such.

But the command name should have `async' in it, somewhere.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: C-x &
  2018-08-06 20:57                                           ` Drew Adams
  2018-08-06 23:16                                             ` Drew Adams
@ 2018-08-07  7:01                                             ` Michael Albinus
  1 sibling, 0 replies; 6+ messages in thread
From: Michael Albinus @ 2018-08-07  7:01 UTC (permalink / raw)
  To: Drew Adams; +Cc: Eli Zaretskii, fgunbin, emacs-devel

Drew Adams <drew.adams@oracle.com> writes:

>> I haven't said that `C-x &' is any kind of command, at least in my last
>> email.
>
> Right. You didn't. But some others did. And it wasn't obvious (to me)
> that you didn't mean to say that `C-x &' is a "prefix command". If you
> meant only that `universal-sync-argument' is a prefix command then, as
> I said, that's OK by me. (The doc should then define "prefix
> command".)
>
>> Again, I haven't said that `C-x &' is a command, in my last email.
>> 
>> Let's agree the obvious: `universal-async-argument' is a command, by
>> default bound to the key sequences `C-x &' and `M-x  u n i v e r s a l -
>> a s y n c - a r g u m e n t RET.'
>
> Agreed.
>
> (Although I wouldn't say that the command is bound to `M-x...'. That
> sequence of keys invokes `u-a-a', but the command is not bound to
> it. We just don't say that kind of thing in Emacs. The key sequences
> bound to a command are well defined, and they don't include `M-x'
> followed by keys spelling out the command name. Similarly, the command
> is not bound to `M-x uni-a-arg TAB RET' etc.)
>
>> The only raison d'être of `universal-async-argument' is to read another
>> key sequence, which invokes the command bound to that key sequence. This
>> means, the command `universal-async-argument' always precedes another
>> command, which I call a prefix in my understanding. 
>
> Agreed. (Although the command that is preceded by `u-a-a' is, if
> anything, a suffix of it, not a prefix. I suspect you just misspoke in
> the last phrase.)
>
>> Therefore, I've proposed to call `universal-async-argument' a
>> "prefix command".
>
> OK by me (where "it" is the command, not `C-x &'). "Prefix command"
> then needs to be described/defined/explained in the manual.

OMG: we are in violent agreement :-)

>> The Emacs manual distinguishes between commands and the key (sequence) a
>> command is bound to. But it explicitely says, that both could be used
>> equal:
>> 
>> --8<---------------cut here---------------start------------->8---
>>    In this manual, we will often speak of keys like ‘C-n’ as commands,
>> even though strictly speaking the key is bound to a command.
>> --8<---------------cut here---------------end--------------->8---
>> 
>> See (info "(emacs) Commands")
>
> Yeah. I was afraid someone might quote that passage. ;-) 

That's because of *you* - you have forced me to consult the manual about.

> I don't have a problem with that text, because its purpose is to state
> that we sometimes speak that way even though it is not really
> correct. It's not defining a key sequence as the command that it's
> bound to - quite the opposite. It both (1) points out that a key
> sequence is not the same thing as the command that it's bound to and
> (2) mentions that sometimes we gloss over that difference, for brevity
> and when the context makes the meaning clear.
>
>> So it would be also allowed to speak about the key sequence `C-x &' as a
>> command, but I don't insist on this if it makes you feel bad.
>
> It would be allowed to say "command `C-x &'", yes, for brevity. That's
> a far cry from defining a new term "prefix command" and applying it to
> `C-x &'. (Especially since there is also a notion of prefix key, which
> is something quite different.)
>
> In sum, I don't have a problem with calling `universal-async-argument'
> a "prefix command", if that term is defined in the manual.

Agreed.

Best regards, Michael.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: C-x &
  2018-08-06 23:16                                             ` Drew Adams
@ 2018-08-07  7:05                                               ` Michael Albinus
  0 siblings, 0 replies; 6+ messages in thread
From: Michael Albinus @ 2018-08-07  7:05 UTC (permalink / raw)
  To: Drew Adams; +Cc: Eli Zaretskii, fgunbin, emacs-devel

Drew Adams <drew.adams@oracle.com> writes:

>> No, I don't feel strongly about the command name. Yes, I understand why
>> you proposed "universal-async-argument". But I think its association with
>> `universal-argument' confuses more than clarifies. No, I don't have a great
>> suggestion for the command name. Ideally it should convey "read a key
>> sequence and invoke the command bound to it" (and the doc string would
>> explain that it will also read a prefix arg and pass that to the command).
>> Maybe `invoke-command-bound-to' or some such.
>
> Sorry; I meant to mention asynchronous execution.

The name "universal-async-argument" was inherited from
"universal-coding-system-argument", which implements a similar technique.

>> Ideally it should convey "read a key
>> sequence and invoke the command bound to it
>
> , in an asynchronous way"
>
>> (and the doc string would
>> explain that it will also read a prefix arg and pass that to the command).
>> Maybe `invoke-command-bound-to' or some such.
>
> But the command name should have `async' in it, somewhere.

"universal-async-argument" has it. And until we have a better name, I'd
like to keep it. It will be easy to replace the name by another one if
needed, and it isn't user visible in general.

Best regards, Michael.



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-08-07  7:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-04-30  9:30 C-x @ Dave Love
  -- strict thread matches above, loose matches on Subject: below --
2018-07-23 15:58 Introducing thread-safe Tramp 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

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.