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 687139 - Context menu entry to create a new blank file
Context menu entry to create a new blank file
Status: RESOLVED NOTABUG
Product: nautilus
Classification: Core
Component: File and Folder Operations
3.6.x
Other Linux
: Normal enhancement
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-10-29 18:43 UTC by Rémi G.
Modified: 2016-08-29 07:30 UTC
See Also:
GNOME target: ---
GNOME version: 3.5/3.6



Description Rémi G. 2012-10-29 18:43:19 UTC
Hi,

I use Nautilus 3.6.1 since a couple of days, I like the changes you made in the last development cycle. I only miss one feature : the ability to create a new blank file from the right click context menu.

Here is one example of use case I had before :
Let's say I want to write a new LaTeX report at "~/Documents/University/Master/CourseX/ProjectY/Report/". I'll have to open Latexila, create a new file, select this folder after going through every parent folder and save it... Before I used to create my "Report" folder, a new blank file, rename it with .tex extension and that was it.

This feature is useful when you have a complex folder hierarchy that is painful to go through. You go there once with Nautilus, and you don't want to do it again with every software you'll use like Gedit. It's especially convenient when you have to write source code, makefile or whatever you want at a specific location.

Thank you for your answer and keep on the good work, I like where Gnome is heading to !

Rémi.
Comment 1 William Jon McCann 2012-10-30 15:08:51 UTC
That feature (use of the "blank file" template) is still present if you have any templates in your Templates folder.
Comment 2 Rémi G. 2012-10-30 15:27:07 UTC
I feel a bit stupid now. Indeed, creating a blank file inside the Templates/ of my home directory brought it back...

