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 773795 - xattr: add user.xdg.tags support to nautilus-search-engine-simple.
xattr: add user.xdg.tags support to nautilus-search-engine-simple.
Status: RESOLVED OBSOLETE
Product: nautilus
Classification: Core
Component: File Search Interface
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks: 774242
 
 
Reported: 2016-11-01 23:19 UTC by Felipe Barriga Richards
Modified: 2021-06-18 15:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
add support to search in xattrs tags (user.xdg.tags) (4.14 KB, patch)
2016-11-01 23:19 UTC, Felipe Barriga Richards
rejected Details | Review

Description Felipe Barriga Richards 2016-11-01 23:19:01 UTC
Created attachment 338916 [details] [review]
add support to search in xattrs tags (user.xdg.tags)

Added support to search into tags defined in xattrs.
The xattr path is `user.xdg.tags` which is the same used by kde dolphin.
Only files with exact matches on their tags will be included.

To test create a file in a filesystem that support xattr with:

```
setfattr -n user.xdg.tags -v "foo,bar" test.txt
```

and search 'foo' and/or 'bar'
Comment 1 Carlos Soriano 2016-11-03 10:03:04 UTC
Cosimo, I'm not sure we want this or not. Can you chime in? I guess this is what is used by the metadata by tracker etc?
Comment 2 Carlos Soriano 2016-11-10 12:19:06 UTC
Ping Cosimo?
Comment 3 Cosimo Cecchi 2016-11-10 18:14:05 UTC
Sorry, this slipped off my radar...
Without yet commenting on the specifics of the code this patch adds, I am not opposed to adding support for this, but it's unclear to me how one would end up with those tags set in the file xattr in the first place.
If tracker or some other component in GNOME add this data, or if this is somehow an XDG standard, then let's support it. On the other hand, if this is only something one would set from the terminal, then it feels a bit arbitrary to support it...
Comment 4 Carlos Soriano 2016-11-10 19:27:36 UTC
(In reply to Cosimo Cecchi from comment #3)
> Sorry, this slipped off my radar...
> Without yet commenting on the specifics of the code this patch adds, I am
> not opposed to adding support for this, but it's unclear to me how one would
> end up with those tags set in the file xattr in the first place.
> If tracker or some other component in GNOME add this data, or if this is
> somehow an XDG standard, then let's support it. On the other hand, if this
> is only something one would set from the terminal, then it feels a bit
> arbitrary to support it...

I agree, I have the same question, and opinion depending on the answer.
Comment 5 Carlos Soriano 2016-11-10 19:28:07 UTC
and thanks for coming, Cosimo :)
Comment 6 Felipe Barriga Richards 2016-11-10 20:41:42 UTC
(In reply to Cosimo Cecchi from comment #3)
> Sorry, this slipped off my radar...
> Without yet commenting on the specifics of the code this patch adds, I am
> not opposed to adding support for this, but it's unclear to me how one would
> end up with those tags set in the file xattr in the first place.
> If tracker or some other component in GNOME add this data, or if this is
> somehow an XDG standard, then let's support it. On the other hand, if this
> is only something one would set from the terminal, then it feels a bit
> arbitrary to support it...

Somebody need to start using tags on xattrs. If the support to view the tags is non-existent nobody is going to care to write code that use xattrs metadata.

Currently xdg.tags it is used by:
- dolphin: add and display tags
- baloo:
  - https://github.com/KDE/baloo/blob/master/src/file/basicindexingjob.cpp#L102
  - https://github.com/KDE/baloo/blob/master/autotests/unit/file/basicindexingqueuetest.cpp#L159


probably it would be nice to reach somebody at freedesktop to formally add this attribute to:
- https://www.freedesktop.org/wiki/CommonExtendedAttributes/

Currently tracker is mandatory to build nautilus (probably a bug, it seems that the initial idea was to make it optional) so to have support without tracker seems to be fair.
Comment 7 Carlos Soriano 2016-11-11 09:07:44 UTC
Thanks for the info Felipe, yesterday night I pinged tracker maintainer to discuss this. His view is that he is fine having that for us. Tracker is not using xtags so far, so that would need work.

The good thing about this is that we could use tags outside of the tracker tracked directories, and in systemt that doesn't use tracker.

Before going ahead on Nautilus side, I would like to have this in freedesktop and have a clear way on how we do want it. Also we need to talk with designers on how tags would work.

Felipe, since you already went one step further and implemented two patches for this already, would you like to lead the standardization on freedesktop and talking with designers? I would be there to help with anything.
Comment 8 Felipe Barriga Richards 2016-11-15 19:08:01 UTC
Ok, I will reach the freedesktop folks.
By designers you refer to ?
Comment 9 Carlos Soriano 2016-11-16 12:00:33 UTC
Thanks Felipe!

irc.gnome.org #gnome-design , either Allan Day (aday) or Jakub Steiner (jimmac) or Lapo (lapo)
Comment 10 Lapo Calamandrei 2016-11-16 14:54:46 UTC
I think this is a good start and I don't see counter effects in having the ability to view fs eas, I don't think this will bite us when we'll figure out how to use tags accross the platform, Allan, Jakub?
Comment 11 Jakub Steiner 2016-11-16 15:40:32 UTC
I'd like to hear the use cases we're after here. There's a lot that an be understood under tagging.

I can imagine some scenarios like having a file from an email attachment holding reference id or a downloaded file holding the source URI to be able to search for a document/email/webpage and get that file. But I am quite lukewarm towards building a user facing "metadata management" UI in a file browser. Sounds very much like https://zachholman.com/posts/shit-work/
Comment 12 Felipe Barriga Richards 2017-01-26 19:06:13 UTC
One use case is related with Tagging multimedia files (photos, videos, music, etc).
Currently the tags are usually stored in:

a) sidecar (xmp)
pollutes the filesystem. Not straight-forward to do scripts. e.g.: copy all files that has the tag X.

b) embedded
problem: modifies original file

c) database
problem: you can't read tags in another software. if you change the location of the files with an external tool probably you're going to lose the tags. Copying to another computer will also destroy the tags
Comment 13 Carlos Soriano 2017-08-07 10:53:43 UTC
Review of attachment 338916 [details] [review]:

Rejecting patch for now, it would require work on tracker and freedesktop to make it a standard. Now that nautilus hard depends on tracker, it would only make sense if this goes under tracker, rather than in Nautilus.
Comment 14 André Klapper 2021-06-18 15:53:15 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version of Files (nautilus), then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new ticket at
  https://gitlab.gnome.org/GNOME/nautilus/-/issues/

Thank you for your understanding and your help.