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 430683 - Support GNOME/Nautilus Templates
Support GNOME/Nautilus Templates
Status: RESOLVED OBSOLETE
Product: gedit
Classification: Applications
Component: general
3.2.x
Other Linux
: Normal enhancement
: ---
Assigned To: Gedit maintainers
Gedit maintainers
Depends on:
Blocks:
 
 
Reported: 2007-04-17 15:04 UTC by Thilo
Modified: 2020-11-24 09:57 UTC
See Also:
GNOME target: ---
GNOME version: 3.1/3.2



Description Thilo 2007-04-17 15:04:13 UTC
There is a standard for templates that are saved in $HOME/Templates. This bug is for finding out if we want to support those templates for creating new files in GEdit. I think it would makes sense because otherwise users will have to use Nautilus to create them and open them with Gedit afterwards. So this really means an additional step in a workflow. Also I think some users will love such a feature.
Comment 1 Paolo Maggi 2007-04-17 15:10:33 UTC
It would be nice to have a "New from Template" plugin that can:
- create a new file from a Nautilus template
- create a new file from a snippet-like gedit template.
Comment 2 Paolo Borelli 2007-04-20 20:02:39 UTC
"New from template", it something that I would like to see, but it is not clear to me how integration with Nautilus templates would work: is there a way to know which of the files in $HOME/Templates are txt file templates? Is it sufficient to look at the mime type of the template?
Comment 3 Martin Picek 2007-10-16 22:23:55 UTC
I don't think Gedit's templates should be the same as for the whole desktop. The problem's not the binary files, but the differences between templates for whole desktop and the templates for Gedit in their principles. It's because (for example) in Gedit I don't need create ten types of .c files and I don't need to create formatted documents from Gedit. In my opinion, Gedit should have an own structure of the templates.

But... Our problem is maybe over and this bug is maybe duplicite. See #451844.
Comment 4 Alex Cornejo 2007-10-16 22:44:16 UTC
Ok,

I have a working template engine for Gedit, I scrapped the old version completely (I posted some videos of this a while back, but I never got any input) since gtksourcebuffer is not mature enough to support embedded editable fields right now, so it was really just a hack to get editable template variables inplace on the document, and they were lost anyway when the document was saved/reopened.

The current template engine has too many features to list/describe, but it suffices to say it should be as powerful (even more I think) than textmate's template engine. It is by no means complete, but then again, I don't believe that software can be complete (ie. we should strive for perfection, but it is unattainable).

Instead of just attempting to describe what the template plugin currently does, I think it would be easier if I release it, you guys test it out and send me your comments.

