From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Andrii Kolomoiets Newsgroups: gmane.emacs.devel Subject: python: Let pdb tracking not kill buffers Date: Fri, 4 Oct 2019 23:32:09 +0300 Message-ID: Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Content-Type: multipart/mixed; boundary="Apple-Mail=_DCA5C425-D020-48B5-96BF-826EB19A8340" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="104446"; mail-complaints-to="usenet@blaine.gmane.org" To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 04 22:32:25 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iGUFU-000R0D-JE for ged-emacs-devel@m.gmane.org; Fri, 04 Oct 2019 22:32:24 +0200 Original-Received: from localhost ([::1]:53132 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iGUFS-0003a5-VM for ged-emacs-devel@m.gmane.org; Fri, 04 Oct 2019 16:32:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33605) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iGUFK-0003Yf-Uz for emacs-devel@gnu.org; Fri, 04 Oct 2019 16:32:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iGUFJ-0002xl-Of for emacs-devel@gnu.org; Fri, 04 Oct 2019 16:32:14 -0400 Original-Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]:54377) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iGUFJ-0002wx-G5 for emacs-devel@gnu.org; Fri, 04 Oct 2019 16:32:13 -0400 Original-Received: by mail-wm1-x344.google.com with SMTP id p7so7043586wmp.4 for ; Fri, 04 Oct 2019 13:32:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:mime-version:subject:message-id:date:to; bh=nTD5D4BrUXkPOqYhxDFwgEmNVWNwps6kNArT9rk4r7w=; b=fkQGicGSx1PGrWyh40mYMhlHKIGo2DNevK7WlPe1mmjZOpf0fz3Kfr8JwQykTnMOOr T2fBN/1+A5cnjdi8MXoYLzCGXsvaOhjTN2ICrpAK1q/bMLdqHQ479TbI7a/7tZCFhom0 t+2+ZUAUzhorN2QQYfTYIkJJ7KETr+OyMxFRWWTCqZ4Xy/ayzJS5aAH5ltf+Cj4d8VzF RbihpkwLeO5Rqi3NWV3MaYRsWSripkRrRr11NAykII4YTAjO2nD9T45cu3807F0szXl0 vFwhefDLjqfGLOCcc33CJb5yi1DJJrRiuibXmiUAGYxQ9DsnhH/QtEPsLeQ7wtRVQWD4 HCyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:mime-version:subject:message-id:date:to; bh=nTD5D4BrUXkPOqYhxDFwgEmNVWNwps6kNArT9rk4r7w=; b=XERredQkE9Xbju3mIpFcYyU9X8gawcEZxnmEiUgm8KvBT6d98bB8buapOvXZWafdxV hXBM/wybKHF6zSARSrhZEpMUqm4sJkPmlnKCMC+/qIAhRBL4DezjvsUD5pkx4Hxyumx2 llCdqpBUWV5I8u3Rfh4Qw2AowYJ/68/Z4/ieUW/dMx0bdnVsrab6Nhy+2oFsu8rqpS4N ZGm/IDIy9heBgoSu9xA6vVwqdigNs0doS4M0iZMjnWGNbEKZLW+O5OleoSXvqa1pzA+T Rxn3srd8lVndy4W+uXphZ+LwwHXtxIH+NmY5XhtdiWa8c0hcDK5w6uCzQwaynF8Atorn bIyA== X-Gm-Message-State: APjAAAWOdvQSpYuiMdc5LY6/UEu1o3Hu8J1mnRiXezNCgnBFSkrgAtnP EXi8T9uzFaxoNLZGbSnRyQ9QEfyh X-Google-Smtp-Source: APXvYqyrDbg30eB7rFfhbFEZNba21eOXIYrJSGgZysDzQc506OpqDOLmhAKQdeVoqU4bqGiE60Y7Mw== X-Received: by 2002:a7b:c403:: with SMTP id k3mr12738104wmi.89.1570221131571; Fri, 04 Oct 2019 13:32:11 -0700 (PDT) Original-Received: from [192.168.0.104] ([91.206.110.129]) by smtp.gmail.com with ESMTPSA id o22sm16301448wra.96.2019.10.04.13.32.10 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 04 Oct 2019 13:32:10 -0700 (PDT) X-Mailer: Apple Mail (2.3445.104.11) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::344 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:240584 Archived-At: --Apple-Mail=_DCA5C425-D020-48B5-96BF-826EB19A8340 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii Hello, Let's start from example: 1. echo "import pdb; pdb.set_trace()" > test.py 2. emacs -Q 3. M-x run-python 4. M-x python-shell-send-file test.py Now there are two windows: one with pdb session and another one with source code. Now in pdb prompt: pass The source code buffer is killed because pdb tracking comint output filter doesn't found file name in the output and decides that tracking session is over. This behavior interferes with debug session. Moving frame up/down the stack trace open new files but evaluating some code kill them when they are still needed. Another reason to not kill buffers is that I want the file opened during debug session stay there when the debug session is over because I want to change it. My point is: it's hard to tell that debug session is over judging from the output but it can be determined by inspecting the input. Attached patch brings the following changes: - New variable `python-pdbtrack-kill-buffers' that make buffers killing optional; - Comint input filter which decides that the debug session is over; - Process sentinel to finish tracking when python process is killed. Please see attached patch. I certainly sure docstrings and naming are not so good but they can be fine tuned later if the main idea will be accepted. Thanks. --Apple-Mail=_DCA5C425-D020-48B5-96BF-826EB19A8340 Content-Disposition: attachment; filename=pdb-track.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="pdb-track.patch" Content-Transfer-Encoding: quoted-printable diff=20--git=20a/lisp/progmodes/python.el=20b/lisp/progmodes/python.el=0A= index=20ae5aff351c..4f9dfba8b3=20100644=0A---=20= a/lisp/progmodes/python.el=0A+++=20b/lisp/progmodes/python.el=0A@@=20= -2795,7=20+2795,6=20@@=20inferior-python-mode=0A=20=20=20(set=20= (make-local-variable=20'comint-output-filter-functions)=0A=20=20=20=20=20= =20=20=20'(ansi-color-process-output=0A=20=20=20=20=20=20=20=20=20=20= python-shell-comint-watch-for-first-prompt-output-filter=0A-=20=20=20=20=20= =20=20=20=20python-pdbtrack-comint-output-filter-function=0A=20=20=20=20=20= =20=20=20=20=20python-comint-postoutput-scroll-to-bottom=0A=20=20=20=20=20= =20=20=20=20=20comint-watch-for-password-prompt))=0A=20=20=20(set=20= (make-local-variable=20'compilation-error-regexp-alist)=0A@@=20-2809,7=20= +2808,8=20@@=20inferior-python-mode=0A=20=20=20(make-local-variable=20= 'python-shell-internal-last-output)=0A=20=20=20(when=20= python-shell-font-lock-enable=0A=20=20=20=20=20= (python-shell-font-lock-turn-on))=0A-=20=20(compilation-shell-minor-mode=20= 1))=0A+=20=20(compilation-shell-minor-mode=201)=0A+=20=20= (python-pdbtrack-setup-tracking))=0A=20=0A=20(defun=20= python-shell-make-comint=20(cmd=20proc-name=20&optional=20show=20= internal)=0A=20=20=20"Create=20a=20Python=20shell=20comint=20buffer.=0A= @@=20-3744,13=20+3744,29=20@@=20python-pdbtrack-activate=0A=20=20=20= :safe=20'booleanp)=0A=20=0A=20(defcustom=20= python-pdbtrack-stacktrace-info-regexp=0A-=20=20">=20= \\([^\"(<]+\\)(\\([0-9]+\\))\\([?a-zA-Z0-9_<>]+\\)()"=0A+=20=20">=20= \\([^\"(]+\\)(\\([0-9]+\\))\\([?a-zA-Z0-9_<>]+\\)()"=0A=20=20=20"Regular=20= expression=20matching=20stacktrace=20information.=0A=20Used=20to=20= extract=20the=20current=20line=20and=20module=20being=20inspected."=0A=20= =20=20:type=20'string=0A=20=20=20:group=20'python=0A=20=20=20:safe=20= 'stringp)=0A=20=0A+(defcustom=20python-pdbtrack-continue-command=20'("c"=20= "cont"=20"continue")=0A+=20=20"Pdb=20continue=20command."=0A+=20=20:type=20= 'list=0A+=20=20:group=20'python)=0A+=0A+(defcustom=20= python-pdbtrack-untrack-commands=20'("c"=20"cont"=20"continue"=20"q"=20= "quit"=20"exit")=0A+=20=20"Pdb=20commands=20that=20finish=20tracking=20= session."=0A+=20=20:type=20'list=0A+=20=20:group=20'python)=0A+=0A= +(defcustom=20python-pdbtrack-kill-buffers=20t=0A+=20=20"Kill=20buffers=20= when=20tracking=20is=20finished.=0A+Only=20buffers=20opened=20during=20= tracking=20will=20be=20killed."=0A+=20=20:type=20'boolean=0A+=20=20= :group=20'python)=0A+=0A=20(defvar=20python-pdbtrack-tracked-buffer=20= nil=0A=20=20=20"Variable=20containing=20the=20value=20of=20the=20current=20= tracked=20buffer.=0A=20Never=20set=20this=20variable=20directly,=20use=0A= @@=20-3759,6=20+3775,9=20@@=20python-pdbtrack-tracked-buffer=0A=20= (defvar=20python-pdbtrack-buffers-to-kill=20nil=0A=20=20=20"List=20of=20= buffers=20to=20be=20deleted=20after=20tracking=20finishes.")=0A=20=0A= +(defvar=20python-pdbtrack-prev-command-continue=20nil=0A+=20=20"Is=20t=20= if=20previous=20pdb=20command=20was=20'continue'.")=0A+=0A=20(defun=20= python-pdbtrack-set-tracked-buffer=20(file-name)=0A=20=20=20"Set=20the=20= buffer=20for=20FILE-NAME=20as=20the=20tracked=20buffer.=0A=20Internally=20= it=20uses=20the=20`python-pdbtrack-tracked-buffer'=20variable.=0A@@=20= -3766,8=20+3785,7=20@@=20python-pdbtrack-set-tracked-buffer=0A=20=20=20= (let*=20((file-name-prospect=20(concat=20(file-remote-p=20= default-directory)=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20file-name))=0A=20=20=20=20=20=20=20= =20=20=20(file-buffer=20(get-file-buffer=20file-name-prospect)))=0A-=20=20= =20=20(if=20file-buffer=0A-=20=20=20=20=20=20=20=20(setq=20= python-pdbtrack-tracked-buffer=20file-buffer)=0A+=20=20=20=20(unless=20= file-buffer=0A=20=20=20=20=20=20=20(cond=0A=20=20=20=20=20=20=20=20= ((file-exists-p=20file-name-prospect)=0A=20=20=20=20=20=20=20=20=20(setq=20= file-buffer=20(find-file-noselect=20file-name-prospect)))=0A@@=20= -3775,10=20+3793,52=20@@=20python-pdbtrack-set-tracked-buffer=0A=20=20=20= =20=20=20=20=20=20=20=20=20=20=20(file-exists-p=20file-name))=0A=20=20=20= =20=20=20=20=20=20;;=20Fallback=20to=20a=20locally=20available=20copy=20= of=20the=20file.=0A=20=20=20=20=20=20=20=20=20(setq=20file-buffer=20= (find-file-noselect=20file-name-prospect))))=0A-=20=20=20=20=20=20(when=20= (not=20(member=20file-buffer=20python-pdbtrack-buffers-to-kill))=0A+=20=20= =20=20=20=20(when=20(and=20python-pdbtrack-kill-buffers=0A+=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20(not=20(member=20file-buffer=20= python-pdbtrack-buffers-to-kill)))=0A=20=20=20=20=20=20=20=20=20= (add-to-list=20'python-pdbtrack-buffers-to-kill=20file-buffer)))=0A+=20=20= =20=20(setq=20python-pdbtrack-tracked-buffer=20file-buffer)=0A=20=20=20=20= =20file-buffer))=0A=20=0A+(defun=20python-pdbtrack-unset-tracked-buffer=20= ()=0A+=20=20"Untrack=20currently=20tracked=20buffer."=0A+=20=20(when=20= python-pdbtrack-tracked-buffer=0A+=20=20=20=20(with-current-buffer=20= python-pdbtrack-tracked-buffer=0A+=20=20=20=20=20=20(set-marker=20= overlay-arrow-position=20nil))=0A+=20=20=20=20(setq=20= python-pdbtrack-tracked-buffer=20nil)))=0A+=0A+(defun=20= python-pdbtrack-tracking-finish=20()=0A+=20=20"Finish=20tracking."=0A+=20= =20(python-pdbtrack-unset-tracked-buffer)=0A+=20=20(when=20= python-pdbtrack-kill-buffers=0A+=20=20=20=20=20=20(mapc=20#'(lambda=20= (buffer)=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (ignore-errors=20(kill-buffer=20buffer)))=0A+=20=20=20=20=20=20=20=20=20=20= =20=20python-pdbtrack-buffers-to-kill))=0A+=20=20(setq=20= python-pdbtrack-buffers-to-kill=20nil))=0A+=0A+(defun=20= python-pdbtrack-process-sentinel=20(process=20_event)=0A+=20=20"Untrack=20= buffers=20when=20PROCESS=20is=20killed."=0A+=20=20(unless=20= (process-live-p=20process)=0A+=20=20=20=20= (python-pdbtrack-tracking-finish)))=0A+=0A+(defun=20= python-pdbtrack-comint-input-filter-function=20(input)=0A+=20=20"Finish=20= tracking=20session=20depending=20on=20command=20in=20INPUT.=0A+Commands=20= that=20must=20finish=20tracking=20session=20is=20listed=20in=0A= +`python-pdbtrack-untracking-commands'."=0A+=20=20(when=20(and=20= python-pdbtrack-tracked-buffer=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20= ;;=20Empty=20input=20is=20sent=20by=20C-d=20or=20`comint-send-eof'=0A+=20= =20=20=20=20=20=20=20=20=20=20=20=20(or=20(string-empty-p=20input)=0A+=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20;;=20"n=20some=20text"=20= is=20"n"=20command=20for=20pdb.=20Split=20input=20and=20get=20firs=20= part=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(let*=20= ((command=20(car=20(split-string=20(string-trim=20input)=20"=20"))))=0A+=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(setq=20= python-pdbtrack-prev-command-continue=0A+=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20(or=20(member=20command=20= python-pdbtrack-continue-command)=0A+=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20;;=20if=20command=20= is=20empty=20and=20previous=20command=20was=20'continue'=0A+=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= ;;=20then=20current=20command=20is=20'continue'=20too.=0A+=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (and=20(string-empty-p=20command)=0A+=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= python-pdbtrack-prev-command-continue)))=0A+=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20(or=20python-pdbtrack-prev-command-continue=0A= +=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (member=20command=20python-pdbtrack-untrack-commands)))))=0A+=20=20=20=20= (python-pdbtrack-tracking-finish)))=0A+=0A=20(defun=20= python-pdbtrack-comint-output-filter-function=20(output)=0A=20=20=20= "Move=20overlay=20arrow=20to=20current=20pdb=20line=20in=20tracked=20= buffer.=0A=20Argument=20OUTPUT=20is=20a=20string=20with=20the=20output=20= from=20the=20comint=20process."=0A@@=20-3798,19=20+3858,27=20@@=20= python-pdbtrack-comint-output-filter-function=0A=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20;;=20the=20_last_=20stack=20frame=20printed=20in=20the=20= most=20recent=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20;;=20batch=20= of=20output,=20then=20jump=20to=20the=20corresponding=0A=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20;;=20file/line=20number.=0A+=20=20=20=20=20=20= =20=20=20=20=20=20=20=20;;=20Parse=20output=20only=20if=20at=20pdb=20= prompt=20to=20avoid=20double=20code=0A+=20=20=20=20=20=20=20=20=20=20=20=20= =20=20;;=20run=20in=20situation=20when=20output=20and=20pdb=20prompt=20= received=20in=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20;;=20= different=20hunks=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (goto-char=20(point-max))=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (when=20(re-search-backward=20python-pdbtrack-stacktrace-info-regexp=20= nil=20t)=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20(goto-char=20= (line-beginning-position))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (when=20(and=20(looking-at=20python-shell-prompt-pdb-regexp)=0A+=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (re-search-backward=20python-pdbtrack-stacktrace-info-regexp=20nil=20t))=0A= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(setq=20line-number=20= (string-to-number=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (match-string-no-properties=202)))=0A=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20(match-string-no-properties=201)))))=0A-=20=20=20=20=20=20= (if=20(and=20file-name=20line-number)=0A-=20=20=20=20=20=20=20=20=20=20= (let*=20((tracked-buffer=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20(python-pdbtrack-set-tracked-buffer=20file-name))=0A+=20=20=20=20= =20=20(when=20(and=20file-name=20line-number)=0A+=20=20=20=20=20=20=20=20= (if=20(string-prefix-p=20"<"=20file-name)=0A+=20=20=20=20=20=20=20=20=20=20= =20=20;;=20Finish=20tracking=20session=20if=20stacktrace=20info=20is=20= like=0A+=20=20=20=20=20=20=20=20=20=20=20=20;;=20">=20= (1)()->None"=0A+=20=20=20=20=20=20=20=20=20=20=20=20= (python-pdbtrack-tracking-finish)=0A+=20=20=20=20=20=20=20=20=20=20= (python-pdbtrack-unset-tracked-buffer)=0A+=20=20=20=20=20=20=20=20=20=20= (let*=20((tracked-buffer=20(python-pdbtrack-set-tracked-buffer=20= file-name))=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (shell-buffer=20(current-buffer))=0A=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20(tracked-buffer-window=20(get-buffer-window=20= tracked-buffer))=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (tracked-buffer-line-pos))=0A=20=20=20=20=20=20=20=20=20=20=20=20=20= (with-current-buffer=20tracked-buffer=0A-=20=20=20=20=20=20=20=20=20=20=20= =20=20=20(set=20(make-local-variable=20'overlay-arrow-string)=20"=3D>")=0A= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(set=20(make-local-variable=20= 'overlay-arrow-position)=20(make-marker))=0A=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20(setq=20tracked-buffer-line-pos=20(progn=0A=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(goto-char=20= (point-min))=0A@@=20-3821,17=20+3889,18=20@@=20= python-pdbtrack-comint-output-filter-function=0A=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20tracked-buffer-window=20= tracked-buffer-line-pos))=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (set-marker=20overlay-arrow-position=20tracked-buffer-line-pos))=0A=20=20= =20=20=20=20=20=20=20=20=20=20=20(pop-to-buffer=20tracked-buffer)=0A-=20=20= =20=20=20=20=20=20=20=20=20=20(switch-to-buffer-other-window=20= shell-buffer))=0A-=20=20=20=20=20=20=20=20(when=20= python-pdbtrack-tracked-buffer=0A-=20=20=20=20=20=20=20=20=20=20= (with-current-buffer=20python-pdbtrack-tracked-buffer=0A-=20=20=20=20=20=20= =20=20=20=20=20=20(set-marker=20overlay-arrow-position=20nil))=0A-=20=20=20= =20=20=20=20=20=20=20(mapc=20#'(lambda=20(buffer)=0A-=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20(ignore-errors=20(kill-buffer=20= buffer)))=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= python-pdbtrack-buffers-to-kill)=0A-=20=20=20=20=20=20=20=20=20=20(setq=20= python-pdbtrack-tracked-buffer=20nil=0A-=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20python-pdbtrack-buffers-to-kill=20nil)))))=0A+=20=20=20=20= =20=20=20=20=20=20=20=20(switch-to-buffer-other-window=20= shell-buffer))))))=0A=20=20=20output)=0A=20=0A+(defun=20= python-pdbtrack-setup-tracking=20()=0A+=20=20"Setup=20pdb=20tracking=20= in=20current=20buffer."=0A+=20=20(add-to-list=20(make-local-variable=20= 'comint-input-filter-functions)=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20#'python-pdbtrack-comint-input-filter-function)=0A+=20=20= (add-to-list=20(make-local-variable=20'comint-output-filter-functions)=0A= +=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= #'python-pdbtrack-comint-output-filter-function)=0A+=20=20= (set-process-sentinel=20(get-buffer-process=20(current-buffer))=0A+=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= #'python-pdbtrack-process-sentinel))=0A+=0A=20=0C=0A=20;;;=20Symbol=20= completion=0A=20=0A= --Apple-Mail=_DCA5C425-D020-48B5-96BF-826EB19A8340--