How do I customize which window GUD will use when i issue commands - 'up', 'down', etc ? It seems to use an arbitrary window, sometimes even the window with gdb in it - I want to be able to specify a specific window to be used.
-
Which version of Emacs are you using? Are you running the debugger with gdb or gud-gdb? Have you customized any relevant variables? – Luke Girvin Oct 05 '11 at 19:58
-
emacs 23.1.1, running debugger with M-x gdb. Have not customized any variables related to GUD/GDB. – Nathaniel Flath Oct 05 '11 at 22:18
-
Do you have any screenshots please? – Luke Girvin Oct 06 '11 at 08:50
1 Answers
Have you considered borrowing the key bindings mentioned in the following question? Emacs, switch to previous window
This question implies that GUD steps on some things if you don't add a parameter. Maybe your command bindings are being affected similiarly.
Using gdb in Emacs 23
I asked a buddy of mine about this issue and here is what he said.
Well, we used xemacs and so it's not exactly apples to apples here. I do have gnu-emacs installed on cygwin and I can't replicate his problem. I think he definitely needs to list a version # for emacs and the version # for all his installed packages.
When you press up/down it calls 'previous-line' and 'next-line' respectively which both move the cursor in the default buffer. The only thing I can think is that he has something running that switches buffers (lisp 'set-buffer') temporarily and maybe doesn't set it back or errors b/f restoring the buffer? Better to use 'with-current-buffer' (or one of the other with-* forms) that saves the current state of the ui runs your lisp code and restores the ui state.

- 1
- 1

- 12,198
- 10
- 63
- 93