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 662103 - GEdit Snippets do not work when editing files remotely over SFTP
GEdit Snippets do not work when editing files remotely over SFTP
Status: RESOLVED FIXED
Product: gedit
Classification: Applications
Component: snippets
2.30.x
Other Linux
: Normal normal
: ---
Assigned To: Gedit maintainers
Gedit maintainers
Depends on:
Blocks:
 
 
Reported: 2011-10-18 15:13 UTC by Julian Lam
Modified: 2012-01-20 22:00 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Julian Lam 2011-10-18 15:13:19 UTC
I am attempting to use gedit's "snippets" plugin. They work great in Ubuntu, but I've since switched to Debian. Now, even though I have enabled Snippets, they don't work when I am editing files on a remote (SFTP) server.

They work great locally (create file, set language as PHP, try snippets), which is of small comfort, since I'd prefer to work on the remote server.

Is this a bug in gedit Debian? I am using Squeeze.

Reproduction steps (Using Debian Squeeze 6.0.2):

    In gedit, enable Snippets (Edit -> Preferences -> Plugins -> Check "Snippets")
    Open a new SFTP connection in nautilus (Places -> Home -> Ctrl-L -> sftp://any.site.that/you/can/access/through/SFTP
    Double-click on a php file to open it in gEdit
    Type "foreach" and press tab. The rest of the code should be automatically filled in. Note that this does not occur.
    Open a new document (Ctrl-N)
    Set the language (at the bottom) from "Plain Text" to "PHP"
    Type "foreach" and press tab. Note that the rest of the code does automatically populate now.

At GNOME IRC, jaliste suggested that I run gedit from the terminal. This provided a traceback which I am including here as well:

http://pastebin.com/45MzeHjK

Thanks
Comment 1 Julian Lam 2011-10-18 15:23:16 UTC
The traceback included below:

Traceback (most recent call last):
  • File "/usr/lib/gedit-2/plugins/snippets/Document.py", line 796 in on_view_key_press
    return self.run_snippet()
  • File "/usr/lib/gedit-2/plugins/snippets/Document.py", line 640 in run_snippet
    if not self.run_snippet_trigger(word, (start, end)):
  • File "/usr/lib/gedit-2/plugins/snippets/Document.py", line 617 in run_snippet_trigger
    return self.apply_snippet(snippets[0], bounds[0], bounds[1])
  • File "/usr/lib/gedit-2/plugins/snippets/Document.py", line 524 in apply_snippet
    self.update_environment()
  • File "/usr/lib/gedit-2/plugins/snippets/Document.py", line 479 in update_environment
    os.environ[var] = variables[var](buf)
  • File "/usr/lib/python2.6/os.py", line 471 in __setitem__
    putenv(key, item)
TypeError: putenv() argument 2 must be string, not None

Comment 2 Ignacio Casal Quinteiro (nacho) 2011-10-18 22:30:13 UTC
Quite a lot of fixes came into snippets in the version 3.2.0 would be good to get this tested in that version.
Comment 3 jessevdk@gmail.com 2012-01-20 22:00:56 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.