Author Topic: Search result sorting for "find in files"  (Read 8883 times)

Offline Fnar

  • Single posting newcomer
  • *
  • Posts: 6
Search result sorting for "find in files"
« on: February 08, 2012, 09:39:32 am »
Ubuntu 11.10
Code::Blocks SVN 7783

If i have a big project with several subfolders and lots of files the results of "find in files" in scope "project files"  seem to be in no logical order. Also if i quit Code::Blocks and restart it the same search will result in a different order of the search results.

Is this intended or is there some way to sort the search results in any way?
« Last Edit: February 08, 2012, 09:58:28 am by Fnar »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12006
    • Travis build status
Re: Search result sorting for "find in files"
« Reply #1 on: February 08, 2012, 10:06:10 am »
Use the ThreadSearch plugin, it is million times better :)
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Fnar

  • Single posting newcomer
  • *
  • Posts: 6
Re: Search result sorting for "find in files"
« Reply #2 on: February 08, 2012, 10:36:54 am »
If i use thread search for find in files then i have 2 different settings for search options, one for "thread search" and one for "find" which i both need. Also i do not see these options unless i open the option window. Normal search has the options in the same window that i need to type the search string into.

Also there seems to be no way to create a keyboard shortcut to set the focus into the search field.
Using "find in files" its: "keyboard shortcut - type search string - enter" which is quite comfortable if you use it alot.

Why was the the search list changed from list to hash (for speed i suppose) if there was threadsearch available for faster searches?

Offline Fnar

  • Single posting newcomer
  • *
  • Posts: 6
Re: Search result sorting for "find in files"
« Reply #3 on: February 08, 2012, 11:00:17 am »
How about changing the columns in the search result window so you can sort alphabetically by clicking on them. That way the speed of the search using hash would not be lost.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12006
    • Travis build status
Re: Search result sorting for "find in files"
« Reply #4 on: February 08, 2012, 12:32:23 pm »
Patches welcome for the Find in files feature.

You can assign a shortcut for the "View -> Focus Thread Search" menu item using the keybinder plugin.
Unfortunately setting options is not that easy, but this is done in order to save space.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Fnar

  • Single posting newcomer
  • *
  • Posts: 6
Re: Search result sorting for "find in files"
« Reply #5 on: February 08, 2012, 03:31:04 pm »
This should do the trick.

With these changes there is an option in the "find in files" dialog to sort the search results alphabetically by file path/name.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12006
    • Travis build status
Re: Search result sorting for "find in files"
« Reply #6 on: February 08, 2012, 03:42:39 pm »
Please don't use attachments in the forum, because they are deleted after a while when the space runs out.
Also for patches the proper place is our patch tracker at berlios.de
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Fnar

  • Single posting newcomer
  • *
  • Posts: 6
Re: Search result sorting for "find in files"
« Reply #7 on: February 08, 2012, 03:56:28 pm »
Thanks, added it to BerliOS, Patch ID 003251.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12006
    • Travis build status
Re: Search result sorting for "find in files"
« Reply #8 on: February 08, 2012, 04:20:35 pm »
No, you have not! Please don't try to upload the .rar file, because it doesn't work, just upload the .patch file.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9496
Re: Search result sorting for "find in files"
« Reply #9 on: February 08, 2012, 04:21:03 pm »
Thanks, added it to BerliOS, Patch ID 003251.
The patch is corrupt. Only ascii based attachments / patches are allowed (due to the restrictions of BerliOS). Merge your single patches into one (i.e. using SVN DIFF > MYPATCH at the root of SVN trunk) and attach it as ascii to the patch tracker.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline Fnar

  • Single posting newcomer
  • *
  • Posts: 6
Re: Search result sorting for "find in files"
« Reply #10 on: February 09, 2012, 06:51:45 am »
Can view it now under "View raw patch" so hopefully it works now.