<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to 12: python-mode kills arrow in gdb (gud.el)</title><link href="https://sourceforge.net/p/python-mode/bugs/12/" rel="alternate"/><link href="https://sourceforge.net/p/python-mode/bugs/12/feed.atom" rel="self"/><id>https://sourceforge.net/p/python-mode/bugs/12/</id><updated>2004-03-09T06:34:56Z</updated><subtitle>Recent changes to 12: python-mode kills arrow in gdb (gud.el)</subtitle><entry><title>python-mode kills arrow in gdb (gud.el)</title><link href="https://sourceforge.net/p/python-mode/bugs/12/" rel="alternate"/><published>2004-03-09T06:34:56Z</published><updated>2004-03-09T06:34:56Z</updated><author><name>Matthias Klose</name><uri>https://sourceforge.net/u/doko/</uri></author><id>https://sourceforge.net95c64812bb02e0769e1e4724951040ae5c5e9a09</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;[this is &lt;a href="http://python.org/sf/606250" rel="nofollow"&gt;http://python.org/sf/606250&lt;/a&gt;, reopened]&lt;br /&gt;
forwarded from &lt;a href="http://bugs.debian.org/159628" rel="nofollow"&gt;http://bugs.debian.org/159628&lt;/a&gt; ]&lt;/p&gt;
&lt;p&gt;Once python-mode.el has been loaded, all GDB buffers&lt;br /&gt;
stop showing the little arrow that lives in the&lt;br /&gt;
"fringe" on the left side of an emacs21 frame. To be&lt;br /&gt;
specific, the arrow appears and then disappears right&lt;br /&gt;
away, each time a 'step' or 'next' command is run. I&lt;br /&gt;
traced the problem down to the unconditional hooking of&lt;br /&gt;
'comint-output-filter-functions, python-mode.el line&lt;br /&gt;
3472 to be exact:&lt;/p&gt;
&lt;p&gt;(add-hook 'comint-output-filter-functions&lt;br /&gt;
'py-pdbtrack-track-stack-file)&lt;/p&gt;
&lt;p&gt;I haven't tested it fully, but I've found that if I&lt;br /&gt;
take this line out, GDB can show its arrow once more.&lt;br /&gt;
There is code in python-mode.el to insert this hook in&lt;br /&gt;
a buffer-local fashion only in the '*Python*' buffer..&lt;br /&gt;
maybe that should be reviewed and used instead of this&lt;br /&gt;
global hook?&lt;/p&gt;
&lt;p&gt;(took forever to figure out it was python-mode causing&lt;br /&gt;
the problem..)&lt;/p&gt;
&lt;p&gt;Followup:&lt;/p&gt;
&lt;p&gt;This one is still broken for me, in python-mode 4.40. (I'm&lt;br /&gt;
the submitter of the original debian bug report).&lt;/p&gt;
&lt;p&gt;Here are some instructions to reproduce the problem:&lt;/p&gt;
&lt;p&gt;===============&lt;br /&gt;
574:warner@cinla% cat hello.c &lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;/p&gt;
&lt;p&gt;int main(void)&lt;br /&gt;
{&lt;br /&gt;
printf("hello\n");&lt;br /&gt;
printf("world\n");&lt;br /&gt;
printf("\n");&lt;br /&gt;
return 0;&lt;br /&gt;
}&lt;br /&gt;
575:warner@cinla% gcc -g -o hello hello.c&lt;br /&gt;
576:warner@cinla% ./hello &lt;br /&gt;
hello&lt;br /&gt;
world&lt;/p&gt;
&lt;p&gt;577:warner@cinla% cat foo.py&lt;br /&gt;
#! /usr/bin/python&lt;/p&gt;
&lt;p&gt;print "hiya"&lt;br /&gt;
578:warner@cinla% emacs -q&lt;/p&gt;
&lt;p&gt;M-x gdb hello RET              # starts GUD session&lt;br /&gt;
(gdb) b main RET&lt;br /&gt;
(gdb) run RET                  # GDB stops on "hello".&lt;br /&gt;
Note&lt;br /&gt;
arrow in fringe.&lt;br /&gt;
C-x C-f  foo.py RET            # loads python-mode.el&lt;br /&gt;
C-x b *gud-hello* RET          # switch back to GDB buffer&lt;br /&gt;
(gdb) next RET                 # GDB stops on "world".&lt;br /&gt;
Note&lt;br /&gt;
lack of arrow.&lt;br /&gt;
(gdb) next RET                 # arrow flickers and&lt;br /&gt;
disappears each time&lt;br /&gt;
===================&lt;/p&gt;
&lt;p&gt;emacs-version reports "GNU Emacs 21.3.1 (i386-pc-linux-gnu,&lt;br /&gt;
X toolkit) of 2003-10-31 on raven, modified by Debian"&lt;br /&gt;
this is package emacs21, version 21.3+1-4 (from unstable)&lt;br /&gt;
python-elisp is version 2.3.2.91-1, with py-version at&lt;br /&gt;
$Revision: 4.40 $&lt;/p&gt;
&lt;p&gt;let me know if there is anything I can do to further track&lt;br /&gt;
it down.&lt;br /&gt;
thanks!&lt;br /&gt;
-Brian&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>