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 154621 - Insert file...
Insert file...
Status: RESOLVED WONTFIX
Product: gedit-plugins
Classification: Other
Component: General
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: Gedit maintainers
Gedit maintainers
Depends on:
Blocks:
 
 
Reported: 2004-10-05 22:06 UTC by Amadeus
Modified: 2019-03-23 20:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Insert file python plugin (1021 bytes, application/x-compressed-tar)
2005-12-31 06:56 UTC, Dave Barry
Details

Description Amadeus 2004-10-05 22:06:16 UTC
Emacs and XEmacs can insert a file in the place where the curser is.

I think it is a important feature in an editor to have.
Comment 1 Paolo Borelli 2004-10-06 07:28:36 UTC
I don't think it is a very frequent operation, and the few times it happens
people will just open the file, select all and paste the contents.

That said, implementing the feature as a plugin should be fairly simple.
Comment 2 Amadeus 2004-10-06 14:41:17 UTC
You are probably right a plugin would suite better for this...

Thanks for your reply.

Comment 3 Dave Barry 2005-12-31 06:56:51 UTC
Created attachment 56581 [details]
Insert file python plugin

Here is a python plugin that implements the insert file functionality
Comment 4 Paolo Borelli 2006-01-02 09:51:12 UTC
Nice... The "right" way to do it would be to use gedit's functions to load a file, but given that we have not provided such an api yet your plugin does the trick. The problem with such an approach are that 1) works only for local files and 2) it blocks the gedit interface during I/O
Comment 5 nemoinis 2008-04-29 02:28:16 UTC
Another way to create an "Insert File" function:

-gedit->Tools->External Tools...
-click on New, name it "Insert File"
-Description=Insert a file at current cursor position
-Commands:
#!/bin/sh

cat "`zenity --file-selection --title="Select File to Insert - gedit" `"

-Input: Nothing
-Output: Insert at cursor position
-Applicability: All documents

It requires you to have zenity installed.  Works for me...
Comment 6 jessevdk@gmail.com 2009-01-02 18:31:27 UTC
This is also possible with a snippet (for example with dnd). I'm closing this bug.