bugGNU nano - Bugs: bug #28994, [Request] enable search (^W) in...

 
 

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

bug #28994: [Request] enable search (^W) in help (^G)

Submitter:  None
Submitted:  Tue 23 Feb 2010 10:03:28 PM UTC
   
 
Severity:  3 - Normal Status:  Fixed
Assigned to:  bens Open/Closed:  Closed

Jump to the original submission

Fri 05 May 2017 09:18:17 AM UTC, comment #7: 

Released in 2.8.2.  Now let's see what people say.  :)  (Most likely nothing at all.)

Benno Schulenberg <bens>
Group administrator
Tue 25 Apr 2017 07:07:35 PM UTC, comment #6: 

Fixed in git: first commit 90bd25c1, completing commit 46430999.

Thanks for getting this rolling, Rishabh.

Benno Schulenberg <bens>
Group administrator
Mon 24 Apr 2017 03:24:05 PM UTC, comment #5: 

Rishabh reached the target more than four months ago, but only now, finally, am I getting ready to merge the feature, and iron out the last bumps.

See https://lists.gnu.org/archive/html/nano-devel/2017-04/msg00050.html.

Benno Schulenberg <bens>
Group administrator
Sat 12 Nov 2016 05:12:46 PM UTC, comment #4: 

Rishabh is getting closer to the target.  See
https://lists.gnu.org/archive/html/nano-devel/2016-11/msg00020.html.

Benno Schulenberg <bens>
Group administrator
Wed 19 Oct 2016 07:53:38 PM UTC, comment #3: 

The second version (write the help text to a file and open it with another nano) works fine, but... as you said, it is wasteful.  And I don't see how you can prevent the user from typing ^G again which would open another nano...  So this is off.

The first version didn't compile for me, but after a slight tweak it did, but... I couldn't figure out how to search in the help text -- ^W doesn't work, nor /.  So... what?  Also, looking at the patch... you add a lot of code.  But what I expected to happen is: write the help text to a temp file instead of into a giant string in memory, then read in this temp file into a new buffer (as if having typed ^R and M-F), so the user can simply use ^W and M-W to search for things.  (Probably view mode will have to become a per-file attribute, but that is a later refinement.)

So, there shouldn't be any new menu or search code or anything.  After the call of help_init(), write out the giant string to a secure temp file (not a file with a fixed name).  Then read that file into a new buffer and switch to it.  Done.  No more is needed.

Benno Schulenberg <bens>
Group administrator
Wed 19 Oct 2016 05:03:39 PM UTC, comment #2: 

Since TODO confirms we want a search, I tried implementing this feature and have come across 2 techniques for same solution: (i) Print the help text in a file and running search on it and then map the position on the screen (of string when found). (ii) Print the help text in a file and open it in a (sub-)instance of nano.

While former one is tedious, latter is inefficient - would consume almost twice the memory. Also, latter leads to noticeable lag when user would do ^G (actually, former does it too but it is negligible.)

Patches for both of these are attached. They are only to confirm that both of them are feasible solution. They are not complete; solution is not fully implemented, they have dead code and are buggy.

First solution - https://savannah.gnu.org/bugs/download.php?file_id=38762

Second solution - https://savannah.gnu.org/bugs/download.php?file_id=38763

Rishabh Dave <prongs>
Sat 14 Jun 2014 04:32:32 PM UTC, comment #1: 

Yes, a searchable help text would be nice.  But the simple solution is not possible: the help text is generated dynamically, to take key rebindings into account.

Benno Schulenberg <bens>
Group administrator
Tue 23 Feb 2010 10:03:28 PM UTC, original submission:  

when i enter help (with ^G) i can't use search in it to search for desired key (using ^G). please add this feature...

simplest way is to have help in some read-only file in /usr/share/doc and open it in another (sub)instance of nano.

eg.:
system("nano --view /usr/share/doc/help.txt");

Anonymous

 

(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 prongs (Updated the item)
  • -email is unavailable- added by bens (Posted a comment)
  •  

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

    Date Changed by Updated Field Previous Value => Replaced by
    2017-05-05 bens Open/ClosedOpen Closed
    2017-04-25 bens StatusIn Progress Fixed
    2017-04-24 bens Assigned toNone bens
    2016-11-12 bens StatusNone In Progress
    2016-10-19 prongs Attached File- Added 0001-feature-add-search-facility-to-help-Search-and-map.patch, #38762
        Attached File- Added 0001-feature-add-search-facility-to-help-Through-subinstance.patch, #38763
    2014-06-14 bens Summary[Feature request] Enable search [^W] in help [^G] [Request] enable search (^W) in help (^G)

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code