How Do I Delete Search Entries?
-
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…
Another thing you can do is increase the number of items saved in the search history to keep your desired needed items around longer; this posting shows how to do that: https://notepad-plus-plus.org/community/topic/12163/how-to-change-research-list/2
-
I wonder why the search entries can’t be deleted normally.
Another thing I’m wondering is why the person that posted the way to increase the search history never tried it.
I’m also wondering if the value “10” really has any correlation to the number of search entries. I say this because I have 23 search entries in Notepad++, but the value “10” is in my XML file as the poster said it would answering to the OP that stated he had 10 entries. These reasons make me hesitant on changing the value until I get more info.rl)
-
YOU WONDER…
…why the search entries can’t be deleted normally
Because it either wasn’t thought of, or it wasn’t judged an important enough feature to be coded. It isn’t a bad feature to have, as you describe how you think it should work; why don’t you make it a formal feature request?
…why the person that posted the way to increase the search history never tried it
That IS a good question as @guy038 is usually much more thorough. :)
…if the value “10” really has any correlation to the number of search entries…because I have 23 search entries…
During any given run of Notepad++ you can have more (e.g., 23) in the search history than what will be remembered (10, by default) when you quit and restart Notepad++.
-
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.
-
@Scott-Sumner said:
YOU WONDER…
…why the search entries can’t be deleted normally
Because it either wasn’t thought of, or it wasn’t judged an important enough feature to be coded. It isn’t a bad feature to have, as you describe how you think it should work; why don’t you make it a formal feature request?
@Scott Summer, I was considering making a request, but after looking around here, I couldn’t figure out where to submit it.
-
Where do I go to do it?
BTW, editing on this forum doesn’t work out too well. Once I submit something, it won’t allow me to correct or add anything. It happened on my last two posts.
-
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.
-
Hello Troglo37 and Scott,
So, you’re wondering why I didn’t, even, try to change the default limits of 10, aren’t you ?
Well, as I usually try to help some N++ community people about regex problems, I deal with a great lot of completely different regexes, that are rather closed to the needs of each person. 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 !
Moreover, there are so many ways to write correct ( and incorrect too ! ) regexes that, sometimes, I think it’s better to start from 0 and just imagine a new regex ! Then, to my mind, it would be useless to store, even, 50 regexes ! Indeed, each of us have, likely, the opportunity to “slice” text files, in so numerous ways, that implies specific S/R syntaxes for each case, that you will not use anymore !!
To end, when the search or replace field begins and/or ends with some space characters or, worse, with some End of Line characters, it’s, really, not easy to choose between two almost similar items of the history list :-((.
Of course, for people who looks for some true text strings, using the normal or extented search mode, it could be interesting to increase the default history number till its maximum :-)
Best Regards,
guy038
-
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?