Git Product home page Git Product logo

Comments (9)

bittner avatar bittner commented on June 27, 2024

Can you please start gedit from a terminal, reproduce the situation of the screenshot, and paste the error output (in the terminal) here?
Most probably, some paths are different on Debian as opposed to Ubuntu, or you're using Python 2.7 instead of Python 3.

from gedit-rest-plugin.

speendo avatar speendo commented on June 27, 2024

Thanks for the reply!

I'd love to, but when I start gedit in a terminal, I don't "see it" in the terminal anymore.

I type "$ gedit", a gedit window opens but the terminal shows me a new prompt.

I thought, maybe gedit is backgrounded, but "$ fg" wouldn't get it to the foreground as well.

I don't know how to get debug information. Do you have an idea?

from gedit-rest-plugin.

bittner avatar bittner commented on June 27, 2024

I'm running gedit version 3.10.4 in a GNOME Terminal version 3.6.2 on an (Ed)ubuntu 14.04 Trusty box, and it opens in foreground spitting out (debug) output on the console. -- Try one of the following:

  • Make sure only one gedit instance is running
  • Try using standalone mode (--standalone), run gedit --help for more options
  • Try gnome-text-editor
  • Check whether gedit points to a binary, or it's an alias, or whatever (alias gedit, which gedit, ls -lAF --color=auto $(which gedit), ps aux | grep [g]edit, ...)
  • Install and use reptyr, e.g.
sudo apt-get install reptyr
PID=`ps -A | grep [g]edit | sed -E -e 's/\s*//' -e 's/\s+.*//'`
reptyr -s $PID

As soon as you can see text output of gedit on the terminal console go to Edit -> Preferences -> Plugins in gedit, and deactivate and re-activate the reST plugin.

from gedit-rest-plugin.

speendo avatar speendo commented on June 27, 2024

Hey!

gnome-text-editor worked. Cool!

Here's the output:

$ gnome-text-editor
ImportError: No module named 'reST'

(gnome-text-editor:2287): libpeas-WARNING **: Error loading plugin 'reST'

By the way - Python 3 is at least installed - but Python 2.7 is the standard.

from gedit-rest-plugin.

bittner avatar bittner commented on June 27, 2024

Good, so the plugin (i.e. the Python module reST) is not found in the gedit plugins folder.

  • Can you please follow the installation process step by step, and let me know whether both the reST folder and the reST.plugin file are in either your local or the system's global plugin folder for gedit?
  • Also check whether there are any other working gedit plugins, and where their code is located. You may try to place the reST plugin to the same location.

from gedit-rest-plugin.

speendo avatar speendo commented on June 27, 2024

Thank you for your support!

Previously I linked the plugin and the reST-folder to the /plugins-folder. Obviously, that didn't work. Now I copied them there, which solved the issue. I can now activate the plugin. However, the plugin doesn't work yet. I get

$ gnome-text-editor
Traceback (most recent call last):
  File "/home/<username>/.local/share/gedit/plugins/reST/__init__.py", line 116, in do_activate
    bottom.add_item(scrolled_window, "rest-preview", "reStructuredText Preview", image)
AttributeError: 'Stack' object has no attribute 'add_item'

Maybe it's my fault (again) and not the fault of the plugin.

from gedit-rest-plugin.

bittner avatar bittner commented on June 27, 2024

Looks like an API change that other gedit plugins experience as well (e.g. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=746430 and related changes). I'll try to figure out what to do (in order to keep the plugin working also for gedit < v3.12). Would be nice if you could play the guinea pig and test the resulting code. Please drop me an email (see my profile).

from gedit-rest-plugin.

speendo avatar speendo commented on June 27, 2024

of course!

from gedit-rest-plugin.

bittner avatar bittner commented on June 27, 2024

I have overhauled the code base, and the basics of the plugin are now working in Gedit 3.14. The working code is currently in the gedit-3.14 branch. Please clone the source code as follows and follow the README:

$ git clone -b gedit-3.14 [email protected]:bittner/gedit-reST-plugin.git

Thanks @speendo for testing even though you're already using another editor!

Rendering is automatic at the moment (i.e. each change triggers a re-generation of the HTML to be displayed). I couldn't manage to integrate the menu actions yet (Ctrl+R to render, etc.). I would clean up the source files afterwards and "release" version 3.14 by tagging a commit. (PRs welcome!)
Until then please use the gedit-3.14 branch!

from gedit-rest-plugin.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.