Matlab command window unresponsive after losing focus - matlab

I am using matlab on linux with gnome and I have a problem with the command window. Note that this problem goes away when I switch to twm, but I don't want to do that (for obvious reasons).
When the command window loses focus and then regains focus, it freezes, i.e., it ignores anything I type. The only consistent way I've found to unfreeze it is to click somewhere within the matlab window, but outside the command window (for example, the workspace or command history windows), and then click back in the command window.
This is very annoying and it happens all the time. Any help would be appreciated!
Thanks

Related

VS Code keep focus

If I am editing a file in VS Code, then alt-tab (or click) another program to view something else, then go back to VS Code, the focus has shifted over to the side panel, which prevents me from immediately typing in the editing panel. I find it really annoying to have to change the focus back to the editing panel every time (by either clicking or using keyboard shortcuts). Is there a way to have VS Code keep the focus where it is until I change it, even if VS Code is in the background for a bit?
This does not happen when my workspace is a local folder, but it does happen when my workspace is a remote folder connected via SSH (using the "Remote - SSH" extension).

Editor tab disappeared in GUI

The MATLAB GUI normally (for me) has 4 tabs in the upper left - Home, Plots, Apps and (I think) Editor. However the editor tab has disappeared and I cannot find documentation how to turn it back on. I tried the Layout->Default but that just arranges all the visible windows and doesn't re-enable to missing editor.
Does anyone know how to turn this back on?
Type edit in the command window.
Unfortunately you are right, there is no 'Editor' option in the Layout panel of Matlab's interface, and for obscure reasons it's not present in the default layout.
OK, I've checked Ratbert's answer as he got here before me but Mathworks tells me it disappears any time you're not actually editing any code. If that happens their answer was to just click on the New Script button. Doing that worked for me. Typing edit in the command window is (I think) doing the same thing.
Thanks!
For anyone that finds this thread at a later date I eventually debugged the root cause of this problem as a mouse that was failing. When attempting to close the open variables part of the GUI, when clicking the X in the upper left, the mouse was generating two clicks instead of one. The first closed the variables GUI, the second closed the editing GUI. Purchasing a new mouse resulted in no longer seeing the problem at all.
in matlab command window, go on top right triagle and click, a drop down list will appear, select undock editor

ipython-qtconsole: strange behavior when switching windows

I am experiencing following problem with ipython-qtconsole:
I type in ipython-qtconsole window, then I switch to another application window with Alt+Tab. When I switch back again into ipython-qtconsole the text area is no longer selected/activated, but rather the menu. That means, when I start typing or hit enter, I am actually in the top menu. I have to click with the mouse in the text area first, and then I can start typing.
Is this normal behavior? I cannot imagine that anybody would want this "functionality". Is it possible to change it, so that when ipython-qtconsole window is activated, the text area is automatically active (i.e. the cursor is there) ?

How can I configure emacs to switch to a particular buffer when I click the mouse in it?

I'm using iTerm2 on my mac to ssh into a Linux box and run emacs in the terminal. On a big monitor, I like to split the window to see multiple buffers side-by-side. I'd like to be able to switch to a particular buffer by clicking the mouse in it (rather than doing C-x o).
What seems to be happening is that if I click the mouse anywhere outside the currently active buffer e.g. in the next buffer, on the mode line etc., the click is being interpreted as which is bound to (tmm-menubar-mouse EVENT).
I have disabled the menubar by doing the following in my .emacs_d/init.el:
(menu-bar-mode -1)
This seems to disable the visible display of the menu bar at the top of the window, but the mouse click behavior I described is still happening.
I think what I need is to have the click interpreted as something other than and then bind that to some function that detects which buffer the click happened in and switch to it. But, I don't know how to do that and the searching I've done hasn't yielded any clear answer. Can anyone help?
Alternatively, I looked into using windmove to enable switching between buffers with SHIFT and the arrow keys. I did (windmove-default-keybindings) but emacs then seems to respond to SHIFT left-arrow by inserting "2C" into the buffer and SHIFT-right-arrow by inserting "2D". If anyone has any tips on making this work too, I'd love to hear them.
Thanks
I ran into this problem a while ago, where clicking on column > 95 was interpreted as <menu-bar> <mouse-1>, which invokes tmm-menubar-mouse. It turned out to be a bug:
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6594
There hasn't been a formal release since this bug was fixed, but you can get the patch here:
http://bzr.savannah.gnu.org/lh/emacs/emacs-23/revision/100618
If I recall correctly, you should be able to just drop the modified file into your existing emacs installation and byte-compile it (assuming you're running the 23.3.1, the latest release).

Command Line Windows Hanging in RDP Windows

We regularly access the build machine through RDP and it there are lots of command line windows that open. Sometimes these windows hang like someone switched focus to them and press the Pause key. Tapping the keyboard moves the process along, but every once in a while this is missed and everyone waits on the process to finish while it is waiting for someone to press a key. Why does this happen? Is there a setting or version up/down-grade that can keep it from happening?
When this happens, does the window title say "Select Command Prompt"? If so, hitting a key will unpause it, but the keystroke will also be sent to the paused program unless it's ESC or enter (or possibly others). You can turn this feature off by going into the Command Prompt properties/defaults and unchecking "QuickEdit Mode".
If that's not it, you'll have to post more information about your build process. What is your build system written in (make, scons, jam, msbuild, etc.)?
One thing to watch out for in command line Windows; if you have QuickEdit Mode enabled (click on icon in title bar, Properties..., Options tab) you can highlight and copy with the mouse, bypassing the Edit menu. Stray mouse clicks in the window highlight the character underneath and the console will appear to "hang" until a key is pressed.