After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 325086 - Nautilus search should search current directory by default
Nautilus search should search current directory by default
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: File Search Interface
2.15.x
Other All
: Normal normal
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
: 345803 346933 351306 351616 359695 410563 428568 553021 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2005-12-27 21:55 UTC by Roger Trevor
Modified: 2011-09-08 20:41 UTC
See Also:
GNOME target: ---
GNOME version: 2.15/2.16


Attachments
Interactive search (aka typeahead) enhancement patch (8.77 KB, patch)
2006-01-20 00:18 UTC, Nelson Benitez
none Details | Review
Improved patch (8.24 KB, patch)
2006-01-20 21:14 UTC, Nelson Benitez
none Details | Review
search location fix (1014 bytes, patch)
2006-08-28 10:55 UTC, Florian Boucault
committed Details | Review

Description Roger Trevor 2005-12-27 21:55:52 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:
Comment 1 Sebastien Bacher 2006-01-14 14:03:55 UTC
ubuntu bug about that: https://launchpad.net/distros/ubuntu/+source/nautilus/+bug/28537
Comment 2 Nelson Benitez 2006-01-20 00:18:34 UTC
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.
Comment 3 Nelson Benitez 2006-01-20 21:14:02 UTC
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.
Comment 4 Christian Persch 2006-01-20 21:59:12 UTC
+  { "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.
Comment 5 Alexander Larsson 2006-01-23 11:24:00 UTC
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.
Comment 6 Calum Benson 2006-01-24 13:45:42 UTC
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....
Comment 7 Nelson Benitez 2006-01-26 13:59:35 UTC
(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.


Comment 8 Nelson Benitez 2006-01-27 16:09:28 UTC
(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

Comment 9 Ryan 2006-03-18 01:09:35 UTC
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 10 Martin Wehner 2006-04-07 21:45:31 UTC
Comment on attachment 57749 [details] [review]
Improved patch

Marking obsolete as this patch has a new home at bug 328725.
Comment 11 milouny 2006-05-21 09:52:49 UTC
(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)
Comment 12 Fabio Bonelli 2006-06-24 12:36:03 UTC
*** Bug 345803 has been marked as a duplicate of this bug. ***
Comment 13 Fabio Bonelli 2006-07-09 14:23:19 UTC
*** Bug 346933 has been marked as a duplicate of this bug. ***
Comment 14 Fabio Bonelli 2006-08-14 22:44:22 UTC
*** Bug 351306 has been marked as a duplicate of this bug. ***
Comment 15 Florian Boucault 2006-08-28 10:55:32 UTC
Created attachment 71760 [details] [review]
search location fix

This patch corrects nautilus' behavior. Searches are started from the _current directory_.
Comment 16 Sebastien Bacher 2006-09-30 22:29:36 UTC
*** Bug 351616 has been marked as a duplicate of this bug. ***
Comment 17 Sebastien Bacher 2006-09-30 22:31:04 UTC
could you send that patch on the nautilus list?
Comment 18 Alexander Larsson 2006-10-02 11:06:31 UTC
Commited.
Comment 19 Chris Lord 2006-10-04 10:36:57 UTC
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.
Comment 20 Sebastien Bacher 2006-12-17 14:58:23 UTC
reopening according to previous comment, only the browser mode has been changed
Comment 21 Sebastien Bacher 2007-02-01 13:06:56 UTC
*** Bug 359695 has been marked as a duplicate of this bug. ***
Comment 22 Patrick May 2007-12-10 03:33:12 UTC
This bug still seems to be in version 2.20.0 of nautilus. Has it been fixed in the most recent version?
Comment 23 Cosimo Cecchi 2008-01-29 20:31:53 UTC
*** Bug 410563 has been marked as a duplicate of this bug. ***
Comment 24 Alexander Kojevnikov 2009-08-19 01:49:37 UTC
*** Bug 553021 has been marked as a duplicate of this bug. ***
Comment 25 Alexander Kojevnikov 2009-08-19 01:53:32 UTC
*** Bug 428568 has been marked as a duplicate of this bug. ***
Comment 26 antistress 2009-08-19 10:40:55 UTC
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.
Comment 27 Nelson Benitez 2009-08-19 12:09:54 UTC
(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.
Comment 28 antistress 2009-09-16 14:00:13 UTC
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
Comment 29 Marcus Carlson 2009-10-02 21:40:10 UTC
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.
Comment 30 antistress 2009-10-04 17:24:39 UTC
that would be great :-)
Comment 31 Patrick May 2009-10-04 17:32:06 UTC
Marcus Carlson: When you say current folder, do you mean current folder including subdirectories?
Comment 32 antistress 2009-10-04 17:38:39 UTC
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
Comment 33 Marcus Carlson 2009-10-04 19:31:01 UTC
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...
Comment 34 Jef Driesen 2009-10-05 06:27:49 UTC
(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?
Comment 35 Marcus Carlson 2009-10-05 09:26:53 UTC
Jef, I just tried gthumb and I was thinking about something simplier and instant filtering.
Comment 36 Cosimo Cecchi 2011-09-08 20:41:06 UTC
The reported bug is now fixed in git master.
Please open new enhancement requests for more radical changes to the nautilus search system.