GNU bug report logs - #19823
25.0.50; Inferior-python-mode buffer can't be killed if process is dead

Previous Next

Package: emacs;

Reported by: Dima Kogan <dima <at> secretsauce.net>

Date: Mon, 9 Feb 2015 20:06:01 UTC

Severity: normal

Fixed in version 25.0.50

Done: fgallina <at> gnu.org (Fabián Ezequiel Gallina)

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 19823 in the body.
You can then email your comments to 19823 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#19823; Package emacs. (Mon, 09 Feb 2015 20:06:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Dima Kogan <dima <at> secretsauce.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 09 Feb 2015 20:06:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Dima Kogan <dima <at> secretsauce.net>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.0.50;
 Inferior-python-mode buffer can't be killed if process is dead
Date: Mon, 09 Feb 2015 12:05:09 -0800
Hi. Currently emacs requires the inferior python process to exist to be
able to kill that buffer. If the inferior process exits earlier for any
reason, it's impossible to kill the buffer. Recipe:

1. emacs -Q
2. M-x python
3. exit()       [ this exits the session, killing the inferior process ]
4. C-x k enter  [ Error! "No inferior Python process running" ]


This happens because a cleanup handler fails. It needs to explicitly
ignore this particular failure. Wrapping the contents of
python-shell-font-lock-kill-buffer() into (ignore-errors ....) is one
way to fix this:

(defun python-shell-font-lock-kill-buffer ()
  "Kill the font-lock buffer safely."
  (ignore-errors
    (python-shell-with-shell-buffer
      (when (and python-shell--font-lock-buffer
                 (buffer-live-p python-shell--font-lock-buffer))
        (kill-buffer python-shell--font-lock-buffer)
        (when (derived-mode-p 'inferior-python-mode)
          (setq python-shell--font-lock-buffer nil))))))

It should probably be more specific than a blanket ignore-errors, but
the maintainers should decide what they want here.




Reply sent to fgallina <at> gnu.org (Fabián Ezequiel Gallina):
You have taken responsibility. (Thu, 12 Feb 2015 03:43:02 GMT) Full text and rfc822 format available.

Notification sent to Dima Kogan <dima <at> secretsauce.net>:
bug acknowledged by developer. (Thu, 12 Feb 2015 03:43:02 GMT) Full text and rfc822 format available.

Message #10 received at 19823-done <at> debbugs.gnu.org (full text, mbox):

From: fgallina <at> gnu.org (Fabián Ezequiel Gallina)
To: 19823-done <at> debbugs.gnu.org
Subject: 25.0.50;
 Inferior-python-mode buffer can't be killed if process is dead
Date: Thu, 12 Feb 2015 00:42:11 -0300
Fixed at revno da726ad in the master branch.


Thanks,
Fabián.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 12 Mar 2015 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 10 years and 107 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.