bugGNU Octave - Bugs: bug #40502, m-file template for...


bug #40502: m-file template for File->New->Function different from edit.m

Submitter:  Rik <rik5>
Submitted:  Thu 07 Nov 2013 12:26:50 AM UTC
Category:  GUI Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Inaccurate Result
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup

Jump to the original submission

Mon 20 Jan 2014 03:52:34 AM UTC, comment #7: 

Felipe: the default license to put in new files is already configurable, see "help edit". Fixing this bug made new files match between GUI and CLI, which is desirable. The default license for new files is GPL but is user-configurable.

Mike Miller <mtmiller>
Group Member
Mon 20 Jan 2014 03:33:15 AM UTC, comment #6: 

the header part "This program is free software" must not be included -- it should not be suggested in any way that the user's code has to be licensed under the same terms as Octave.

Felipe G. Nievinski <fgnievinski>
Mon 11 Nov 2013 09:18:39 PM UTC, comment #5: 

Pushed with changeset

I am closing this bug and open a new one (feature request) for data templates or for making edit.m user data configurable via the settings dialog

Torsten Lilge <ttl>
Group Member
Mon 11 Nov 2013 08:00:28 PM UTC, comment #4: 

The patch works for me.  It also solves 1/2 of bug #40496 where an external editor is not used for menu selections from the File->New menu.  Please go ahead and commit it whenever you can.

Rik <rik5>
Group administrator
Mon 11 Nov 2013 05:45:09 PM UTC, comment #3: 

Here a patch for testing which uses edit.m (enabling option "always create new files" during this action).

(file #29594)

Torsten Lilge <ttl>
Group Member
Thu 07 Nov 2013 04:29:38 PM UTC, comment #2: 

I like the idea of customizable templates, although that would have to wait until after the release.

Rik <rik5>
Group administrator
Thu 07 Nov 2013 01:52:02 AM UTC, comment #1: 

It would be really nice if the 'template' was actually a file that was used to describe the content of the new file.
Perhaps with some majic keywords like @DATE@, @AUTHOR@ etc that would be replaced when creating the file.

Octave could look first in a template folder in the users appdata, followed by a system template folder, followed by some real basic system default if nothing else could be found.

Templates could be named somthing unimaginative such as template_cc, template_m etc so there could be a template for different extensions, and that way the user could (if they chose to change the template for a particular extension (cases where there is a company standard?)

Perhaps an enhancement for after 3.8 is released ?

John Donoghue <lostbard>
Group Member
Thu 07 Nov 2013 12:26:50 AM UTC, original submission:  

The m-file template used for new files in the GUI is different than the template used when edit.m is called.  It really would be better if the GUI and CLI were synchronized to use the same template.

Rik <rik5>
Group administrator


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

Attached Files
file #29594:  new_function_01.diff added by ttl (8KiB - text/x-diff)


Depends on the following items: None found

   bug dependencies.


Carbon-Copy List
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by fgnievinski (Posted a comment)
  • -email is unavailable- added by ttl (Updated the item)
  • -email is unavailable- added by lostbard (Posted a comment)
  • -email is unavailable- added by rik5 (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.


    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-11-11 ttl StatusPatch Submitted Fixed
        Open/ClosedOpen Closed
    2013-11-11 rik5 StatusNone Patch Submitted
    2013-11-11 rik5 Dependencies- bugs #40496 is dependent
    2013-11-11 ttl Attached File- Added new_function_01.diff, #29594

    Back to the top

    Powered by Savane 3.13-599c.
    Corresponding source code