Bugs item #912521, was opened at 2004-03-09 07:34 Message generated for change (Comment added) made by schlotter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=581349&aid=912521&group_id=86916
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Matthias Klose (doko) Assigned to: Nobody/Anonymous (nobody) Summary: python-mode kills arrow in gdb (gud.el) Initial Comment: [this is http://python.org/sf/606250, reopened] forwarded from http://bugs.debian.org/159628 ] Once python-mode.el has been loaded, all GDB buffers stop showing the little arrow that lives in the "fringe" on the left side of an emacs21 frame. To be specific, the arrow appears and then disappears right away, each time a 'step' or 'next' command is run. I traced the problem down to the unconditional hooking of 'comint-output-filter-functions, python-mode.el line 3472 to be exact: (add-hook 'comint-output-filter-functions 'py-pdbtrack-track-stack-file) I haven't tested it fully, but I've found that if I take this line out, GDB can show its arrow once more. There is code in python-mode.el to insert this hook in a buffer-local fashion only in the '*Python*' buffer.. maybe that should be reviewed and used instead of this global hook? (took forever to figure out it was python-mode causing the problem..) Followup: This one is still broken for me, in python-mode 4.40. (I'm the submitter of the original debian bug report). Here are some instructions to reproduce the problem: =============== 574:[EMAIL PROTECTED] cat hello.c #include <stdio.h> int main(void) { printf("hello\n"); printf("world\n"); printf("\n"); return 0; } 575:[EMAIL PROTECTED] gcc -g -o hello hello.c 576:[EMAIL PROTECTED] ./hello hello world 577:[EMAIL PROTECTED] cat foo.py #! /usr/bin/python print "hiya" 578:[EMAIL PROTECTED] emacs -q M-x gdb hello RET # starts GUD session (gdb) b main RET (gdb) run RET # GDB stops on "hello". Note arrow in fringe. C-x C-f foo.py RET # loads python-mode.el C-x b *gud-hello* RET # switch back to GDB buffer (gdb) next RET # GDB stops on "world". Note lack of arrow. (gdb) next RET # arrow flickers and disappears each time =================== emacs-version reports "GNU Emacs 21.3.1 (i386-pc-linux-gnu, X toolkit) of 2003-10-31 on raven, modified by Debian" this is package emacs21, version 21.3+1-4 (from unstable) python-elisp is version 2.3.2.91-1, with py-version at $Revision: 4.40 $ let me know if there is anything I can do to further track it down. thanks! -Brian ---------------------------------------------------------------------- Comment By: Christian Schlotter (schlotter) Date: 2006-01-31 18:19 Message: Logged In: YES user_id=1440711 Is the patch added to the last comment the official workaround? I would like to submit a package to my favorite distribution which fixes this problem, as I find it highly annoying. Regards Christian ---------------------------------------------------------------------- Comment By: Gustav Hållberg (gustavh) Date: 2005-07-10 08:13 Message: Logged In: YES user_id=1310184 I did some testing around this about two years ago, and I then concluded that the right fix is similar to what d_kagedal suggests, but that you want the deactivation to be run iff py-pdbtrack-is-tracking-p: --- python-mode.el~ 2004-10-21 14:27:30.000000000 -0700 +++ python-mode.el 2005-07-09 23:03:43.417759376 -0700 @@ -1334,7 +1334,7 @@ (setq overlay-arrow-string "=>") (set-marker overlay-arrow-position (py-point 'bol) (current-buffer)) (setq py-pdbtrack-is-tracking-p t)) - (overlay-arrow-position + (py-pdbtrack-is-tracking-p (setq overlay-arrow-position nil) (setq py-pdbtrack-is-tracking-p nil)) )) ---------------------------------------------------------------------- Comment By: David Kågedal (d_kagedal) Date: 2005-06-29 14:30 Message: Logged In: YES user_id=1260741 I usually work around this by applying this patch: --- python-mode.el~ 2005-04-08 16:45:30.000000000 +0200 +++ python-mode.el 2005-06-21 11:53:55.000000000 +0200 @@ -1334,7 +1334,7 @@ (setq overlay-arrow-string "=>") (set-marker overlay-arrow-position (py-point 'bol) (current-buffer)) (setq py-pdbtrack-is-tracking-p t)) - (overlay-arrow-position + (nil ;; overlay-arrow-position (setq overlay-arrow-position nil) (setq py-pdbtrack-is-tracking-p nil)) )) The problem is that the comint filter function is called even when running gud, and sinc it doesn't detect a python line to show, it disables the overlay arrow. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=581349&aid=912521&group_id=86916 _______________________________________________ Python-mode mailing list Python-mode@python.org http://mail.python.org/mailman/listinfo/python-mode