Created attachment 3906 proof of concept Hi, In previous (pre 3.0) versions of nautilus, emblems were apparently stored in the GFileInfo metadata: a stringv in "metadata::emblems", which could be set/viewed either by nautilus or by gvfs-set-attribute/gvfs-info (e.g. "gvfs-set-attribute -t stringv /home/mrpouit/PDF metadata::emblems emblem-danger", and "gvfs-info -a metadata::emblems PDF"). I think this was hidden with nautilus 3.0, and seems to be back with nautilus 3.2 (http://git.gnome.org/browse/nautilus/commit/?id=6775e582bcd332eaed925f41555fe4e5c0a3dd71). Thunar uses a different format for emblems, stored in metafile.tdb. Now, I don't know whether you'd want to consider that, but I thought it could be nice to use the same storage for emblem names as nautilus, so if you have to migrate from nautilus to Thunar, you don't lose your emblems (or when you use synchronization apps that use emblems to reflect the server/local file status). Other advantages could be that emblems are moved/duped automatically on file move/copy by gio (bug #3675), and accessible through GFileInfo/ThunarFileInfo without new API (bug #6055). However, I haven't made any measurement, so maybe it's slower/heavier than tdb... What do you think? I attach a quick patch/proof of concept: it migrates the tdb emblems to metadata::emblems, and read/write them from there by default. It's just a (rough/buggy) start, but can be useful to test (I guess?). Thanks for your time.
Fixed in master. Still needs some testing. I don't care about migration for emblems since it not extremely important.