I'm a gnome user since almost 10 years and I didn't know that ! Thank you for your answer and sorry to have bothered you for so little.
Comment 3 Cosimo Cecchi 2012-10-30 16:46:50 UTC
Closing the bug then.
Comment 4 André Klapper 2012-10-31 14:02:58 UTC
from #bugs:
<arg> hey, wondering how to reopen a bug ( https://bugzilla.gnome.org/show_bug.cgi?id=687139 )
<arg> as it actually is a bug.. the context menu is missing after installing gnome 3.6, if there is no file in the template folder
<arg> after adding a file to it, the context menu appears.. and stays even after removing the file from the context menu
<arg> ./ (till the next nautilus restart)
<arg> so if I just want the context menu to show (to have the default Empty Document entry) I need to create an arbitrary file in the template folder
Comment 5 William Jon McCann 2012-10-31 14:18:32 UTC
It only appears if you have Templates that's correct.
Comment 6 Vitalii 2012-11-05 11:50:56 UTC
I'm accepting that "Create new document" option appears only if templates folder is not empty. So I can't create new empty document if there is no any template.
But if I put empty file in templates I have two options in "Create document" menu.
So I think you have to fix this.
Comment 7 Cosimo Cecchi 2012-11-05 21:38:18 UTC
Vitalii, good point, we should indeed ensure there's no stray "Empty Document" entry in the menu, for consistency.
I now fixed that in git master.
Comment 8 Nrbrtx 2013-04-02 19:20:29 UTC
I tested modern distros such as Fedora 18, OpenSuse 12.3, Ubuntu 13.04 - all they do not have "New document" option by default. Please bring it back.
Comment 9 Richard Bruce Baxter 2014-02-04 03:15:53 UTC
This definitely is a bug;

The "New Document" option is only present if the Template folder contains a file. This means that to create an "Empty Document" in Nautilus one must view "Empty Document" and some dummy template file, eg "Dummy Document". Important features really should not be removed from Nautilus, as this is making it impossible to use. I suggest providing/restoring the following functionality. It is quite easy to create another Preferences dialog box tab which allows the selection of options (rather than these being dictated to the user, as is common with many proprietary browsers nowadays, eg Windows Explorer).

- the ability to add/remove buttons (eg "up folder")
- the ability to select a real location bar (not a bubble bar)
- instantaneous folder browsing (options to disable mime extension reading and any other header operations which make Nautilus slow)
- the ability to remove all clutter left and right of the address bar (these should be located in the View menu)
- the ability to position the address bar on its own row (the user needs to be able to see the full path at all times, even when operating with multiple unmaximised file manager windows)
- the ability to show the full path in the title bar (such that Nautilus windows containing a folder of the same name can be distinguished in the window manager taskbar)
- the ability to open a new Window (Ctrl-N) at the same location
- the ability to disable the sidebar
- the ability to add keyboard shortcuts (eg Ctrl-G for go button operations)
- the ability to view full dates/times
Comment 10 narcisgarcia 2014-11-22 09:30:33 UTC
I'm using Ubuntu-Gnome with Nautilus 3.10 and feature is still available without a customized template.

And for the moment is better than the template workaround, because it's localized in the desktop's language, and this doesn't seem to be possible with a template.
Comment 11 daniphp 2015-10-29 09:59:17 UTC
This might not be a bug, but it's still a functionally that's over complicated. Why would you ask an user to create a Template? How will that user even know he has to do that in order to activate the option?

This option should be there by default without user intervention.
Comment 12 Phillip Schichtel 2016-03-01 20:35:37 UTC
I just had to google for this...

Why not provide a default entry to create an empty file in the case where no templates exist? Especially because you can't create your first template from the UI.
Comment 13 Casper 2016-08-07 18:26:38 UTC
Just ran into this issue too. "New Document > Empty Document" is missing if Templates is empty.

GNOME nautilus 3.14.3
Comment 14 Muthu Kumar 2016-08-25 09:34:29 UTC
I have also this issue.Why nautilus does not ship with a default template like 'newdocument.txt'.I think that will be more user friendly.I first thought that using IDE like geany is only way to create a new file in nautilus.
Comment 15 Carlos Soriano 2016-08-25 09:49:32 UTC
(In reply to Muthu Kumar from comment #14)
> I have also this issue.Why nautilus does not ship with a default template
> like 'newdocument.txt'.I think that will be more user friendly.I first
> thought that using IDE like geany is only way to create a new file in
> nautilus.

That's indeed the case, applications that create specific files are supposedly the way to create specific files. Not Nautilus.
Once you have this specific file, you can put it on the templates folder to have it as a template for creating new ones. But by default putting an empty file with no headers or metadata or type at all is useless, we don't know if the user wants an svg, and odt or what kind of file.
Comment 16 Muthu Kumar 2016-08-25 09:53:31 UTC
(In reply to Carlos Soriano from comment #15)
> (In reply to Muthu Kumar from comment #14)
> > I have also this issue.Why nautilus does not ship with a default template
> > like 'newdocument.txt'.I think that will be more user friendly.I first
> > thought that using IDE like geany is only way to create a new file in
> > nautilus.
> 
> That's indeed the case, applications that create specific files are
> supposedly the way to create specific files. Not Nautilus.
> Once you have this specific file, you can put it on the templates folder to
> have it as a template for creating new ones. But by default putting an empty
> file with no headers or metadata or type at all is useless, we don't know if
> the user wants an svg, and odt or what kind of file.

This will force every user of nautilus to search in google to find the answer.Especially New User.I wish atleast there is default template.
Comment 17 Carlos Soriano 2016-08-25 10:07:07 UTC
Definitely we need a way to communicate this feature. If you have any idea, please share it.
But setting a default template is the wrong way imho, since templates are precisely that, a way to create a specific type of file. Choosing once for the user beforehand looks wrong.
Comment 18 Muthu Kumar 2016-08-25 10:10:14 UTC
I just have simple idea.
"Create New Document" button always exists in context menu. If no template found, then popup a guide to create Template file(Help function). If template is found then execute quietly.
Comment 19 daniphp 2016-08-25 10:10:57 UTC
Just add a default txt template. The way it works now is horrific.
Comment 20 Carlos Soriano 2016-08-25 11:10:22 UTC
(In reply to Muthu Kumar from comment #18)
> I just have simple idea.
> "Create New Document" button always exists in context menu. If no template
> found, then popup a guide to create Template file(Help function). If
> template is found then execute quietly.

We don't create templates files, we need the application creating those files to create them. We could choose an application from the app chooser, but we don't really know if that application will work as expected for this. We don't have a way to communicate with them. So after all you would just open the application, and that's it.
I'm not sure we can do more than just providing documentation for that feature. But then if it's not clear enough for just being in the UI for the first time, I don't think it should be there until the user reads about how to use the feature.
Comment 21 Carlos Soriano 2016-08-25 11:12:06 UTC
(In reply to daniphp from comment #19)
> Just add a default txt template. The way it works now is horrific.

Why a txt file? What about svg? or odt? Templates are for creating specific files provided by the user. Adding a random txt file type as default looks wrong to me.
Comment 22 Carlos Soriano 2016-08-25 11:16:51 UTC
The only approach I can see is a way to communicate with apps that they are going to be open in order to create a template, so when the user saves the changes it's saved in ~/Templates. That would be pretty good.

However there is no current way we can do that.
Comment 23 Carlos Soriano 2016-08-25 11:20:53 UTC
(In reply to Carlos Soriano from comment #21)
> (In reply to daniphp from comment #19)
> > Just add a default txt template. The way it works now is horrific.
> 
> Why a txt file? What about svg? or odt? Templates are for creating specific
> files provided by the user. Adding a random txt file type as default looks
> wrong to me.

Adding to this, messing up with the user folders adding a random file just because we decided to sounds like something an application shouldn't do.

However, distributions are free to do this (which I still find wrong).
Comment 24 narcisgarcia 2016-08-25 15:43:21 UTC
Why a txt file: Because it's the most generic type, the format is the most supported in all operating systems, distributions and desktops (unlike svg,odf), and because with a text editor other non-binary formats can be written from a zero-byte file (XML, HTML, etc.)
Comment 25 Carlos Soriano 2016-08-29 07:30:56 UTC
(In reply to narcisgarcia from comment #24)
> Why a txt file: Because it's the most generic type, the format is the most
> supported in all operating systems, distributions and desktops (unlike
> svg,odf), and because with a text editor other non-binary formats can be
> written from a zero-byte file (XML, HTML, etc.)

That still makes a choice before hand for the user, assuming s(he) wants one type file or another for a tool that it's purpose is to create files based on user files templates. I feel this providing this has no meaning at all and doesn't help explaining what is this.

Also you could argue a .svg can be written from a 0 byte file too.

In any case, and as said previously, including a file is not something that Nautilus can do, so there is no point on discussing it here and rather you should discuss it with your distributions if the solution you want is that (which I don't agree).

What we can argue here is a way to expose the utility in a better way when there is no template present. But also as said previously, I cannot imagine a way to expose this utility in a clear way in the UI without requiring to read documentation (we don't require that for anything in Nautilus UI, do we?).