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 317112 - Plugin to pipe to/from external programs
Plugin to pipe to/from external programs
Status: RESOLVED FIXED
Product: gedit-plugins
Classification: Other
Component: General
unspecified
Other Linux
: Low enhancement
: ---
Assigned To: Gedit maintainers
Gedit maintainers
Depends on:
Blocks:
 
 
Reported: 2005-09-24 16:03 UTC by Loïc Minier
Modified: 2019-03-23 20:33 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Loïc Minier 2005-09-24 16:03:19 UTC
Hi,

Kenneth P. Turvey requested in Debian bug http://bugs.debian.org/329401 a plugin
to filter Gedit's buffer with an external program.

This might be a generic solution to bugs such as bug 143827.

Bye,
Comment 1 Paolo Borelli 2005-09-24 16:18:08 UTC
getting access to the text buffer is pretty easy, just a matter of
gedit_get_active_document (a gedit document is a GtkTextBuffer, so you can do
anything on it including pulling all the text as a string).

So this sort of plugin shouldn't be very hard to write.

Note however that performance may not be optimal since you end up with another
copy of the text in memory and then you need to reinsert the elaborated text in
the GtkTextBuffer.

With the upcoming feature of having python plugins, writing a plugin will be
much easier: just a few lines of python and dropping the file in
~/.gnome2/gedit/plugins so I think that custom plugins for any sort of text
operation will be easy to make.

Obviously nothing stops you from invoking awk or other commands from python, if
your really want :)
Comment 2 Steve Frécinaux 2006-03-25 04:53:38 UTC
That's basically what the External Tools plugin does. So I'm going to close this bug as FIXED. Feel free to reopen the bug if I'm wrong.