nano-devel
[Top][All Lists]
Advanced

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

Re: [Nano-devel] key bind menus


From: Brand Huntsman
Subject: Re: [Nano-devel] key bind menus
Date: Wed, 18 Oct 2017 15:53:38 -0600

On Wed, 18 Oct 2017 21:57:30 +0200
Benno Schulenberg <address@hidden> wrote:

> > Should MMOST, MSOME, MYESNO and MFINDINHELP be available for
> > bind/unbind in nanorc? A function internally bound to MMOST would
> > need 14 separate binds without a "most" menu in nanorc.  
> 
> There is the meta menu "all".  See the manual.

That would also bind a key to MHELP and MYESNO. I tested and it doesn't cause 
any issues in those menus, other than needing to bind a different function to 
help menu _after_ binding the other to all menus. So MMOST might not be needed, 
other than for consistency.


> > And MYESNO/MFINDINHELP menus can't be rebound without those menus
> > in nanorc.  
> 
> Which functions would you want to rebind in those menus?  Apart
> from Cancel there is nothing that can be rebound there.

^X would be nice since I always press it before ^C. But someone else who uses 
F2 instead of ^X might want that to cancel, allowing those menus in nanorc lets 
the user choose. I didn't even know about the F-key bindings until I injured my 
left hand recently, and F2/3 to exit and save helped a lot. It appears that 
"bind F2 cancel all\nbind F2 exit all" actually works and calls cancel or exit 
when F2 is pressed. Is this behavior intentional? It could lead to some issues 
if the user doesn't first unbind a built-in binding before rebinding it.


> > Should add_to_sclist() bindings be in a subset of menus declared
> > with add_to_funcs()? add_to_funcs(do_cut_text_void, MMAIN, ...); 
> > add_to_sclist(MMOST, "^K", 0, do_cut_text_void, 0); I understand
> > that as cut only works in MMAIN but is bound to most menus.  
> 
> > There are 13 functions declared with MMAIN and bound to MMOST.
> > There are 2 functions declared with MMAIN and bound to MSOME.  
> 
> I am not getting what you mean.

It appears the menus set in add_to_funcs() determines if the function
appears in the help for any given menu. The do_cut_text_void function
is only in MMAIN and doesn't appear in the help for prompts that can
use it. ^K is bound to MMOST by add_to_sclist() and changing MMAIN to
MMOST in add_to_funcs() would add it to all help pages it works with.
Although it might need a second add_to_funcs() with N_("Clear Text") since it 
doesn't cut to the cutbuffer.




reply via email to

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