patchGNU nano - Patches: patch #9653, docs: mention that "Ins"...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #9653: docs: mention that "Ins" and "Del" are rebindable, and fix nano.texi error

Submitter:  David Lawrence Ramsey <dolorous>
Submitted:  Sat 09 Jun 2018 05:11:42 PM UTC
   
 
Priority:  3 - Low Status:  Done
Privacy:  Public Assigned to:  dolorous
Open/Closed:  Closed Release:  None

Jump to the original submission

Sun 23 Sep 2018 06:33:05 AM UTC, comment #8: 

Was released in 3.0.

Benno Schulenberg <bens>
Group administrator
Wed 11 Jul 2018 12:49:57 PM UTC, comment #7: 

Thanks.  Applied to master, with the addition of @ and ], commit 4c023292.

Benno Schulenberg <bens>
Group administrator
Tue 10 Jul 2018 03:37:23 PM UTC, comment #6: 

Okay.  Updated version against git 0782654 attached.

(There are several different mechanisms for Interpreting what is and isn't a valid control sequence; winio.c:get_control_kbinput() is the most comprehensive, but it also handles shifted control key equivalents where global.c:keycode_from_string() doesn't, and the nanorc syntax colors ^[0-9] green when some of those are invalid or do nothing.  All this should probably be dealt with at some point, but I'm tired of tearing through the code at the moment.  I did get the three main acceptable punctuation-based control characters out of the nanorc syntax.)

I did make one tweak to your proposed wording, however: for control characters, it uses "followed by a Latin letter, one of several ASCII characters (\, ^, or _), or the word 'Space'".  The Meta character description mentions ASCII characters followed by the word "Space", so I figured keeping a consistent description order was important.

(file #44536)

David Lawrence Ramsey <dolorous>
Group Member
Tue 10 Jul 2018 01:03:16 PM UTC, comment #5: 

Hmm...  Still not good enough.  The description for ^ is too broad, and the one for M- too narrow.  For example, ^# is not valid, but M-# is; ^% is not valid, but M-% is.  In fact, all ASCII characters except ] and a space itself are valid after M-, but after ^ only a few symbols and some digits are valid.

So, for ^ I would say: a Latin letter, the word "Space", or one of "...";
and for M- : any ASCII character except [, or the word "Space".

Benno Schulenberg <bens>
Group administrator
Mon 09 Jul 2018 05:43:18 PM UTC, comment #4: 

Okay.  Taking all this into account, I've attached an improved patch against git f456794.

The documentation for rebinding control sequences now consistently refers to ASCII characters (the code in global.c:keycode_from_string() just subtracts 64 from the character after ^ if there's only one character after it, which covers all ASCII), the documentation for rebinding Meta sequences now consistently refers to Latin letters (since the same function limits the character after "M-" to whatever passes through tolower() properly), and Ins and Del are documented separately since it's the only way to cover them as keys that take no modifiers.

(file #44528)

David Lawrence Ramsey <dolorous>
Group Member
Mon 09 Jul 2018 08:18:24 AM UTC, comment #3: 

(Okay, no hurry.)

A further thing: your patch describes ^Ins and ^Del as being valid, but they are not.  Only the words "Ins" and "Del" by themselves are valid keynames that can be rebound.

Now I remember that this was the main reason I left this undocumented: I didn't want to add a fourth possibility just for two keys, especially not when one of those keys no one in their right mind would ever want to rebind.

But... documentation should describe the facts as they are, so there we go.

(Trying out the various combinations led me to report bug #54274: M-Ins and M-Del are not getting flagged as errors.)

Benno Schulenberg <bens>
Group administrator
Sun 08 Jul 2018 09:04:46 PM UTC, comment #2: 

With that in mind, "ASCII character" and "Latin letter" do seem to be better descriptions, yes.  The only problem was that it should be "an ASCII character" instead of "a ASCII character".  As for the other cases, I'm away from my development machine at the moment, but I'll look into them once I'm back in front of it (which should be tomorrow or so).

David Lawrence Ramsey <dolorous>
Group Member
Sat 07 Jul 2018 06:28:26 PM UTC, comment #1: 

Thanks for the patch.  But, as posted on bug #54071, the current descriptions don't match ^\ (plus some others) either.  That would need to be fixed too.  Plus: what is a printable character?  Any Chinese character is a printable character too, but is not acceptable there.  So I think the "ASCII character" is the better description in this case.  And instead of "alpha character" it would be more precise to say "Latin letter".  What do you think?

Benno Schulenberg <bens>
Group administrator
Sat 09 Jun 2018 05:11:42 PM UTC, original submission:  

Attached, against git 9a7ba5d.

Bug #54071 mentions that "Del" is a rebindable key, but that it isn't documented.  The patch fixes this issue for both "Ins" and "Del".

Also, nano.texi contains a minor error relative to nanorc.5: after "M-", nanorc.5 says there should be "a printable character", where nano.texi says there should be "a ASCII character".  The patch fixes this by making nano.texi match nanorc.5 in this instance.

David Lawrence Ramsey <dolorous>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bens (Posted a comment)
  • -email is unavailable- added by dolorous (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-09-23 bens Open/ClosedOpen Closed
    2018-07-11 bens Priority5 - Normal 3 - Low
        StatusIn Progress Done
    2018-07-10 dolorous Attached File- Added 0001-docs-mention-that-Ins-and-Del-are-valid-rebindable-k.patch, #44536
    2018-07-10 bens StatusNone In Progress
        Assigned toNone dolorous
    2018-07-09 dolorous Attached File- Added 0001-docs-mention-that-Ins-and-Del-are-valid-rebindable-k.patch, #44528
    2018-06-09 dolorous Attached File- Added 0001-docs-mention-that-Ins-and-Del-are-valid-rebindable-k.patch, #44339

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code