* bug#38413: 27.0.50; [PATCH] python.el: Check if buffer `python-pdbtrack-tracked-buffer' is live.
@ 2019-11-28 14:03 Andrii Kolomoiets
2019-12-07 9:42 ` Eli Zaretskii
0 siblings, 1 reply; 2+ messages in thread
From: Andrii Kolomoiets @ 2019-11-28 14:03 UTC (permalink / raw)
To: 38413
[-- Attachment #1: Type: text/plain, Size: 226 bytes --]
1. echo 'import pdb; pdb.set_trace()' > test.py
2. emacs -Q
3. M-x run-python
4. M-x python-shell-send-file <RET> test.py
5. C-x k test.py
6. c <RET>
Leads to error:
python-pdbtrack-tracking-finish: Selecting deleted buffer
[-- Attachment #2: 0001-python.el-Call-buffer-live-p-in-python-pdbtrack-unse.patch --]
[-- Type: application/octet-stream, Size: 1230 bytes --]
From cf8a031307bd21da448982c0ae9ceaf9ac5616cd Mon Sep 17 00:00:00 2001
From: Andrii Kolomoiets <andreyk.mad@gmail.com>
Date: Thu, 28 Nov 2019 15:54:41 +0200
Subject: [PATCH] python.el: Call buffer-live-p in
python-pdbtrack-unset-tracked-buffer
* lisp/progmodes/python.el (python-pdbtrack-unset-tracked-buffer):
Check if buffer `python-pdbtrack-tracked-buffer' is live.
---
lisp/progmodes/python.el | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index e720c6eb6a..1b3b92deaf 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -3832,10 +3832,10 @@ python-pdbtrack-set-tracked-buffer
(defun python-pdbtrack-unset-tracked-buffer ()
"Untrack currently tracked buffer."
- (when python-pdbtrack-tracked-buffer
+ (when (buffer-live-p python-pdbtrack-tracked-buffer)
(with-current-buffer python-pdbtrack-tracked-buffer
- (set-marker overlay-arrow-position nil))
- (setq python-pdbtrack-tracked-buffer nil)))
+ (set-marker overlay-arrow-position nil)))
+ (setq python-pdbtrack-tracked-buffer nil))
(defun python-pdbtrack-tracking-finish ()
"Finish tracking."
--
2.15.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* bug#38413: 27.0.50; [PATCH] python.el: Check if buffer `python-pdbtrack-tracked-buffer' is live.
2019-11-28 14:03 bug#38413: 27.0.50; [PATCH] python.el: Check if buffer `python-pdbtrack-tracked-buffer' is live Andrii Kolomoiets
@ 2019-12-07 9:42 ` Eli Zaretskii
0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2019-12-07 9:42 UTC (permalink / raw)
To: Andrii Kolomoiets; +Cc: 38413-done
> From: Andrii Kolomoiets <andreyk.mad@gmail.com>
> Date: Thu, 28 Nov 2019 16:03:30 +0200
>
> 1. echo 'import pdb; pdb.set_trace()' > test.py
> 2. emacs -Q
> 3. M-x run-python
> 4. M-x python-shell-send-file <RET> test.py
> 5. C-x k test.py
> 6. c <RET>
>
> Leads to error:
> python-pdbtrack-tracking-finish: Selecting deleted buffer
Thanks, pushed to the master branch.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-12-07 9:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-28 14:03 bug#38413: 27.0.50; [PATCH] python.el: Check if buffer `python-pdbtrack-tracked-buffer' is live Andrii Kolomoiets
2019-12-07 9:42 ` Eli Zaretskii
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).