“Quick refresh” context menu for search results
-
I was about to write exactly the same topic as here:
https://community.notepad-plus-plus.org/topic/17118/refresh-search-in-files-resultActually, everything is said in this post, so I’ll quote the question here:
“To Nio Feb 15, 2019, 3:31 PM
Hi,
I have performed a search in files in notepad++, but, after performing some modifications in files for which there are results, such results became obsolete (line number of found text have changed) and then, when double clicking to go to a result, cursor is not positioned at the line where result actually is. My question is then: is there a way to refresh search results other that performing the full search again ? And better, as in eclipse for example, automatically refresh affected search results when a matching file has been modified ?”@Alan-Kilborn suggested a “Quick refresh” context menu in the search results window and this would be extremly useful. If many people agree that this would be useful maybe the NPP developpers can be convinced to implement it (I think it isn’t complicated to implement).
It seems this is the corresponding feature request: https://github.com/notepad-plus-plus/notepad-plus-plus/issues/9633 (although not exactly).
-
@datatraveller1 said in “Quick refresh” context menu for search results:
(although not exactly).
I would recommend a new issue for this, because it’s not identical, and it will get more attention that way. But maybe in your new issue, link to that one and say, “mine is similar to #9633, but it happens even when I just edit the text inside Notepad++, not just when an external process edits the file as in that other issue” – that way, they see that you are trying to do your research and trying to be helpful.
(I think it isn’t complicated to implement)
Recommendation: don’t use that line in the official issue. Developers hate being told “this should be easy”, because that usually comes from someone who has no clue how hard coding some tasks can be, especially when trying to avoid unintended consequences and make it actually usable.
-
I think it isn’t complicated to implement
this should be easy
WHY are people compelled to say this??
Especially bad is that I DON’T ever say this, but yet @datatraveller1 has made it look like I did when he said something like that in the paragraph that starts out “Alan-Kilborn suggested…”
I’ve learned lots of things by working in the industry for 32 years. One of those things is that even the most deceptively simple aspect of an engineering task can turn out to be excruciatingly complex, if not impossible to achieve.
Do people take their auto to the mechanic shop and say “it should be simple for you to fix my problem”? If it were me, I would be so afraid to say this that I couldn’t get the words out. I can only imagine the high repair charge I would be quoted, if I did say something.
Recent experience: I was looking into “fixing” Notepad++'s Column Editor feature (where it can auto-insert a column of incrementing numbers for you). You can “zero-pad” the number inserted, but you can’t “space-pad” them. I was going to add the space-padding part. Well, to actually do the space-padding, the change is easy; it is actually a “one character” insertion in the source code! However, adding all of the changes necessary from the UI level all the way down through how the existing software is architected…well, there are so many changes and new lines of code that I think I am going to give up my attempt to make this (“easy”) change.
-
@PeterJones said in “Quick refresh” context menu for search results:
Recommendation: don’t use that line in the official issue. Developers hate being told “this should be easy”
ok. :-)
Actually, it doesn’t matter whether I think it’s easy or not (maybe I’m wrong).
But more importantly, we really need a voting system for feature requests to see which feature requests users really want, don’t we?
-
we really need a voting system for feature requests to see which feature requests users really want, don’t we
Arguably. But, as far as I can tell, that would have to be added by GitHub, not by the Notepad++ developers. I have always had the impression that GitHub’s intention is that 👍 is sufficient for the task of feature-voting.
-
we really need a voting system for feature requests to see which feature requests users really want
I’d tend to agree on this point. At least that way, developers would have a better mechanism than hunting for “thumbs up” (which I’m certain they don’t do).
From my somewhat long observation, the new features that get added, and even the bugs that get fixed, are somewhat arbitrary and not user driven.
The Notepad++ developers don’t keep their fingers on the pulse of user wants, and this is shown by their lack of real presence right here on this forum.
But, of course, it is their project, so they can do what they want with it. They are unpaid, donating their time. But so also are the big support contributors on this site.
-
So let’s consider a “quick refresh” context menu choice for Search results. Fairly simple to add a menu item. User invokes menu item, what happens? Oh, software reruns the search? Well, how does it do that??
This would presume that whatever is right-clicked upon has some way of knowing what the search was. All it actually “knows” is what the search term was (because it can read that from the text in the window). It doesn’t know the state of the Match case checkbox at the time of the search, it doesn’t know the Search mode, it doesn’t know if the item came from a Find All in Current Document or a Find in Files, and if a Find in Files what was the Directory, the Filters, etc., etc. So a major code restructuring would have to take place in order for each search to be retained so that this stuff could be recalled when needed, i.e., when a quick-refresh is called for.
The Search results window is pretty much just a dumping ground for output. It doesn’t carry around a lot of extra data about the search that was conducted, for purposes of reconstructing that search later. Why? Because whomever wrote that code didn’t think it was necessary for it to do so. And, up until this point, it wasn’t needed.
-