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 Function Severity:  1 - Wish
Priority:  1 - Later Item Group:  Feature Request
Status:  Postponed Assigned to:  None
Originator Name:  Open/Closed:  Open
Release:  dev Operating System:  Any

Add a New Comment (Rich Markup)
   

You are not logged in

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

 

Tue 03 Sep 2019 07:58:48 PM UTC, comment #5: 

Sorry, I am currently unable to build mxe-octave. And since this is a crash in a usecase that Octave doesn't support at all, I think I will let it rest in peace.

Hartmut <hardy>
Tue 03 Sep 2019 05:34:49 PM UTC, comment #4: 

A crash is certainly interesting, but doesn't necessarily have to do with implementing this history feature.

If you're curious about the crash, it would be helpful to see a stack trace at the time of the crash with debug symbols, if you have such a build available on Windows 10. Without that information, it's hard to see where a crash would be coming from. I think you might want to file a new bug report about that.

Mike Miller <mtmiller>
Project Administrator
Sat 31 Aug 2019 01:45:53 PM UTC, comment #3: 

Just for the record. This behavior became worse in a current Octave release, it makes Octave CRASH now under Win10.

One natural way to provoke this crash

  • use Windows (10 in my case)
  • Install Octave: octave-5.1.0-w64-installer.exe
  • start Octave once, to make it generate all setting files, inclucing the file ".octave_hist" in the user's home directory
  • close Octave
  • set the NTFS "hidden" file attribute the the file ".octave_hist"
  • start Octave again -> Crash

Shall we nevertheless stick to the quite low priority of this bug report?

Hartmut <hardy>
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 Files:
   
   
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)
  •  

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

    Only project members can vote.

     

     

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-09-03 mtmiller Carbon-CopyRemoved 80942 => -
    2016-10-05 mtmiller Priority5 - Normal => 1 - Later

    Back to the top


    Powered by Savane 3.5