GNOME Bugzilla – Bug 325086
Nautilus search should search current directory by default
Last modified: 2011-09-08 20:41:06 UTC
When using the search interface in Nautilus the default starting search location should be set to the currently visible location. Use case: I browse to /etc/ in Nautilus but can't remember where a network configuration file is kept. I click search and type eg. "network". Nautilus should start the search in current directory (/etc/) whereas currently it starts searching in my home folder. Thanks for the great work! Other information:
ubuntu bug about that: https://launchpad.net/distros/ubuntu/+source/nautilus/+bug/28537
Created attachment 57682 [details] [review] Interactive search (aka typeahead) enhancement patch Hi, the current nautilus search feature is very powerful but at the same time is too complicated[1] for simple, quickly searches in the current browsed directory, e.g. you've just downloaded a file and wants to locate it in your pretty full "Downloads" folder. To solve that I made a nautilus-findbar[2] patch a while ago but it was also too complicated for the matter and I was told by Alex that for that purpose it was better to just enhance the existent typeahead feature to also look at middle of strings, and so this patch does the following for both icon and list view: - Makes the Interactive search (aka typeahead) accesible from the Edit menu. - Makes the typeahead search at middle of strings. The patch is for spatial window atm, and also has a strange issue that makes the search box only appear in listview if that is the default view when you enter the directory, if you switch to icon view and again to listview then it doesn't show the search box anymore, I would appreciate help on that as I can't find the problem, I'm start thinking that it could be a gtktreeview bug. [1] Requires opening an external window and entering search parameters, which is needed for a general/powerful search. [2] http://supertux.cenobioracing.com/nautilus.html PD: I thought this patch makes sense to attach to this bug instead of create a new one.
Created attachment 57749 [details] [review] Improved patch This new version has fixed the problem I was having plus a typo on the last patch. The "strangeness" were due to widget not having the focus before calling "interactive-search" on it. Btw, it happened only in listview cause if you switch to icon_view the icon_view gets focused (and so you can start typing and typeahead will show up) but if you switch to listview the listview don't get focused and so if you start typing nothing appears (this seems a listview bug), anyway the patch now sets the focus explicitly. For me the patch seems now complete.
+ { "Interactive Search", GTK_STOCK_FIND, N_("_Find in this folder"), + "<control>G", N_("Find files in this folder"), Ctrl-G is for Find Next, per HIG.
I'm not sure why you reused this bug. That is never a good idea, as it causes unnecessary traffic to people interested in the original bug, and can easily cause the original bug to be forgotten. These bugs are really not related at all and should be split up.
I like the functionality of the search (just from looking at the flash demo), but we really need to nail down a consistent model for presenting this sort of thing to the user. The new "Add to Panel" window, for example, presents a fairly similar search interface, except it puts the search box at the top right instead of the bottom left, and hides non-matching items rather than just re-ordering them. Evolution puts a search box at the top right too, except it doesn't work as-you-type; you have to press Enter. Epiphany is more like this nautilus proposal, except it has find previous/next buttons rather than highlighting all matches at once, and no case sensitivity option... and gedit, IIRC, decided against this sort of search bar altogether, and reverted to a dialog :/ I think we've found a good topic to add to the HIG....
(In reply to comment #5) > I'm not sure why you reused this bug. That is never a good idea, as it causes Well, I thought the reporter wanted to search in the current directory and my patch provides a way to do that, but you're right they are different bugs and was not a good idea. So I opened bug 328725 , a new version of the patch is attached there.
(In reply to comment #6) > doesn't work as-you-type; you have to press Enter. Epiphany is more like this > nautilus proposal, except it has find previous/next buttons rather than > highlighting all matches at once, and no case sensitivity option... and gedit, I put some comments about that in this email: http://mail.gnome.org/archives/nautilus-list/2005-November/msg00016.html
In reference to the original bug. Not only should the current directory be the default search, it seems best to me that the "location" button should be visible when ctrl-f is first pressed. Case in point: A user does not have nautilus upen to the directory to be searched. The have to open nautilus (one-two clicks), navigate to a directory (possibly many clicks), press ctrl-f and finally enter a search term. Seems overly difficult. The simpler method: open nautilus (one-two clicks), press ctrl-f, select directory enter search term. You get the idea: save a few clicks and some effort. :)
Comment on attachment 57749 [details] [review] Improved patch Marking obsolete as this patch has a new home at bug 328725.
(In reply to comment #9) > In reference to the original bug. Not only should the current directory be the > default search, it seems best to me that the "location" button should be > visible when ctrl-f is first pressed. > > (...) > The simpler method: open nautilus (one-two clicks), press ctrl-f, select > directory enter search term. > True, you should be able to choose the directory in normal nautilus browsing as well as in "choose directory" mode after hitting ctrl+F. But in any case you need clicks for choosing the directory :) I think the search function would be a lot nicer to use if this was fixed. Also, the search-bar can than sanely be put *beneath* the location button-series; it does not replace it's functionality. I think it could all be put in the bar that currently appears as "search results" (although re-disigning the GUI might be topic for a different bug)
*** Bug 345803 has been marked as a duplicate of this bug. ***
*** Bug 346933 has been marked as a duplicate of this bug. ***
*** Bug 351306 has been marked as a duplicate of this bug. ***
Created attachment 71760 [details] [review] search location fix This patch corrects nautilus' behavior. Searches are started from the _current directory_.
*** Bug 351616 has been marked as a duplicate of this bug. ***
could you send that patch on the nautilus list?
Commited.
As noted by Mark Florian on the Ubuntu bug ( https://launchpad.net/distros/ubuntu/+source/nautilus/+bug/28537 ), this patch doesn't fix the issue in spatial mode, only in browser mode.
reopening according to previous comment, only the browser mode has been changed
*** Bug 359695 has been marked as a duplicate of this bug. ***
This bug still seems to be in version 2.20.0 of nautilus. Has it been fixed in the most recent version?
*** Bug 410563 has been marked as a duplicate of this bug. ***
*** Bug 553021 has been marked as a duplicate of this bug. ***
*** Bug 428568 has been marked as a duplicate of this bug. ***
Current nautilus-search is not intuitive at all to me. It's too complicated and i'd like Nautilus to return to basics for a better user experience : Since Nautilus is there for browsing files and not for searching files, user expectation while making a search within Nautilus is to reveal a specific file in the current folder (maybe highlighting it) and not to replace current folder with a new list of files. To make a comparison, searching a word in a webpage displayed in my webbrowser is a browser task whereas searching a word through the web is not. I don't expect Nautilus to scan all my directories to search files. That is a job for a dedicated searching application (gnome-search-tool or a GUI for Beagle/Tracker today, Zeitgeist tomorrow for instance). That dedicated application would have an optimized GUI for searching and would sort files by types for instance (like spotlight http://www.inspectmygadget.com/wp-content/images/spotlight.jpg ). But having both "search within current directory" and "search within all directories" functionalities within Nautilus is confusing. It breaks the GUI consistency (=the window is supposed to display a directory). Moreover it prevents GNOME desktop to focus on a dedicated Search GUI. To sum up things : - Nautilus is there for browsing files. - Searching a file within current folder is an expected functionality of a file browser. - Searching a file anywhere on the hard drive is not an expected functionality of a file browser. Its confusing and it's not optimized. Let a dedicated application do that job.
(In reply to comment #26) > Current nautilus-search is not intuitive at all to me. It's too complicated and > [snip] > To sum up things : > - Nautilus is there for browsing files. > - Searching a file within current folder is an expected functionality of a file > browser. > - Searching a file anywhere on the hard drive is not an expected functionality > of a file browser. Its confusing and it's not optimized. Let a dedicated > application do that job. I agree with you, in my opinion the "I want to find a file in this folder" experience could be improve and also more discoverable to the user, if you're interested see bug 170352 PD I'm not against nautilus having a full search interface if it does not get in the way of the normal nautilus use.
I think that with GNOME 3 and GNOME Activity Journal/Zeitgeist, Nautilus should focus on searching within the current directory and let other tools performing the "search my hard drive" task
antistress, I agree. The current search mess with gnome-search-tool, nautilus (with different backends) and the native [tracker|beagle] ui is not good. I'd say we provide a small search entry at the top right corner (like firefox) and have it filter the current folder for files matching that pattern.
that would be great :-)
Marcus Carlson: When you say current folder, do you mean current folder including subdirectories?
To my mind, subdirectories should not be include by défault. Eventually we may consider having an option for this but i'm not sure : it may be a task for anhother tool like gnome-search-tool
In the search mess, I also forgot zeitgeist - so we really need to fix this - I'll bring it up on the mailing list. Patrick, I agree with antistress, we should only filter what we see in the view - although I'm not sure how to do with the list/tree view...
(In reply to comment #29) > I'd say we provide a small search entry at the top right corner (like firefox) > and have it filter the current folder for files matching that pattern. How about a small filter bar like gthumb has?
Jef, I just tried gthumb and I was thinking about something simplier and instant filtering.
The reported bug is now fixed in git master. Please open new enhancement requests for more radical changes to the nautilus search system.