<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to 6: Py #567468: A different patch for python-mode vs gdb</title><link>https://sourceforge.net/p/python-mode/patches/6/</link><description>Recent changes to 6: Py #567468: A different patch for python-mode vs gdb</description><atom:link href="https://sourceforge.net/p/python-mode/patches/6/feed.rss" rel="self"/><language>en</language><lastBuildDate>Sat, 09 Aug 2003 10:03:54 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/python-mode/patches/6/feed.rss" rel="self" type="application/rss+xml"/><item><title>Py #567468: A different patch for python-mode vs gdb</title><link>https://sourceforge.net/p/python-mode/patches/6/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;This is from &lt;a href="http://python.org/sf/567468:" rel="nofollow"&gt;http://python.org/sf/567468:&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Patch 509975 fixes the conflict between gdb-mode and&lt;br /&gt;
python-mode by checking whether the current process is&lt;br /&gt;
a python process. My patch fixes it more simply, by&lt;br /&gt;
only clearing the overlay arrow if we were the ones who&lt;br /&gt;
set it.&lt;/p&gt;
&lt;p&gt;I'd be happy with either patch. &lt;/p&gt;
&lt;p&gt;--------------------------------------------------------------&lt;/p&gt;
&lt;p&gt;Date: 2002-07-16 18:53&lt;br /&gt;
Sender: bwarsaw&lt;br /&gt;
Logged In: YES &lt;br /&gt;
user_id=12800&lt;/p&gt;
&lt;p&gt;I've rejected 509975 because it doesn't play nice when&lt;br /&gt;
you're pdb tracking from the shell (see comments in&lt;br /&gt;
that patch).&lt;/p&gt;
&lt;p&gt;I'm not sure this patch works correctly either, but for a&lt;br /&gt;
different reason: it doesn't actually work for me!&lt;/p&gt;
&lt;p&gt;If I add &amp;amp;quot;import pdb; pdb.set_trace()&amp;amp;quot; to a file and&lt;br /&gt;
then&lt;br /&gt;
execute the file from the shell buffer, I see the overlay&lt;br /&gt;
arrow.  If I then switch to a gdb debugging a C program and&lt;br /&gt;
hit &amp;amp;quot;next&amp;amp;quot;, the overlay arrow in the .py buffer&lt;br /&gt;
disappears.&lt;/p&gt;
&lt;p&gt;This seems like a tricky problem and I don't have a good&lt;br /&gt;
solution, but I think I have to reject this patch too.&lt;/p&gt;
&lt;p&gt;-----------------------------------------------------------------&lt;/p&gt;
&lt;p&gt;Date: 2002-07-16 19:02&lt;br /&gt;
Sender: nobody&lt;br /&gt;
Logged In: NO &lt;/p&gt;
&lt;p&gt;The problem my patch was intended to fix is that currently&lt;br /&gt;
just loading python-mode.el (as happens by default&lt;br /&gt;
under Red&lt;br /&gt;
Hat 7.3) breaks gdb-mode.  With my patch, it works fine.&lt;/p&gt;
&lt;p&gt;emacs only supports one overlay arrow at a time; if you hit&lt;br /&gt;
'next' in gdb, gdb-mode will set the overlay arrow, which&lt;br /&gt;
means that it will no longer be set in the python buffer. &lt;br /&gt;
This may not be ideal behavior, but it's a limitation of&lt;br /&gt;
emacs, not a bug in my patch.&lt;/p&gt;
&lt;p&gt;-----------------------------------------------------------------&lt;/p&gt;
&lt;p&gt;Date: 2002-07-16 19:30&lt;br /&gt;
Sender: bwarsaw&lt;br /&gt;
Logged In: YES &lt;br /&gt;
user_id=12800&lt;/p&gt;
&lt;p&gt;Hmm, it must work differently in emacs than in XEmacs&lt;br /&gt;
(which&lt;br /&gt;
is what I use).  In a vanilla Emacs 21.2.1 I can't get the&lt;br /&gt;
overlay arrow to work even without python-mode.el&lt;br /&gt;
loaded, so&lt;br /&gt;
I'll have to take your word for it.&lt;/p&gt;
&lt;p&gt;In XEmacs, I definitely do get two overlay arrows, one in&lt;br /&gt;
the C buffer and one in the python-mode buffer.  As I step&lt;br /&gt;
through the python program, the C arrow stays nicely&lt;br /&gt;
visible&lt;br /&gt;
and highlighted.  As I step through gdb though, the python&lt;br /&gt;
overlay arrow disappears.&lt;/p&gt;
&lt;p&gt;Your patch makes no difference to me and I can't get&lt;br /&gt;
overlay&lt;br /&gt;
arrow working at all in Emacs, so I suppose the patch is&lt;br /&gt;
benign.  I'll reopen it but I'd like confirmation from some&lt;br /&gt;
other Emacs user that this fixes the problem in that&lt;br /&gt;
editor.&lt;br /&gt;
Alternatively, maybe I should just apply it and worry&lt;br /&gt;
about&lt;br /&gt;
it if people complain.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Martin v. Löwis</dc:creator><pubDate>Sat, 09 Aug 2003 10:03:54 -0000</pubDate><guid>https://sourceforge.net8a4f94d865eac4475168f476c5e3e3b02a917320</guid></item></channel></rss>