bugGNU Octave - Bugs: bug #46661, Disable Ctrl+D instantly closing...

 
 

bug #46661: Disable Ctrl+D instantly closing GUI

Submitted by:  Rik <rik5>
Submitted on:  Thu 10 Dec 2015 08:52:36 PM UTC  
 
Category: GUISeverity: 1 - Wish
Priority: 5 - NormalItem Group: Feature Request
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)

Sat 26 Dec 2015 08:41:35 AM UTC, comment #8:

Changeset
http://hg.savannah.gnu.org/hgweb/octave/rev/f99cbd86a0f9
adds an action with shortcut Ctrl-D to the terminal whenever Ctrl-D is not chosen as shortcut for a global (main window) action.

If Ctrl-D really should close Octave the shortcut has to be configured for the exit-action in the "shortcut" tab of the preferences. It then uses the normal exit path with checking for unsaved editor files.

Torsten <ttl>
Project Member
Fri 11 Dec 2015 11:11:20 PM UTC, comment #7:

I disabled Ctrl+D in my .inputrc file (for Readline) with

But this still doesn't work if Ctrl+D is the first character you type on a blank line. As Mike says, this seems to be related to the Terminal itself.

Rik <rik5>
Project Administrator
Fri 11 Dec 2015 10:47:38 PM UTC, comment #6:

It's actually not even interpreted by readline, it's at the terminal driver level. The terminal settings interpret the Ctrl+D as an EOF character, and the interpreter parser handles the EOF.

You can verify this by running octave with --no-line-editing and Ctrl+D still works.

Also note that it's Ctrl+D only when the input line is empty. So we don't want Octave to exit if I've typed some text and then hit Ctrl+D, that means something else to readline (delete-char by default).

Now we could use some terminal control calls to disable EOF processing, but that might break other things, for example I wonder if digging into that would break how Octave works on file input.

Mike Miller <mtmiller>
Project Administrator
Fri 11 Dec 2015 10:39:59 PM UTC, comment #5:

Would it be instead possible to just disable Ctrl-D in Octave's readline? Ctrl-D can then be configured as shortcut for the exit action, if desired.

Torsten <ttl>
Project Member
Fri 11 Dec 2015 09:08:12 PM UTC, comment #4:

I think you're right that Ctrl+D should at least go through the ordinary shutdown procedures. Is it possible for someone to then disable a key shortcut for quit entirely by clearing the key combo in the Shortcuts preference menu?

Rik <rik5>
Project Administrator
Fri 11 Dec 2015 08:23:25 PM UTC, comment #3:

Since Ctrl-D is interpreted as EOF by readline, closing the application is "almost" the expected behavior. This also happens with the cli version when started in a gnome-terminal.
BUT, closing the GUI via Ctrl-D bypasses the normal exit path without any checking of unsaved editor files. I suggest to not remove Ctrl-D but to bind it to the normal exit instead (in addition to the configured shortcut, by default Ctrl-Q).

Torsten <ttl>
Project Member
Fri 11 Dec 2015 08:14:31 PM UTC, comment #2:

Wow, I had no idea anybody actually used it. Maybe I'm the odd one, but I usually use Alt+F4 if I want to close a window immediately.

I'd be obliged if other people post their preferences. I'm willing to do whatever the majority think is most useful.

Rik <rik5>
Project Administrator
Fri 11 Dec 2015 07:54:10 PM UTC, comment #1:

Just to state another opinion, I use Ctrl+D all the time, removing it will be annoying to my muscle memory, but I can live with it.

Mike Miller <mtmiller>
Project Administrator
Thu 10 Dec 2015 08:52:36 PM UTC, original submission:

If you type, or more likely accidentally type, Ctrl+D in the GUI command window then the Octave application immediately shuts down. I suppose that this is inherited from the Terminal that is embedded in the command window, but it is distinctly unfriendly. At least in all my true terminal windows I disable this "feature" so that fat fingers don't cause me to lose work.

Rik <rik5>
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
  • -unavailable- added by ttl (Posted a comment)
  • -unavailable- added by mtmiller (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 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 26 Dec 2015 08:41:35 AM UTCttlStatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed
    Fri 11 Dec 2015 08:14:31 PM UTCrik5StatusNone=>Confirmed
    Thu 10 Dec 2015 08:52:54 PM UTCrik5Severity3 - Normal=>1 - Wish

    Back to the top


    Powered by Savane 3.1-cleanup1