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 621097 - Highlight Mode is not remembered with files stored on NFS
Highlight Mode is not remembered with files stored on NFS
Status: RESOLVED FIXED
Product: gvfs
Classification: Core
Component: metadata
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gvfs-maint
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2010-06-09 12:08 UTC by Angel Abad
Modified: 2014-04-06 16:52 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Angel Abad 2010-06-09 12:08:52 UTC
In Ubuntu Lucid  Imran Chaudhry  reported:

I have all my important files stored on an NFS share. I use the "Makefile" Highlight Mode for text files and if I set them on files that are stored on locally mounted NFS shares then that setting will be lost if I close and open the file again.

I just did a test and in fact, this seems to be the case with locally stored files too. Open file, set Highlight Mode, Close file, then re-Open and Highlight Mode is lost.

This worked file in the gedit on Ubuntu Karmic Koala (9.10).

Launchpad ref: https://bugs.edge.launchpad.net/ubuntu/+source/gedit/+bug/584896

Thanks!
Comment 1 Ignacio Casal Quinteiro (nacho) 2010-06-09 12:47:15 UTC
We use the metadata system provided by gio, so reassigning to them.
Comment 2 Ross Lagerwall 2014-04-06 16:52:36 UTC
I think there are two factors here. Ubuntu carry a patch [1] which disables metadata on NFS.

Secondly, there was an issue in gedit with metadata and *.txt files [2].

[1] http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/trusty/gvfs/trusty/view/head:/debian/patches/06_metadata_nfs.patch

[2]
commit 24509405d2ff541013ede6ccb879570c108914e5
Author: Sébastien Wilmet <swilmet@gnome.org>
Date:   Sat Nov 2 19:47:37 2013 +0100

    Load highlight mode from metadata for *.txt files
    
    guess_language() is called when the content type is modified. For a
    *.txt file, the content type has the same value as the init value, so
    the notify callback is not called, and the highlight mode is not
    changed. To fix the problem, we also call guess_language() when the
    document is loaded.
    
    For other files than *.txt, guess_language() is thus called two times in
    loaded(): when the content type is modified (via the notify callback),
    and when guess_language() is called directly.
    
    But it's better two times than zero.