GNOME Bugzilla – Bug 653627
orca says "E" when exiting a bash shell with ctrl-d.
Last modified: 2015-11-11 03:02:17 UTC
Originally filed as Ubuntu bug <https://bugs.launchpad.net/ubuntu/+source/gnome-orca/+bug/802537>. Present in both Ubuntu gnome-orca 3.0.0-0ubuntu2, and Orca GIT, ORCA_3_1_2-13-g5812b1c. Marked as "minor" since is not massively important. Also, for very basic usage it can be avoided altogether: use alt+f4 to close gnome-terminal, instead of closing the bash shell with ctrl-d. 1. Make sure Orca is enabled and working. 2. Open a terminal window 3. Type "bash", enter, to start a nested bash shell. Note that orca avoided saying "bash"; it only reads command output, like the prompt. (Second note - I changed my prompt to a single dollar sign when I started testing Orca). 4. Type "exit", to break out of the nested shell. Note that bash echoes "exit", and so orca reads it back to you. So far, so good. But now try this: 1. Type "bash" to enter a nested shell 2. Press Ctrl-d (i.e. hold control key, press and release"d", and finally release the control key again). This is a shortcut to send "end of file" to bash and exit the sub-shell. Note that bash helpfully prints "exit", to let you know what you've done. But what Orca reads out is "end of line E" - huh? (Or sometimes just "E", or "end of line X", or "end of line I") Expected result: orca should read "exit" (and then "dollar", or whatever your prompt is), i.e. exactly the same as if you used the "exit" command to exit bash. You hear the same thing if you quit the main shell in this way, closing the gnome-terminal window. So it gets a bit confusing. Immediately before Orca describes the new active window (e.g. Orca itself, if you have no other open windows), you get this this weird, unexpected, slightly random speech.
So this issue is the result of a number of things: 1. When editing in a terminal and Ctrl+D is used to delete text, the remainder of the line gets reinserted. We subsequently get an accessible text-changed event. We don't want to speak the whole line; we want to speak the new character at the caret. Therefore the gnome-terminal script has a hack to deal with this case. I see no way, using what AT-SPI gives us from gnome-terminal, to distinguish these two cases heuristically. 2. VTE has a bug in it. Therefore when 'exit' gets inserted, we only get 'xit'. The first char goes missing sometimes. So, what you are presenting is an edge case and one which I see no good way to fix without breaking Orca's presentation when deleting text in a terminal-based editor using ctrl+d. So I won't call this WONTFIX, but for now and for all intents and purposes, that is what it is.
This appears to have been fixed in VTE. I hear "exit". And from my debug.out after pressing Ctrl+D in a nested bash shell: vvvvv PROCESS OBJECT EVENT object:text-changed:insert vvvvv OBJECT EVENT: object:text-changed:insert detail=(157,23,exit [jd@blockhead ~]$ ) app.name='gnome-terminal-server' name='Terminal' role='terminal' state='enabled focusable focused sensitive showing visible' relations='' interfaces='Accessible Action Collection Component Text' INFO: Getting script for object:text-changed:insert from [application | gnome-terminal-server] INFO: Script for object:text-changed:insert from [application | gnome-terminal-server] is <orca.scripts.apps.gnome-terminal.script.Script object at 0x7fec1a3644a8> BRAILLE: update disabled SPEECH OUTPUT: 'exit [jd@blockhead ~]$ ' {'rate': 65.0} SPEECH DISPATCHER: Speaking 'exit [jd@blockhead ~]$ ' Orca rate 65.0, pitch 5.0; SD rate 32, pitch 10 TOTAL PROCESSING TIME: 0.0497 ^^^^^ PROCESS OBJECT EVENT object:text-changed:insert ^^^^^ Closing as obsolete.