From unknown Sat Aug 16 16:18:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22934: 24.5; python-mode: evaluating whole buffer after edit gives right lines in error stack trace but quick navigation doesn't lead to correct lines (offset corespodnce to number of added lines) Resent-From: Oleksandr Gavenko Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 07 Mar 2016 17:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 22934 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 22934@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.145737008925041 (code B ref -1); Mon, 07 Mar 2016 17:02:02 +0000 Received: (at submit) by debbugs.gnu.org; 7 Mar 2016 17:01:29 +0000 Received: from localhost ([127.0.0.1]:38303 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1acyXB-0006Vp-KV for submit@debbugs.gnu.org; Mon, 07 Mar 2016 12:01:29 -0500 Received: from eggs.gnu.org ([208.118.235.92]:46905) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1acyX9-0006Va-Mf for submit@debbugs.gnu.org; Mon, 07 Mar 2016 12:01:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1acyWv-0002Dt-Sa for submit@debbugs.gnu.org; Mon, 07 Mar 2016 12:01:22 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:40430) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1acyWv-0002Di-IG for submit@debbugs.gnu.org; Mon, 07 Mar 2016 12:01:13 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37789) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1acyWp-0005fQ-E5 for bug-gnu-emacs@gnu.org; Mon, 07 Mar 2016 12:01:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1acyWl-00029n-5u for bug-gnu-emacs@gnu.org; Mon, 07 Mar 2016 12:01:07 -0500 Received: from mail-lb0-x229.google.com ([2a00:1450:4010:c04::229]:35901) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1acyWk-00028T-Us for bug-gnu-emacs@gnu.org; Mon, 07 Mar 2016 12:01:03 -0500 Received: by mail-lb0-x229.google.com with SMTP id x1so137708490lbj.3 for ; Mon, 07 Mar 2016 09:01:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:mime-version; bh=/qEnYNjFCcrYPagNEMtSlzwVwmZ+kPAD2vqRpOjmseQ=; b=Vv9KY7R0a2GRjaoGMaM2ztcl0xp6eVSfhr8fmqc4Iq8ipMHi/GKzfIyDNjsm5jrRSC 7CtQX8q8Nr7Pfwp8eqDMcYxsYonCW+yhm7LBcwQr+54gNd+5B1UYAntq0cZLAychAuqx SFuBk4RVRvIG+BGDgM7mVabpEpHThaeXhfuJNPbWM2WNosy5jiO4e8jG57ImczbY3z56 gwJQYuWgST6v97buKIImv84eI4Ylnj33LAw1m7Mvq1nKP6KC44XbV+Qarn4EI5ILdgcA hbGsDaitF5f0CnuePFnnDR6YKXFLz6OBzeCvsZVzWXWtN5C7eHHlp0QQM0kHA9sOmSS2 F0Nw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=/qEnYNjFCcrYPagNEMtSlzwVwmZ+kPAD2vqRpOjmseQ=; b=P8jvs+QWIDQ2AatqIQht81K/t6vnaq0zQZudsIRT+D2RE1pe4YDRPItb5YwlXotjxe hTufnIlNu058aFOL18Lb+XMrbHD87zpAxiYDFuasusvN01NAYmMJJo5y3ksu6drmkqdR xSqp885u4Smc8pn/hTBS7GTPjiLUBnW4SHTjoa81vRpv/Ux3JMtuNpNgCwxqWJsowLWC Z5uz7Sl5YTyQ60G7VtWIWtH/3Z0bVTki1Yuq3nGK8/k32B9PsN1W+Ex39FMqgsUDXCkh eEztEiJjjVOFw8/gOgR3Dg7Ez17eYuMul+qoHonH4E2j4/ZwM/5IW12wzLa99wLM1TVW 82eA== X-Gm-Message-State: AD7BkJLYYUwzVUoobNoyaiFfhw0Tp0INcxUUWun9COwWN3dUU/pYLI0cSuG+XkAxbiFa/A== X-Received: by 10.112.46.136 with SMTP id v8mr6048712lbm.38.1457370061499; Mon, 07 Mar 2016 09:01:01 -0800 (PST) Received: from desktop ([46.118.53.144]) by smtp.gmail.com with ESMTPSA id l5sm2864904lfd.22.2016.03.07.09.01.00 for (version=TLSv1/SSLv3 cipher=OTHER); Mon, 07 Mar 2016 09:01:00 -0800 (PST) From: Oleksandr Gavenko Date: Mon, 07 Mar 2016 19:00:59 +0200 Message-ID: <87egbm5ik4.fsf@gavenkoa.example.com> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) In GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, GTK+ Version 3.18.2) of 2015-10-24 on trouble, modified by Debian $ emacs -q C-x C-f ~/tmp/my.py RET def hello(flag): if flag: print "hello" else: raise Exception("xxx") hello(True) C-c C-c C-c C-z Now I see result of my.py file execution. Lets make edit in file: def hello(flag): print "THIS LINE WAS ADDED" if flag: print "hello" else: raise Exception("xxx") hello(False) # give me exception! C-c C-c C-c C-z I see: Traceback (most recent call last): File "", line 1, in File "/home/user/tmp/my.py", line 8, in hello(True) File "/home/user/tmp/my.py", line 6, in hello raise Exception("xxx") and line: File "/home/user/tmp/my.py", line 6, in hello is clickable and leads to line **7** in a file. But actually error in line 6 as reported by Python inferior process. Just add more lines to better see effect. On each subsequent whole buffer evaluation (C-c C-c or M-x python-shell-send-buffer) constantly errors point to incorrect line with offsets according to how how many lines added or deleted before correct line. Mode should not preserve line mapping between original file submission and `compile-goto-error' should point to specified line position in file instead of using "smart mapping" even if edit occurs. I believe I use official GNU Python mode: /usr/share/emacs/24.5/lisp/progmodes/python.el.gz -- http://defun.work/ From unknown Sat Aug 16 16:18:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22934: 24.5; python-mode: evaluating whole buffer after edit gives right lines in error stack trace but quick navigation doesn't lead to correct lines (offset corespodnce to number of added lines) Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 03 Dec 2020 09:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22934 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Oleksandr Gavenko Cc: 22934@debbugs.gnu.org Received: via spool by 22934-submit@debbugs.gnu.org id=B22934.16069873193499 (code B ref 22934); Thu, 03 Dec 2020 09:22:02 +0000 Received: (at 22934) by debbugs.gnu.org; 3 Dec 2020 09:21:59 +0000 Received: from localhost ([127.0.0.1]:38338 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kkkoJ-0000uN-EQ for submit@debbugs.gnu.org; Thu, 03 Dec 2020 04:21:59 -0500 Received: from quimby.gnus.org ([95.216.78.240]:43212) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kkkoG-0000u3-R4 for 22934@debbugs.gnu.org; Thu, 03 Dec 2020 04:21:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=PYXFGgSno1ngtPAmYK40Fjmqxcby+dLGx8isWSVPytI=; b=XNKev6Tc3FzYHMZaFgkWQ84qZE QgHZ9ShSKIq8jDjdXEEpH0kjdK4ywuGQlzk2JoC2qJ7BXCvhmex7D65vkTKIBV4d+yv8Y850B7vtA 0b3xTpCGTj5nQt7DU2JusGuElNS+5EET8uYz5pK21rvG+kVf+dRcSskZkHD/Cvzc+5wc=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kkko7-0001c8-Kp; Thu, 03 Dec 2020 10:21:50 +0100 From: Lars Ingebrigtsen References: <87egbm5ik4.fsf@gavenkoa.example.com> X-Now-Playing: Nettle's _El Resplandor: The Shining in Dubai_: "Espina" Date: Thu, 03 Dec 2020 10:21:45 +0100 In-Reply-To: <87egbm5ik4.fsf@gavenkoa.example.com> (Oleksandr Gavenko's message of "Mon, 07 Mar 2016 19:00:59 +0200") Message-ID: <87y2ifw8gm.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Oleksandr Gavenko writes: > I see: > > Traceback (most recent call last): > File "", line 1, in > File "/home/user/tmp/my.py", line 8, in > hello(True) > File "/home/user/tmp/my.py", line 6, in hello > [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Oleksandr Gavenko writes: > I see: > > Traceback (most recent call last): > File "", line 1, in > File "/home/user/tmp/my.py", line 8, in > hello(True) > File "/home/user/tmp/my.py", line 6, in hello > raise Exception("xxx") > > and line: > > File "/home/user/tmp/my.py", line 6, in hello > > is clickable and leads to line **7** in a file. But actually error in line 6 > as reported by Python inferior process. Just add more lines to better see > effect. This should now be fixed in Emacs 28. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 03 04:22:06 2020 Received: (at control) by debbugs.gnu.org; 3 Dec 2020 09:22:06 +0000 Received: from localhost ([127.0.0.1]:38342 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kkkoP-0000v4-Pd for submit@debbugs.gnu.org; Thu, 03 Dec 2020 04:22:05 -0500 Received: from quimby.gnus.org ([95.216.78.240]:43226) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kkkoO-0000uL-0M for control@debbugs.gnu.org; Thu, 03 Dec 2020 04:22:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=dG6Egj7ZifXXdtxVUZomPQqIH6LgmJx/EiIRDgvoMbE=; b=SGhVIxfyYUR65uPNJJp4UY3I7g W0kTldIpKr2P/sk4vGReDIOvxlAVlvW5w9kHtMZz+2M2/xYooF4xknXSx4D5hS07wjZFEhWbjLkJq 4FmFfD9krI2dQSyO/RAchOr809mfbc7Q+OYy6Rox+Z2DFZLEwh5UDdfZ9gV/ZXo2Ktko=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kkkoG-0001cF-BE for control@debbugs.gnu.org; Thu, 03 Dec 2020 10:21:58 +0100 Date: Thu, 03 Dec 2020 10:21:55 +0100 Message-Id: <87wnxzw8gc.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #22934 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 22934 fixed close 22934 28.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 22934 fixed close 22934 28.1 quit