From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.bugs Subject: bug#36556: 26.2; python.el pdbtracking sometimes kills buffers when it shouldn't (plus fix) Date: Wed, 17 Jul 2019 11:03:53 -0400 Message-ID: <85blxsln3a.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="245176"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.92 (windows-nt) Cc: 36556@debbugs.gnu.org To: Ken Manheimer Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jul 17 17:05:21 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1hnlUf-0011f6-6S for geb-bug-gnu-emacs@m.gmane.org; Wed, 17 Jul 2019 17:05:21 +0200 Original-Received: from localhost ([::1]:58282 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hnlUe-0007MV-7I for geb-bug-gnu-emacs@m.gmane.org; Wed, 17 Jul 2019 11:05:20 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52972) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hnlUT-0006je-8n for bug-gnu-emacs@gnu.org; Wed, 17 Jul 2019 11:05:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hnlUO-0006YW-Fw for bug-gnu-emacs@gnu.org; Wed, 17 Jul 2019 11:05:09 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44022) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hnlUO-0006YJ-BH for bug-gnu-emacs@gnu.org; Wed, 17 Jul 2019 11:05:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hnlUL-0001cL-V6 for bug-gnu-emacs@gnu.org; Wed, 17 Jul 2019 11:05:04 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 17 Jul 2019 15:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36556 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 36556-submit@debbugs.gnu.org id=B36556.15633758506109 (code B ref 36556); Wed, 17 Jul 2019 15:05:01 +0000 Original-Received: (at 36556) by debbugs.gnu.org; 17 Jul 2019 15:04:10 +0000 Original-Received: from localhost ([127.0.0.1]:52838 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hnlTV-0001aT-OT for submit@debbugs.gnu.org; Wed, 17 Jul 2019 11:04:09 -0400 Original-Received: from mail-io1-f42.google.com ([209.85.166.42]:43248) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hnlTQ-0001Zu-VJ for 36556@debbugs.gnu.org; Wed, 17 Jul 2019 11:04:08 -0400 Original-Received: by mail-io1-f42.google.com with SMTP id k20so46210111ios.10 for <36556@debbugs.gnu.org>; Wed, 17 Jul 2019 08:04:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=0BqViDXQWXFsQ3c/KpM8x9V0k3+CLmziuiSLMcHKgX8=; b=AYJOBP/IllEJlCIRRuk9bKepckPB+My9nT847PF2FyC2+FmQ3beVO5G2NG2wF1bvzT 5B1+oiZUONfGrSV9aqqSGYOSlWOAZBLEYgbxmFFyh6Lnr+OX6MuCNlFYg1omujpcZrCl I3LdVA9q2y4aI6iXUJaF5uNpleONJHb8YO4adZRnVojJybniNfNm8cUy8lQhc09uSh1Z ti98oHFbXP6GujM6zbW/bgTmWXNDAEOzUI5hdDZbhDkuRoI5A++i0fUCGSasid9eh3+i GYUVeGolIzcYnthXnTFKWzOw7+x5U9QLUzntXQFUaO1yMl7NYjkt+4wxwvG6Nnwfyeuw j01g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=0BqViDXQWXFsQ3c/KpM8x9V0k3+CLmziuiSLMcHKgX8=; b=tJ7BEOiqDSWNX7Fi93T5QxjOuJpYbhI5iedI9A7TdPo7aN7crKlNiZbRmVEZNy+tlK MP9fvBKfPOaowBPfBI0ZFVlGfZH5pjYT9+lSCiieYDYUFScSBqda1DLBaN5H2yalf0FS qIcAw2DLcPcXRDwNXGcHK6Ra0dZmzrmlJM+VHgqHpuTaUm7rh3wmQXW/Hzu+mySm/MDc Y1f1FJ3tMXHC0OiWlgbLevBJA5kFUcYcvFRzVnLGDDHiwPcUZnaxzTrP48ETMXd1LxvE lqR8Jy127AHGSuO/giawJXvlMdBTYPGU9qixtJrC5ldNG6LyLJ8NcmzrNGcyYenLY3/k mI2w== X-Gm-Message-State: APjAAAWGhfMBUVZdPpoH/dZasoMz0iDBYqtFeE9+VeJRu/YKfHPetO/1 W0NH0BVvnXJSYGTe5w0LtYO9laRK X-Google-Smtp-Source: APXvYqwWgO9UbWLCa7Npk2pSwZMEO/e5W+PqpBYVyeB6oHbtcuPbmOedDCmSflGZ0zWdezIdE85ezQ== X-Received: by 2002:a5d:9942:: with SMTP id v2mr5652421ios.177.1563375837965; Wed, 17 Jul 2019 08:03:57 -0700 (PDT) Original-Received: from vhost2 (CPE001143542e1f-CMf81d0f809fa0.cpe.net.cable.rogers.com. [99.230.51.196]) by smtp.gmail.com with ESMTPSA id p10sm40591266iob.54.2019.07.17.08.03.56 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 17 Jul 2019 08:03:56 -0700 (PDT) In-Reply-To: (Ken Manheimer's message of "Mon, 8 Jul 2019 18:28:53 -0400") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:163252 Archived-At: Ken Manheimer writes: > The problem is that this provision sometimes registers buffers that > were present in the editing session before the pdbtracking session, so > that pdbtracking sometimes causes pdbtracked buffers to be deleted > when it shouldn't. > > I'm unsure what exact conditions lead to the problem, I guess this can happen if your python source files are accessible through symlinks? > but I'm pretty sure > that `python-pdbtrack-set-tracked-buffer()` uses the wrong buffer-finding > function. Instead of using `get-file-buffer()`, it should be using > `find-buffer-visiting()`. I believe that this will solve the problem. I think this should be conditional on (or find-file-existing-other-name find-file-visit-truename), which is what find-file-noselect checks for.