How Do I Delete Search Entries?
-
Hi guy, honestly I didn’t try it out either before pointing the OP to your earlier posting, as I have no need for more than 10 in history. I just assumed it worked fine. However, after the OP asked some more questions, I tried 99 in for the find-history and that’s when it got interesting, as Notepad++ then didn’t remember ANY of my history. So that sent me looking through the source code, and, long story short, I learned some things. So it just goes to show that even if you’re not going to use a feature, perhaps some good things can be learned when exploring how others might be using it. :)
-
@Scott-Sumner said:
Also, keep in mind these limits (copied from the source code) if you are going to make changes to the default values in the config file:
const int NB_MAX_FINDHISTORY_FIND = 30; const int NB_MAX_FINDHISTORY_REPLACE = 30; const int NB_MAX_FINDHISTORY_PATH = 30; const int NB_MAX_FINDHISTORY_FILTER = 20;
Interestingly, if you change the config file value to something larger than these limits, NO history from a previous run is used in a new run of Notepad++. I would have thought that it would be capped to the values above, but this is not the case.
Thanks! I tried the info you posted and it works! I made search 30 entries, closed and reopened and it kept all 30.
@Scott-Sumner said:
AFAIK, feature requests go here:
https://github.com/notepad-plus-plus/notepad-plus-plus/issues
Create a new “issue”You can only edit a posting for something like 3 minutes. No big deal; if you have a correction and it has been longer than that, just create a entry in the thread detailing your correction.
Thanks for the link. I made the request a couple of days ago. I’m wondering if I should add to it by asking for a feature to be able to extend the amount saved in the search history without having to change it manually by editing it. There is no way I would have been able to figure that out and obviously isn’t a user-friendly way of doing it.
Also, thanks for the editing info.
-
Link to the issue that was opened: https://github.com/notepad-plus-plus/notepad-plus-plus/issues/2931
-
Should I edit and intersperse this new info into what is there already? My concern is that it won’t bump it to the top because the post will be edited, and the person(s) that is supposed to see it won’t because it’s a couple of days old and they may have already looked at my request.
Or should I make a new request that is linked to it like using Reply so it bumps it to the top? When I went into my request just now, I noticed that underneath my request has a section to enter new info similar to using Reply. -
If you mean “extending the amount saved in the search history without having to change it by manual editing…” then that sounds like a separate request to me. Don’t be overly optimistic about your requests being worked on. :)
-
Hello all,
@Scott Sumner wrote:
AFAIK you can’t delete them from within Notepad++. You could delete unwanted items in the search history from the XML file they are saved in, once you quit Notepad++, but this is rather burdensome…
Once in a while I replace “config.xml” with a backup file not containing any search-entries.
Still burdensome. :)Best regards.
-
@Scott-Sumner said:
If you mean “extending the amount saved in the search history without having to change it by manual editing…” then that sounds like a separate request to me. Don’t be overly optimistic about your requests being worked on. :)
I’ll try not to. I see there are over a thousand open cases pending. I’m hopeful that the features I requested are simple to add and that the dev(s) feel that they are important features to have and will add them right away!
BTW, I just made the feature request to increase the amount and save whatever is in the search history before it’s closed and reopened.
-
@guy038 said:
In addition, I build my own regexes, either for improving my knowledge about regular expressions or for specific tasks. Keeping a list of all of them doesn’t seem pertinent !
Guy, I agree with you that keeping a list of all RegExes would be overwhelming and not much use. I do, however, keep a list of RegEx expressions that have been particularly helpful or I’ve spent a lot of time figuring out (sometimes many hours!). Even those are hard to organize, but I just keep them in a text file, rather than trying to retrieve them within N++ settings. And you’re right, if nothing else, I often modify them even when I look them up to reuse them, but at least I have a starting point. Of course, your skill level with RegExes is exponentially higher than mine, but for us ordinary folk, it’s helpful to have somewhere to start. :) I’ve also started using the spaced, commented format you recommended in this post!
One thing that may assist with retrieving previously-used RegEx strings from the Find or Replace box is to use the scroll wheel on the mouse while that box has the focus. I’ve noticed if you just use the drop-down box, it displays up to 30 rows, and you can’t select any string further back than that. However, if you use the scroll wheel, it can access much more than that. I tested up to 56 rows and then stopped, so I’m not sure what the upper limit is - not considering what is saved when exiting the program and re-opening, just what is available while the program is open. It appears you can access further back by selecting the last item from the drop-down list, then, without doing a find or replace, re-open the drop-down list, which will show the next 30 items. However, once you’ve gotten further down the list, you can only go higher on the list by using the scroll wheel or doing a find to reset the drop-down box. Hope this helps someone!
-
Yes, it is so burdensome.
We must close notepad++, then delete search history in config.xml within anther text editor and save it, then reopen notepadd++.
If one directly open config.xml and modify it within notepad++, it does not work, because notepad++ does not reload configurations and will rewrite config.xml using its cached data in memory when it quits. -
I said in How Do I Keep Multiple Tabs Saved in Notepad++?:
I just poked that issue#2931: Scott, who you were talking with in that other topic from 2017, is now on the dev team, and I thought he might find it interesting to revisit the workaround he did 4 years ago and put it into the actual codebase.
Scott replied in the issue: he actually incorporated that change in v7.9.3, so the delete key removes the current entry from the search history.
-
@PeterJones said in How Do I Delete Search Entries?:
I said in How Do I Keep Multiple Tabs Saved in Notepad++?:
I just poked that issue#2931: Scott, who you were talking with in that other topic from 2017, is now on the dev team, and I thought he might find it interesting to revisit the workaround he did 4 years ago and put it into the actual codebase.
Scott replied in the issue: he actually incorporated that change in v7.9.3, so the delete key removes the current entry from the search history.
Thanks! It works! Now the next thing is to have the number of entries that are saved after closing N++ be increased to at least 20. What is the best way to submit that request?
-
@PeterJones I just checked my email and saw the links to the post I made regarding increasing the number of saved entries because you posted about deleting the entries. It’s been a while and I forgot where I posted it and assumed the issue was buried.
I see that the issue is still open and a couple of people have commented on it, as late as 2020. What’s the best way to handle this? Should I go back to that open request and ask again or is there another way to deal with this?
-
It is confusing when you say “saw links to the post I made…” and then don’t tell us what link you are talking about. How are we supposed to know?
But I went “above and beyond” and I think I found what you are talking about, am I right?:
https://github.com/notepad-plus-plus/notepad-plus-plus/issues/2944
-
You asked for 100 (or more) entries in the find history.
The developers, prior to your request, had implemented a way to get 30, which is a 3x “improvement” over the standard 10.
Now, while the method for obtaining 30 is a bit strange (editingconfig.xml
with Notepad++ not running), I tested it in the 8.0RC version and it does work to retain 30.Probably the developers think 30 is enough?
I agree that is enough.
Any more than that, you’d spend more time trying to look through all of the entries in order to find what you want, rather than just entering it fresh.I have no insight as to why the devs left your issue open if they think 30 is a good limit. But, it joins many other issues that are left open as well!
-
@Alan-Kilborn said in How Do I Delete Search Entries?:
I have no insight as to why the devs left your issue open
:-D so that they continue to have something to do? :-D
-
@Alan-Kilborn said in How Do I Delete Search Entries?:
You asked for 100 (or more) entries in the find history.
The developers, prior to your request, had implemented a way to get 30, which is a 3x “improvement” over the standard 10.
Now, while the method for obtaining 30 is a bit strange (editingconfig.xml
with Notepad++ not running), I tested it in the 8.0RC version and it does work to retain 30.Probably the developers think 30 is enough?
I agree that is enough.
Any more than that, you’d spend more time trying to look through all of the entries in order to find what you want, rather than just entering it fresh.I have no insight as to why the devs left your issue open if they think 30 is a good limit. But, it joins many other issues that are left open as well!
Are you saying that now 30 entries can be saved? If so, how do I enable that?
-
This was described for you in your issue#2944 (admittedly almost a year later, so you might not have noticed, though GitHub should have notified you of the reply).
You have to edit
config.xml
and changenbMaxFindHistoryFind="10"
tonbMaxFindHistoryFind="30"
. (You cannot go higher than 30.) Note: when manually editing config files, you have to follow the “Editing Configuration Files” description in the npp-user-manual.org/docs/config-files/ – if you don’t follow that procedure, Notepad++ might overwrite your changes toconfig.xml
when it closes.Note that the
nbMaxFindHistoryFind
setting has existed since 2009 – so it definitely was available when you asked your question in 2017. Though they did fix a bug in v7.8.7 (Apr 2020) where before, if you set nbMaxFindHistoryFind > 30, it would erase your whole history; now it just leaves the history limit to 30 even if you try to set it higher.That setting needs to be described in the “Preferences for Advanced Users” section. I created usermanual issue#241.
-
Correction to what I said earlier: The
config.xml
file can be overwritten by Notepad++ on exit, even if you follow the procedure I linked, so that sequence won’t reliably work forconfig.xml
. To editconfig.xml
, close all instances of Notepad++; editconfig.xml
in some other editor (like Windows’ builtin notepad.exe) and save; reload Notepad++ and the changes should take effect. -
@PeterJones I have to leave now. I’ll be gone most of the day. When I get back, I’ll follow your instructions and let you know if I was successful with it or not.
-
@PeterJones said in How Do I Delete Search Entries?:
nbMaxFindHistoryFind=“10”
Should I change nbMaxFindHistoryPath=“10”, nbMaxFindHistoryFilter=“10” and nbMaxFindHistoryReplace=“10” all to 30 too?
It seems as though they should be changed too, but I dare not do so unless you tell me to do so.