Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editing from Google Drive - freezing #397

Closed
porjo opened this issue Oct 11, 2018 · 5 comments
Closed

Editing from Google Drive - freezing #397

porjo opened this issue Oct 11, 2018 · 5 comments

Comments

@porjo
Copy link

porjo commented Oct 11, 2018

I use Gnome desktop and a Google Drive mount point in the file manager. When I edit a file that is located on Drive, retext freezes regularly as I edit text to the point of being unusable. Editing the same document with Gnome's default text editor has no such problem. Also, editing files on local disk with retext has no such problem.

@mitya57
Copy link
Member

mitya57 commented Oct 11, 2018

Hi!

What method are you using for mounting Google Drive?

@porjo
Copy link
Author

porjo commented Oct 16, 2018

I'm using Gnome's built in 'Online Accounts' facility which integrates with the default file manager 'Gnome Files'. I'm not sure what that uses behind the scenes..

@mitya57
Copy link
Member

mitya57 commented Oct 17, 2018

I looked how GNOME Online Accounts works. By default it creates only a virtual mountpoint, like google-drive://user@example.com/. It can be used only in applications using Gio (such as GTK+ applications), and it is impossible to use it in ReText.

However you can use gvfs-fuse which will create a real mount point, accessible by any application. By default it uses paths like this:

/var/run/user/1000/gvfs/google-drive:host=example.com,user=user/

It is possible to use it in ReText too, but all file names are obfuscated, like 0B0Enb_dYXuZ-cW55NzZoTWlEdW8.

Anyway I was able to edit such files in ReText. Editing itself works fine, but any operations that involve communicating with filesystem are slow, like opening a file or getting a list of recent files. ReText also looks for .css file on every conversion, so that may be a problem here.

So I have several questions to you:

  • What do the file paths look like for you? /var/run/user/UID/gvfs/… or something different?

  • Do you have auto-save enabled?

  • Can you try to comment out these lines and see if it helps?

    retext/ReText/tab.py

    Lines 202 to 204 in e250344

    if QFile.exists(cssFileName):
    headers += ('<link rel="stylesheet" type="text/css" href="%s">\n'
    % cssFileName)

@porjo
Copy link
Author

porjo commented Oct 17, 2018

What do the file paths look like for you?

/run/user/1000/gvfs/google-drive:host=example.com,user=ian/...

Do you have auto-save enabled?

No

Can you try to comment out these lines and see if it helps?

Yes, that seems to fix the issue 👍

@mitya57
Copy link
Member

mitya57 commented Oct 22, 2018

This should be now fixed in master branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants