[Top][All Lists]

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

Re: apparent inconsistencies in readline documentation

From: Chet Ramey
Subject: Re: apparent inconsistencies in readline documentation
Date: Tue, 28 Jul 2020 10:11:21 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

On 7/28/20 4:21 AM, Daniel Molina wrote:
> On 27/7/20 22:09, Chet Ramey wrote:
>> On 7/25/20 12:21 PM, Daniel Molina wrote:
>>> Hi,
>>> I found some aspects of readline documentation that seem inconsistent to
>>> me and I wanted to share them.
>>> 1. The difference between backward-kill-line and unix-line-discard
>>> readline commands.
>>> Documentation states:
>>>        backward-kill-line (C-x Rubout)
>>>               Kill backward to the beginning of the line.
>>>        unix-line-discard (C-u)
>>>               Kill backward from point to the  beginning  of  the 
>>> line.   The
>>>               killed text is saved on the kill-ring.
>>> In both cases they kill from the point and killed text is saved in the
>>> kill-ring.
>> The difference is what happens with numeric arguments.
> I see.
>>  Maybe that is what
>> should be added to the backward-kill-line description.
> I think that would be useful for that an similar commands. I found the
> question asked on the web too.

There is already

"If you pass a negative argument to a
command which normally acts in a forward direction, that command will
act in a backward direction.  For example, to kill text back to the
start of the line, you might type @samp{M-- C-k}."

It seems like one statement is better than adding the same text to
multiple command descriptions.

> Maybe a confusing part is Section "1.3.3 Sample Init File" of
> doc/readline.info where there are lines like
>          # Arrow keys in keypad mode
>          #
>          #"\M-OD":        backward-char
>          #
>          # Arrow keys in ANSI mode
>          #
>          "\M-[D":        backward-char
> and
>     "\C-xr": redraw-current-line

This is not what we're talking about. These are specific multi-key
sequences that are bound to specific commands, not a question of whether
C-A and C-a are equivalent. The parallel to the previous question would
be whether "\C-Xr" and "\C-xr" are equivalent key sequences.

``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/

reply via email to

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