Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

emacs gud window use

Tags:

emacs

gud

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.

like image 884
Nathaniel Flath Avatar asked Nov 14 '22 16:11

Nathaniel Flath


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.

like image 165
Kelly S. French Avatar answered Dec 14 '22 17:12

Kelly S. French