nano-devel
[Top][All Lists]
Advanced

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

Re: [Nano-devel] [PATCH] interpolate functions in string binds


From: Benno Schulenberg
Subject: Re: [Nano-devel] [PATCH] interpolate functions in string binds
Date: Sat, 1 Sep 2018 10:25:47 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

Three hundred and fifty added lines just to translate ${word}s to
key codes? ...  Too much.

Op 30-08-18 om 13:15 schreef Brand Huntsman:
>   bind ^C "^A"
>   bind ^D "^B"
>   bind ^E "^A${enter}"
>   bind ^F "^B${enter}"

The things between quotes, are those literal control characters, or
a caret plus a letter?  If literal, it makes those things unpastable,
which undoes some of the point of your patch.

> add_to_sclist(get_history_older_void) has more menus than 
> add_to_funcs(get_history_older_void), which is missing MFINDINHELP and
> MEXTCMD.

The reason for those is esthetics.  In MFINDHELP we just have the
Cancel function -- to keep the help items nicely paired, the Older
and Newer items would have to come first, which gives them too
prominent a place in my opinion, or we would have to add another
help item to sit under the Cancel item (the Backward toggle maybe,
but also that gives it too much prominence -- in a help text the
user mostly wants to do a simple quick straightforward search: no
need to distract her with PrevHstory and NextHstory (which I will
rename to Older and Newer in a later version, by the way, now that
I look at them) and Backward: all that is needed is Cancel.

> There are other functions missing from some menus.

Which are those?

> The help menu hides the unbound error message for modifier-less keys such as
> 'a'. Is there a reason for this?

I didn't want the user to be "flooded" with Unbound-key messages when they
tried out the keyboard in the help viewer.  I thought that was "cleaner".

> When I press a key and it does nothing,
> should I assume it is unbound or just doesn't work in the current context?

You are right: it is better to give feedback than to silently do nothing.
Relevant patch has been applied, commit 3270aac7.  Thanks.

> I don't know how the undo code works, but would it be easily possible to force
> several actions to occupy a single undo?

Not easily.  But in theory it ought to be possible to put in GROUP_BEGIN
and GROUP_END items and make it so that everything in between them (and
the GROUP items themselves, of course) is undone/redone together.

> I don't know how useful it would be, but a number inside ${} could repeat the
> function after it. ${4 !right} or maybe ${!right 4} selects next 4
> characters.

As usual, you are going way overboard.  :)

Benno

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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