GNU bug report logs -
#5391
python.el: reuse (sometimes) Python comint buffer
Previous Next
Reported by: Bojan Nikolic <bojan <at> bnikolic.co.uk>
Date: Fri, 15 Jan 2010 18:03:01 UTC
Severity: wishlist
Tags: patch
Fixed in version 24.2
Done: Fabián Ezequiel Gallina <fabian <at> anue.biz>
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 5391 in the body.
You can then email your comments to 5391 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Message #1 received at quiet <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Package: emacs,python
Severity: wishlist
Tags: patch
[ resent from
http://lists.gnu.org/archive/html/emacs-devel/2009-12/msg00188.html ]
Hello,
The run-python function in Emacs 22 python.el used to reuse comint
buffers, which I found very useful. The attached patch I think gets
back close to this behaviour, i.e.:
If buffer python-buffer is live and "new" hasn't been specified that
buffer is reused and the new comint process is started
there. Otherwise it is started in a newly created buffer.
Hope it is useful for others and/or suitable for applying to trunk.
Best,
Bojan
[python-el-1.patch (text/x-diff, inline)]
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -1562,7 +1562,10 @@
;; Suppress use of pager for help output:
(process-connection-type nil))
(apply 'make-comint-in-buffer "Python"
- (generate-new-buffer "*Python*")
+ (if (and (buffer-live-p python-buffer)
+ (not new))
+ python-buffer
+ (generate-new-buffer "*Python*"))
(car cmdlist) nil (cdr cmdlist)))
(setq-default python-buffer (current-buffer))
(setq python-buffer (current-buffer))
[Message part 3 (text/plain, inline)]
--
Bojan Nikolic || http://www.bnikolic.co.uk
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#5391
; Package
emacs
.
(Tue, 10 Apr 2012 23:44:02 GMT)
Full text and
rfc822 format available.
Message #4 received at 5391 <at> debbugs.gnu.org (full text, mbox):
Bojan Nikolic <bojan <at> bnikolic.co.uk> writes:
> The run-python function in Emacs 22 python.el used to reuse comint
> buffers, which I found very useful. The attached patch I think gets
> back close to this behaviour, i.e.:
>
> If buffer python-buffer is live and "new" hasn't been specified that
> buffer is reused and the new comint process is started
> there. Otherwise it is started in a newly created buffer.
[...]
> - (generate-new-buffer "*Python*")
> + (if (and (buffer-live-p python-buffer)
> + (not new))
> + python-buffer
> + (generate-new-buffer "*Python*"))
Looking at the code, this seems to have changed:
(apply 'make-comint-in-buffer "Python"
(generate-new-buffer "*Python*")
(car cmdlist) nil (cdr cmdlist)))
Is this patch still relevant?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#5391
; Package
emacs
.
(Sun, 15 Apr 2012 19:24:01 GMT)
Full text and
rfc822 format available.
Message #7 received at 5391 <at> debbugs.gnu.org (full text, mbox):
Hi Lars,
Lars Magne Ingebrigtsen <larsi <at> gnus.org> writes:
> Is this patch still relevant?
Yes, a patch something like I sent is still required.... If you'd like
to install it, let me know and I will update my patch for the new code.
Best,
Bojan
--
Bojan Nikolic || http://www.bnikolic.co.uk
bug marked as fixed in version 24.2, send any further explanations to
5391 <at> debbugs.gnu.org and Bojan Nikolic <bojan <at> bnikolic.co.uk>
Request was from
Fabián Ezequiel Gallina <fabian <at> anue.biz>
to
control <at> debbugs.gnu.org
.
(Tue, 17 Jul 2012 14:14:01 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 15 Aug 2012 11:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 12 years and 311 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.