bugGNU Octave - Bugs: bug #49275, history_append: new boolean option...

 
 

bug #49275: history_append: new boolean option to mimic bash "histappend" option

Submitted by:  Mike Miller <mtmiller>
Submitted on:  Wed 05 Oct 2016 06:27:34 PM UTC  
 
Category: Octave FunctionSeverity: 1 - Wish
Priority: 1 - LaterItem Group: Feature Request
Status: PostponedAssigned to: None
Originator Name: Open/Closed: Open
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.

 

Wed 05 Oct 2016 06:53:26 PM UTC, comment #2:

I do not think your latter suggestions are appropriate. It has been the policy of Octave to not make different configuration choices dependent on the system automatically, but to allow the option when it makes sense and allow the user to choose to enable that option if they want to.

I do not think that Octave should know anything about NTFS file attributes, I do not think that Octave should set the attribute or read whether the attribute is set on files, and I do not think that history should be appended by default because the OS is Windows or because the file has the hidden attribute set.

I think if the user wants to use this incompatible attribute, then they could be made aware of the option to append to the history instead of overwriting it.

Mike Miller <mtmiller>
Project Administrator
Wed 05 Oct 2016 06:40:53 PM UTC, comment #1:

I usually like to "hide" files like ".octave_hist", because I am not ment to manually edit them anyways. And under Linux OS the intention of the "." at the beginning of the file name is to hide this file away. So I think it would be reasonable if also the Octave Windows version could deal with hidden ".octave_hist" files.

The problem is (see bug #49214) that under Windows OS it is not possible to overwrite "hidden" files, it is only allowed to append to them. So currently it is not possible to set the "hidden" attribute on the ".octave_hist" file under Windows OS (if you do it, the history won't be saved any more.)

So I would propose to have this mentioned "histappend" option in Octave to be "true" as default value (at least) on Windows systems. It might even be a good idea to normally "hide" this file under Windows as well, meaning that Octave itself will set the "hidden" file attribute when it needs to newly generate this file (or runs for the first time).

Hartmut <hardy>
Wed 05 Oct 2016 06:27:34 PM UTC, original submission:

In bug #49214, it was discussed that Octave has "history -w" and "history -a" commands to overwrite and append to the history file from a running session. But when Octave exits, it only attempts to overwrite the history file using the equivalent of "history -w" at exit.

The bash shell includes a boolean option "histappend" that switches between overwriting and appending to the shell history when a bash session exits. It might be a helpful feature to users familiar with this approach to be able to choose whether their Octave history is overwritten or appended when Octave exits.

For Windows users, this would allow the history file to be marked with the NTFS "hidden" attribute, because appending to a hidden file is allowed but overwriting an existing hidden file fails.

Mike Miller <mtmiller>
Project Administrator

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by hardy (Posted a comment)
  • -email is unavailable- added by mtmiller (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):

     

     

    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 05 Oct 2016 06:29:31 PM UTCmtmillerPriority5 - Normal=>1 - Later

    Back to the top


    Powered by Savane 3.1-cleanup1