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

 
 

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

Submitted by:  Rik <rik5>
Submitted on:  Thu 07 Nov 2013 12:26:50 AM UTC  
 
Category: GUISeverity: 3 - Normal
Priority: 5 - NormalItem Group: Inaccurate Result
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: devOperating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission 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>
Project Administrator
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
http://hg.savannah.gnu.org/hgweb/octave/rev/2c241092b47b

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 <ttl>
Project 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>
Project 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 <ttl>
Project 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>
Project 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>
Project 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>
Project Administrator

 

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

Attach File(s):
   
   
Comment:
   

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

 

Depends on the following items: None found

Digest:
   bug dependencies.

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 11 Nov 2013 09:18:39 PM UTCttlStatusPatch Submitted=>Fixed
      Open/ClosedOpen=>Closed
    Mon 11 Nov 2013 08:00:46 PM UTCrik5StatusNone=>Patch Submitted
    Mon 11 Nov 2013 07:59:48 PM UTCrik5Dependencies-=>bugs #40496 is dependent
    Mon 11 Nov 2013 05:45:09 PM UTCttlAttached File-=>Added new_function_01.diff, #29594

    Back to the top


    Powered by Savane 3.1-cleanup1