Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #16637

Re: apparent inconsistencies in readline documentation

From Chet Ramey <chet.ramey@case.edu>
Newsgroups gnu.bash.bug
Subject Re: apparent inconsistencies in readline documentation
Date 2020-07-28 10:11 -0400
Organization ITS, Case Western Reserve University
Message-ID <mailman.204.1595945498.2739.bug-bash@gnu.org> (permalink)
References <74580fd0-3f5c-6aab-ec65-815ec18d6781@autistici.org> <c39f3267-e91f-0e20-1478-2f75bef00361@case.edu> <e40e660c-c7b0-3c4c-fca6-ecc3f8c2ba06@autistici.org> <835d3ebe-51e1-0986-3395-3ae71bc16313@case.edu>

Show all headers | View raw


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/

Back to gnu.bash.bug | Previous | Next | Find similar


Thread

Re: apparent inconsistencies in readline documentation Chet Ramey <chet.ramey@case.edu> - 2020-07-28 10:11 -0400

csiph-web