bug-bash
[Top][All Lists]
Advanced

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

Re: Negative or zero arguments to yank-last-arg in bound keystrokes


From: Dennis Williamson
Subject: Re: Negative or zero arguments to yank-last-arg in bound keystrokes
Date: Mon, 6 Dec 2010 20:56:08 -0600

On Mon, Dec 6, 2010 at 7:29 PM, Chet Ramey <chet.ramey@case.edu> wrote:
> On 12/6/10 8:22 PM, Chet Ramey wrote:
>
>> Yes.  In this case, the documentation is less than clear.  The count
>> argument is actually set by the first call to yank-last-arg, and that
>> argument sets the word to extract from the history entry.  Subsequent
>> calls to yank-last-arg without a different intervening editing command
>> use that same count as the argument to extract while moving through the
>> history, and any count given to those subsequent calls sets the number
>> of history entries to move.  A negative count on those calls changes the
>> direction.
>
> Sorry, that was partly a future direction.  The count to the second and
> subsequent calls just changes the direction, not the number of history
> entries to skip.
>
> Chet
>
> --
> ``The lyf so short, the craft so long to lerne.'' - Chaucer
>                 ``Ars longa, vita brevis'' - Hippocrates
> Chet Ramey, ITS, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/
>

As you may have been able to tell from the macros I included in my
report, I was trying to create a macro analogous to yank-last-arg but
instead of "last" it would be some fixed n or last-minus-n, such as
"yank-last-1-arg" or "yank-3-arg" with a repeatable, unchanging
keystroke akin to Meta-. Using a positive argument, this works exactly
as I intended. It would have been nice to be able to do something like
"yank-last-n-arg".



reply via email to

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