GNU bug report logs -
#32390
[ipython 6.x] unmatched quotes break fontification in python.el (superseded by #33959)
Previous Next
Reported by: Carlos Pita <carlosjosepita <at> gmail.com>
Date: Tue, 7 Aug 2018 18:50:02 UTC
Severity: minor
Tags: confirmed, fixed, patch
Found in version 26.1
Fixed in version 27.1
Done: Noam Postavsky <npostavs <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Carlos Pita <carlosjosepita <at> gmail.com> writes:
> Why not simply:
>
> (python-shell-comint-end-of-output-p
> (ansi-color-filter-apply output)))
>
> ?
>
> What is the problem when just an input prompt is retrieved (that is,
> the 0 case in (nil 0))?
I guess that's the "not just a prompt" in the comment:
;; Is end of output and is not just a prompt.
But it seems that python.el is assuming a certain chunking of output
from the subprocess, which is really not a safe assumptiong. And
ipython 6 breaks it.
> The current condition is also failing for multiline input. Consider:
>
>
> In [154]: def f():
> ...: 'ewewe
> ...:
>
> output is " ...:" so it's not considered just an input prompt
> (because of the preceding whitespace) and so the font lock buffer is
> wrongly cleaned up (indeed, this is the only case I'm able to figure
> out for which you don't want to cleanup the buffer).
>
> I think the condition should be reformulated to match any expression
> that ends with an input prompt excluding a continuation prompt. This
> would fix both problems:
>
> 1. An expression that is just an input prompt (for example, ansi
> filtered errors) will trigger a cleanup.
> 2. A continuation input prompt will not be considered the start of
> a new input.
This sounds quite sensible to me.
This bug report was last modified 5 years and 221 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.