unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* C-u - does not work
@ 2016-05-31 20:52 Cecil Westerhof
  2016-05-31 22:00 ` HASM
  2016-06-01 12:17 ` Joost Kremers
  0 siblings, 2 replies; 8+ messages in thread
From: Cecil Westerhof @ 2016-05-31 20:52 UTC (permalink / raw)
  To: help-gnu-emacs

When I want four - I would expect the following to work:
    C-u -
but it does not.
The following works:
    C-u 4 -
And when I want four a I can use:
    C-u a
What is happening here?

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof


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

* Re: C-u - does not work
  2016-05-31 20:52 C-u - does not work Cecil Westerhof
@ 2016-05-31 22:00 ` HASM
  2016-06-02  2:43   ` B. T. Raven
  2016-06-08 19:41   ` Cecil Westerhof
  2016-06-01 12:17 ` Joost Kremers
  1 sibling, 2 replies; 8+ messages in thread
From: HASM @ 2016-05-31 22:00 UTC (permalink / raw)
  To: help-gnu-emacs


> When I want four - I would expect the following to work:
>     C-u -
> but it does not.

You can enter a number after C-u, defaulting to 4, number can be
positive or negative.  When you type -, emacs things you are composing a
negative number.

Try "C-x k C-u" for all details.

-- HASM


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

* Re: C-u - does not work
  2016-05-31 20:52 C-u - does not work Cecil Westerhof
  2016-05-31 22:00 ` HASM
@ 2016-06-01 12:17 ` Joost Kremers
  1 sibling, 0 replies; 8+ messages in thread
From: Joost Kremers @ 2016-06-01 12:17 UTC (permalink / raw)
  To: help-gnu-emacs

Cecil Westerhof wrote:
> When I want four - I would expect the following to work:
>     C-u -
> but it does not.

C-u - is the negative prefix argument. (See the Elisp manual on prefix
arguments.) So the - after C-u is not interpreted as a character that
should invoke self-insert-command.





-- 
Joost Kremers                                   joostkremers@fastmail.fm
Selbst in die Unterwelt dringt durch Spalten Licht
EN:SiS(9)


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

* Re: C-u - does not work
  2016-05-31 22:00 ` HASM
@ 2016-06-02  2:43   ` B. T. Raven
  2016-06-02  6:11     ` Joost Kremers
  2016-06-02 14:57     ` HASM
  2016-06-08 19:41   ` Cecil Westerhof
  1 sibling, 2 replies; 8+ messages in thread
From: B. T. Raven @ 2016-06-02  2:43 UTC (permalink / raw)
  To: help-gnu-emacs

On 5/31/2016 17:00, HASM wrote:
>
>> When I want four - I would expect the following to work:
>>      C-u -
>> but it does not.
>
> You can enter a number after C-u, defaulting to 4, number can be
> positive or negative.  When you type -, emacs things you are composing a
> negative number.
>
> Try "C-x k C-u" for all details.
>
> -- HASM
>

Unless you have a custom keybinding that should be C-h k C-u
C-u by itself without the - uses 4 as the default in most cases.
C-u - needs a number after the hyphen. I kept trying C-x k (kill-buffer) 
and thought I had introduced a keybinding mod somewhere.
A synonym for C-h k is M-x describe-key

Ed


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

* Re: C-u - does not work
  2016-06-02  2:43   ` B. T. Raven
@ 2016-06-02  6:11     ` Joost Kremers
  2016-06-02 14:57     ` HASM
  1 sibling, 0 replies; 8+ messages in thread
From: Joost Kremers @ 2016-06-02  6:11 UTC (permalink / raw)
  To: help-gnu-emacs

B. T. Raven wrote:
> C-u - needs a number after the hyphen.

Not necessarily. Just C-u - as a prefix argument yields the value -1
(for the numeric prefix argument) or the symbol '- (for the raw prefix
argument).



-- 
Joost Kremers                                   joostkremers@fastmail.fm
Selbst in die Unterwelt dringt durch Spalten Licht
EN:SiS(9)


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

* Re: C-u - does not work
  2016-06-02  2:43   ` B. T. Raven
  2016-06-02  6:11     ` Joost Kremers
@ 2016-06-02 14:57     ` HASM
  1 sibling, 0 replies; 8+ messages in thread
From: HASM @ 2016-06-02 14:57 UTC (permalink / raw)
  To: help-gnu-emacs


me> Try "C-x k C-u" for all details.
bf> Unless you have a custom keybinding that should be C-h k C-u

yes, typo -- HASM



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

* Re: C-u - does not work
  2016-05-31 22:00 ` HASM
  2016-06-02  2:43   ` B. T. Raven
@ 2016-06-08 19:41   ` Cecil Westerhof
  2016-06-08 20:38     ` Barry Margolin
  1 sibling, 1 reply; 8+ messages in thread
From: Cecil Westerhof @ 2016-06-08 19:41 UTC (permalink / raw)
  To: help-gnu-emacs

On Wednesday  1 Jun 2016 00:00 CEST, hasm@example.invalid wrote:

>
>> When I want four - I would expect the following to work:
>> C-u -
>> but it does not.
>
> You can enter a number after C-u, defaulting to 4, number can be
> positive or negative. When you type -, emacs things you are
> composing a negative number.

I should have thought about that. :-(

But the situation I started with (but dumped down) was that I did:
    C-u C-u -

With ‘C-u C-u’ I already signified that I want 16, so why does that
not work and do I have to give:
    C-u 16-

Not really a problem, but just wondering.

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof


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

* Re: C-u - does not work
  2016-06-08 19:41   ` Cecil Westerhof
@ 2016-06-08 20:38     ` Barry Margolin
  0 siblings, 0 replies; 8+ messages in thread
From: Barry Margolin @ 2016-06-08 20:38 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1197 bytes --]

In article <87bn3ba2os.fsf@Equus.decebal.nl>,
 Cecil Westerhof <Cecil@decebal.nl> wrote:

> On Wednesday  1 Jun 2016 00:00 CEST, hasm@example.invalid wrote:
> 
> >
> >> When I want four - I would expect the following to work:
> >> C-u -
> >> but it does not.
> >
> > You can enter a number after C-u, defaulting to 4, number can be
> > positive or negative. When you type -, emacs things you are
> > composing a negative number.
> 
> I should have thought about that. :-(
> 
> But the situation I started with (but dumped down) was that I did:
>     C-u C-u -
> 
> With ‘C-u C-u’ I already signified that I want 16, so why does that
> not work and do I have to give:
>     C-u 16-
> 
> Not really a problem, but just wondering.

From the documentation:

C-u without digits or minus sign provides 4 as argument.
Repeating C-u without digits or minus sign
 multiplies the argument by 4 each time.

So if you type a number after C-u, it doesn't matter that you repeated 
it, it switches to the explicit numeric argument.

If you think this is wrong design, file a bug report.

-- 
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***


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

end of thread, other threads:[~2016-06-08 20:38 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-31 20:52 C-u - does not work Cecil Westerhof
2016-05-31 22:00 ` HASM
2016-06-02  2:43   ` B. T. Raven
2016-06-02  6:11     ` Joost Kremers
2016-06-02 14:57     ` HASM
2016-06-08 19:41   ` Cecil Westerhof
2016-06-08 20:38     ` Barry Margolin
2016-06-01 12:17 ` Joost Kremers

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).