help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: problem repeat entry for a number


From: Thien-Thi Nguyen
Subject: Re: problem repeat entry for a number
Date: Mon, 12 Mar 2012 12:17:23 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux)

() Thien-Thi Nguyen <ttn@gnuvola.org>
() Fri, 09 Mar 2012 09:05:33 +0100

      got it, thanks for your patience.

      first i tried C - h k C-u,  and get help message.

      of course it gave out some information, but i'm a little dazzled by
      the description.

      ***  part of  C -h k C-u  *****
      Repeating C-u without digits or minus sign
       multiplies the argument by 4 each time.
      For some commands, just C-u by itself serves as a flag
      ***  end of  C -h k C-u  *****

      I may treat the flag "C-u" as a *terminating flag* now since i know
      C-u can be used this way. but at that time i thought nothing of it
      ( even not think of type C -u again) and of course, i've no idea about
      C -q for quote
      input numbers until i got answer from the mailist.

Another way to say that C-u can act as "terminating flag" is this sentence:

 C-u following the digits or minus sign ends the argument.

which follows the previous one:

 Digits or minus sign following C-u make up the numeric argument.

which in turn follows:

 Begin a numeric argument for the following command.

Reading those in order, here is what i think and do:

 Begin a numeric argument for     OK, having typed C-u once, i have
 the following command.           now "begun a numeric argument";
                                  i am now in a new state of input
                                  where i can express that argument
                                  directly to Emacs.

 Digits or minus sign following   Wonderful!  In this new state, if
 C-u make up the numeric          i type digits, they accumulate in
 argument.                        the minibuffer.  I like number 9,
                                  so i type 9 because this argument
                                  is meant to tell the next command
                                  to insert a character that many
                                  times.  Yeah!

 C-u following the digits or      OK, now i want to command Emacs
 minus sign ends the argument.    to insert a char.  Normally i can
                                  simply type the char, thus doing
                                  two actions: flagging termination
                                  (leaving the special input state)
                                  and issuing another (self-insert)
                                  command.  I wonder why this other
                                  C-u invocation is mentioned here.
                                  Hmm, i see that if i type another
                                  digit now, Emacs does NOT do the
                                  right thing (reading my mind).
                                  Stupid Emacs!  I suppose i will
                                  have to separate the actions, and
                                  that's what C-u is for.  Perhaps
                                  i can use it for non-digits, too.
                                  Anyway, let's try: i type C-u and
                                  see it in the minibuffer; i type
                                  9 and see "999999999" inserted in
                                  the buffer.  Good, Emacs may be
                                  stupid but at the very least it
                                  is obedient.

So, one suggestion to avoid being dazzled is to take it easy
and read the help text slowly, exercizing immediately what you
understand (or misunderstand) to keep your feet on the ground.
This is easy because Emacs is interactive, can undo mistakes,
and is obedient (usually :-D).

      i also tried to use C-h k M - <num> and C-h k C-<num>,
      but failed to get answer.

This is because you were moving too quickly, as i did when i
presumed you had read the manual.  See, we all rush needlessly
sometimes.

      then, i tried to find answers through internet, and find
      little related information.

If we converse well, perhaps our exchange here will help someone
else in the future.  But, there is no guarantee.

      finally, I join the list and made a post, and got the
      satisfied answers

Thanks for explaining.

      if there is better way (or how should i do the search), plz
      tell me, it would help a lot.

Well, life is a search, so if you want a better search, live a
better life!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]