GNU bug report logs -
#31115
26.1; python shell flicker
Previous Next
Reported by: charles <at> aurox.ch (Charles A. Roelli)
Date: Mon, 9 Apr 2018 18:20:01 UTC
Severity: minor
Tags: confirmed
Found in version 26.1
Fixed in version 29.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
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 31115 in the body.
You can then email your comments to 31115 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#31115
; Package
emacs
.
(Mon, 09 Apr 2018 18:20:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
charles <at> aurox.ch (Charles A. Roelli)
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Mon, 09 Apr 2018 18:20:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
emacs -q
M-x run-python RET C-x o
Now press and hold down RET: a lot of prompts fly by, and as soon as
point reaches the bottom of the window, there is some flicker where
the cursor momentarily appears centered (as if `recenter' was run) and
simultaneously all the text in the buffer blinks as if the whole
screen was cleared and redrawn. In contrast, if you try this same
recipe in a normal shell buffer from M-x shell, there won't be any
flicker.
Obviously, the above recipe is not a standard use case for a shell
buffer, but the same flicker is observed during normal use too.
A naive fix is to comment out the meat of python-comint-postoutput-
scroll-to-bottom, and reevaluate it:
(defun python-comint-postoutput-scroll-to-bottom (output)
"Faster version of `comint-postoutput-scroll-to-bottom'.
Avoids `recenter' calls until OUTPUT is completely sent."
;; (when (and (not (string= "" output))
;; (python-shell-comint-end-of-output-p
;; (ansi-color-filter-apply output)))
;; (comint-postoutput-scroll-to-bottom output))
output)
I have no idea why that works, but it seems to help. The function in
question was added in the following commit:
commit a6dc66a5441bc6832c12d362edd2d886edc1612a
Author: Fabián Ezequiel Gallina <fgallina <at> gnu.org>
Date: Sat Jul 26 23:02:38 2014 -0300
Faster comint output.
* lisp/progmodes/python.el:
(python-comint-output-filter-function): Make obsolete.
(python-comint-postoutput-scroll-to-bottom): New function.
(inferior-python-mode): Set comint-output-filter-functions to a
minimum.
Fixes: debbugs:16875
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#31115
; Package
emacs
.
(Thu, 12 Apr 2018 06:21:01 GMT)
Full text and
rfc822 format available.
Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):
On 09.04.2018 20:19, Charles A. Roelli wrote:
> emacs -q
> M-x run-python RET C-x o
>
> Now press and hold down RET: a lot of prompts fly by, and as soon as
> point reaches the bottom of the window, there is some flicker where
> the cursor momentarily appears centered (as if `recenter' was run) and
> simultaneously all the text in the buffer blinks as if the whole
> screen was cleared and redrawn. In contrast, if you try this same
> recipe in a normal shell buffer from M-x shell, there won't be any
> flicker.
>
> Obviously, the above recipe is not a standard use case for a shell
> buffer, but the same flicker is observed during normal use too.
>
> A naive fix is to comment out the meat of python-comint-postoutput-
> scroll-to-bottom, and reevaluate it:
>
> (defun python-comint-postoutput-scroll-to-bottom (output)
> "Faster version of `comint-postoutput-scroll-to-bottom'.
> Avoids `recenter' calls until OUTPUT is completely sent."
> ;; (when (and (not (string= "" output))
> ;; (python-shell-comint-end-of-output-p
> ;; (ansi-color-filter-apply output)))
> ;; (comint-postoutput-scroll-to-bottom output))
> output)
>
> I have no idea why that works, but it seems to help. The function in
> question was added in the following commit:
>
> commit a6dc66a5441bc6832c12d362edd2d886edc1612a
> Author: Fabián Ezequiel Gallina <fgallina <at> gnu.org>
> Date: Sat Jul 26 23:02:38 2014 -0300
>
> Faster comint output.
>
> * lisp/progmodes/python.el:
> (python-comint-output-filter-function): Make obsolete.
> (python-comint-postoutput-scroll-to-bottom): New function.
> (inferior-python-mode): Set comint-output-filter-functions to a
> minimum.
>
> Fixes: debbugs:16875
>
>
>
Can't reproduce with GNU Emacs 26.1 (build 1, i686-pc-linux-gnu, GTK+
Version 3.14.5) of 2018-04-10 at Debian
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#31115
; Package
emacs
.
(Sat, 14 Apr 2018 14:43:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 31115 <at> debbugs.gnu.org (full text, mbox):
severity 31115 minor
tags 31115 + confirmed
quit
Andreas Röhler <andreas.roehler <at> easy-emacs.de> writes:
> On 09.04.2018 20:19, Charles A. Roelli wrote:
>> emacs -q
>> M-x run-python RET C-x o
>>
>> Now press and hold down RET: a lot of prompts fly by, and as soon as
>> point reaches the bottom of the window, there is some flicker where
>> the cursor momentarily appears centered (as if `recenter' was run) and
>> simultaneously all the text in the buffer blinks as if the whole
>> screen was cleared and redrawn. In contrast, if you try this same
>> recipe in a normal shell buffer from M-x shell, there won't be any
>> flicker.
> Can't reproduce with GNU Emacs 26.1 (build 1, i686-pc-linux-gnu, GTK+
> Version 3.14.5) of 2018-04-10 at Debian
I can reproduce on Emacs 26, both lucid and GTK builds. Seems pretty
straightforward: point reaches the end of buffer, so Emacs autoscrolls
by half a window, then python-comint-postoutput-scroll-to-bottom kicks
in and scrolls back to the bottom.
>> A naive fix is to comment out the meat of python-comint-postoutput-
>> scroll-to-bottom, and reevaluate it:
>>
>> (defun python-comint-postoutput-scroll-to-bottom (output)
>> "Faster version of `comint-postoutput-scroll-to-bottom'.
>> Avoids `recenter' calls until OUTPUT is completely sent."
>> ;; (when (and (not (string= "" output))
>> ;; (python-shell-comint-end-of-output-p
>> ;; (ansi-color-filter-apply output)))
>> ;; (comint-postoutput-scroll-to-bottom output))
>> output)
Right, that help because Emacs no longer scrolls the window back to the
bottom. Seems like (setq scroll-conservatively 1) works better to
preserve the original behaviour (I feel like that's too easy, so I must
be missing something though).
Severity set to 'minor' from 'normal'
Request was from
Noam Postavsky <npostavs <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Sat, 14 Apr 2018 14:43:02 GMT)
Full text and
rfc822 format available.
Added tag(s) confirmed.
Request was from
Noam Postavsky <npostavs <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Sat, 14 Apr 2018 14:43:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#31115
; Package
emacs
.
(Sat, 07 May 2022 11:57:02 GMT)
Full text and
rfc822 format available.
Message #18 received at 31115 <at> debbugs.gnu.org (full text, mbox):
Noam Postavsky <npostavs <at> gmail.com> writes:
> Right, that help because Emacs no longer scrolls the window back to the
> bottom. Seems like (setq scroll-conservatively 1) works better to
> preserve the original behaviour (I feel like that's too easy, so I must
> be missing something though).
Seems to work perfectly, so I've now done this in Emacs 29.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
bug marked as fixed in version 29.1, send any further explanations to
31115 <at> debbugs.gnu.org and charles <at> aurox.ch (Charles A. Roelli)
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Sat, 07 May 2022 11:57:02 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
.
(Sun, 05 Jun 2022 11:24:06 GMT)
Full text and
rfc822 format available.
This bug report was last modified 3 years and 17 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.