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: Brand Huntsman
Subject: Re: [Nano-devel] [PATCH] interpolate functions in string binds
Date: Sat, 1 Sep 2018 03:36:07 -0600

On Sat, 1 Sep 2018 10:25:47 +0200
Benno Schulenberg <address@hidden> wrote:

> >   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.

They are control characters. The patch still allows current string binds to 
work. And someone might discover they can use them to nest string binds. If it 
is a feature that should be officially supported, it would be better to have 
named string binds.

  define cut2end "${enter cut left}"
  bind ^A cut2end
  bind ^B "${cut2end}and replace with this text"


> > 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.

So add_to_funcs() registers functions for the help bar and help page?
Could it get another parameter that contains every menu the function works in? 
An all_menus parameter and a no_help_menus parameter. The no_help_menus 
parameter is inverted and masked against all_menus to get a help_menus 
variable. And it along with all_menus are both stored in the subnfunc. Or just 
have help_menus parameter, but it might be better to show which menus don't 
show help for the function versus those that do, which might be identical to 
all_menus for a majority of the functions.


> > 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.  :)

Just pointing out possibilities that could be implemented in a few lines.




reply via email to

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