So the bottom line is: Is there any interest from the developers in testing this plugin (and possibly including it in gedit's plugin bundle), and if so, what is the procedure to get the plugin aproved. Although I am not a fulltime coder, I can volunteer time to this project until we are all happy with its functionality.

On a different note, I love free software, but so far my experience has been that it is rather difficult to contribute anything to it, since sometimes users (guys who just hack on the software occationally like me) attempt to release an improvement or enhancement, and it never gets reviewed by the developers, so the effort is just lost. I guess that is why there are so many options available, but I think it would be stupid for me to try to release FEdit, just because I am not satisfied with Gedit, I should help Gedit instead. Anyway, just my 2 cents.

Regards,
Alex
Comment 5 Martin Picek 2007-10-17 08:01:21 UTC
> It's because (for example) in Gedit I don't need create ten types of .c files and I don't need to create formatted documents from Gedit.

:-( I wanted to say: "It's because (for example) FROM THE DESKTOP I don't need create ten types of .c files and I don't need to create formatted documents from Gedit." Excuse me, it was about 1:00 AM...
Comment 6 Martin Picek 2007-10-17 08:11:29 UTC
> Instead of just attempting to describe what the template plugin currently does,
I think it would be easier if I release it, you guys test it out and send me
your comments.

Alex, althoug I'm not a developer (so my need of templating engine isn't so high), I would like to test your plugin.
Comment 7 Thilo 2007-10-18 18:27:37 UTC
I rather think if Gedit dont use GNOMEs template system what is it good for then? Most users wont be able to create templates with Nautilus so gedit as the default text editor needs to be compatible with that. I think if developers have special wishes they can either use vim, emacs or create another editor. Making gedit suitable for developers primarily I would consider harmful. 

I thing that there is way too muich redundancy already. So I think GNOME should concentrate on ONE template system - and let external programs and their editors break new grounds.
Comment 8 Alex Cornejo 2007-10-18 18:45:01 UTC
Martin: I appreciate your interest, over the weekend I will create a small website to host the template plugin, I will notify you through here so you can check it out and give me your comments and bug reports.

Thilo: If you are editing text files (as opposed to abiword/openoffice) and you are in need for templates, it is lightly that you will are developing something (be that html, latex or a more "proper" programming language).

I am not very knowledgeable on the gnome platform, but I agree that we should avoid duplicate work. However, AFAIK there is no "GNOME template system", unless you refer to the nautilus "Create New -> xxx", but this is not what one usually calls a template engine/system, since I think it just copies an existing document and gives it a new name.

Adding this functionality to gedit would be rather trivial (that is, add a function that looks inside the nautilus/template folder and copies the content of the selected file to a new one), however I don't imagine a lot of people craving for this feature, since you can already do it with nautilus and double click to open with gedit.
Comment 9 Martin Picek 2007-10-18 19:01:28 UTC
Alex, I can provide you temporary home for your plugin. I have a domain and I can provide you a subdomain. But you have to know that I will lost the domain on the end of the January. But for the temporary website it's good (maybe, then you will get a page on gnome.org/projects, etc.). Are you interested in?
Comment 10 Thilo 2007-10-19 16:30:02 UTC
Alex: Nobody says that Nautilus files cant be extended. 

I think that this comes to the very core of what Gedit should be. I thionk it should be a very small and esy to use editor. It should not be the editor that programmers love, because this fouls the intention of the default GNOME desktop.

I think that adding all kinds of features is a big temptation and danger.

I jsut can say that I often wanted to open gedit and then right a new .txt file or whatever. Nautilus system does fill in some text. I dont think that this does not allow to add special values. And I also think - why shouldn't Nautilus be able to create such more advanced templates.

But as things would be developed for gedit only its clear that other core GNOME applications will then have to start GEdit to work with it. 


I think the problem is if people start changing GEdit in the way they like iot the best. Then GEdit will become more and more a developer tool, which is niced too - but then GNOME will need a simple text editor, again. I think GEdit is already muhch too advanced for 99% of the users.
 
Comment 11 Paolo Borelli 2007-10-19 17:31:55 UTC
NB: I have not followed closely, sorry about that, but really no time :(

Just a quick note because I spotted Thilo's comments about gedit becoming too powerful/difficult/whatever: we are talking about *plugins*. That's why plugins exist in the first place.
Plugins can turn gedit into a tool very specific for some users (just see gedit-latex plugin). This has no impact on "normal" users [1]


([1] mind you, I actually do not think that "normal" users exists, we have different kind of users, each with his very specific needs. But this is out of topic)
Comment 12 Thilo 2007-10-19 20:04:54 UTC
Hi paolo. I did not talk about plugins but requested to use nautilus template system in gedit.

I knwo what plugins may seem tobe good for, but I would sometimes rather see this as the plugin disease. I mean from the user perspective there is just the interface. Many applications like to point to plugins, which are nice for advanced usage, but if this means that the GUI doesnt get a feature or the user has to deal with endless lsit of plugins this can become a mess - and is in many applications.

Sometimes GUI decisions must be made. So I rather like to see this issue as: Does Gedit need a template system and if yes is it good to use the nautilus system - or - maybe also does the nautilus system needs to be extended or changed - rather then writing external plugins who users use or not use - but do not increase the usability for every user.

As I said - I think developers have their tools anyway - and they are often command line tools rather. What I was suggesting was intended to be simple. :-)

Thilo
Comment 13 Alex Cornejo 2007-10-19 20:25:42 UTC
Thilo: Ok, I think this is more of a philosophical discussion and its not worth having this on bugzilla, but I'll respond to your comments anyway.

First, I believe that Paolo is right in saying that you can basically have anything as a plugin, and you are not affecting the "normal" end user (which I also believe to be inexistent).

Second, I consider myself a developer, and you are right the mostly I used command line tools, but some of us (or at least me) are trying to evolve. I used emacs (for about 3+ years) then migrated to vi/vim (for 10+ years). My first migration was because emacs was huge and slow for my needs, and I don't enjoy programming in lisp/scheme. Vi/Vim was fast and small, and it was perfect for me in a lot of ways, however, everytime I wanted to extend its functionality with a plugin I had to use vim-script, which is a pretty crappy language (by my standards).

Here enters gedit, at a glance just a gnome's notepad, but since it can be extended with python, it is has become a viable option for developers (I prefer creating scripts in python to ease development, than fighting with elisp/vim-script to get something working). I believe the whole Gnome/GNU spirit is about keeping your options open, and I don't see any reason that justifies limiting gedit for just dumb text editing, if we can have so much more through plugins. We could even have 2 different template plugins, one for nautilus templates and another one for developers.

As for extending nautilus scripting engine, I believe this would be a nice feature, however this thread should be discussed in nautilus bug listings instead of gedit's. If you want gedit to have a "new file from template" that uses nautilus current templates, I think this is simple enough to code, but still I don't see it as a big win from the gedit perspective, since you are just trimming away a few clicks (as I mentioned before, you an already create the new file from template from nautilus and double click it to open with gedit).

Alex
Comment 14 André Klapper 2012-08-01 10:51:14 UTC
Looks like bug 558435 should be fixed first.
Comment 15 Sébastien Wilmet 2020-11-24 09:57:51 UTC
Mass-closing of all gedit bugzilla tickets.

Special "code" to find again all those gedit bugzilla tickets that were open before the mass-closing:

2bfe1b0590a78457e1f1a6a90fb975f5878cb60064ccfe1d7db76ca0da52f0f3

By searching the above sha256sum in bugzilla, the gedit contributors can find again the tickets. We may be interested to do so when we work on a specific area of the code, to at least know the known problems and possible enhancements.

We do this mass-closing because bugzilla.gnome.org is being replaced by gitlab.gnome.org.