[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: OS X python.el completion issue
From: |
Steven Huwig |
Subject: |
Re: OS X python.el completion issue |
Date: |
Mon, 28 Mar 2005 21:15:41 -0500 |
On Mar 28, 2005, at 1:28 PM, Stefan Monnier wrote:
I installed a slightly different patch (halfway between yours and
mine).
Can you try it?
Almost there, just that compare-strings seems to have confusing
semantics.
This patch against the latest CVS works for me.
--- lisp/progmodes/python.el 28 Mar 2005 14:36:24 -0000 1.26
+++ lisp/progmodes/python.el 29 Mar 2005 02:13:57 -0000
@@ -1126,9 +1126,9 @@
"")
((string-match ".*\n" s)
s)
- ((or (eq t (compare-strings s nil nil "_emacs_ok\n" nil (length
s)))
- (eq t (compare-strings s nil nil "_emacs_out " nil
- (min (length "_emacs_out ") (length
s)))))
+ ((let ((end (min (length "_emacs_out ") (length s))))
+ (or (eq t (compare-strings s nil nil "_emacs_ok\n" nil (length
s)))
+ (eq t (compare-strings s nil end "_emacs_out " nil end))))
(setq python-preoutput-leftover s)
"")
(t s)))
Your code special-cased the case when the emacs_out line is cut, but
what is
really happenning is that we may receive Python's output in chunks of
arbitrary sizes: from one-byte at a time to several lines at a time
(depending on many different factors), so the problem exists for all
kinds
of output.
I love it when a plan comes together. :)
Thanks,
Steven Huwig
- Re: Suggestion for python.el and emacs.py, (continued)
- Re: Suggestion for python.el and emacs.py, Stefan Monnier, 2005/03/26
- OS X python.el completion issue (was Re: Suggestion for python.el and emacs.py), Steven Huwig, 2005/03/26
- Re: OS X python.el completion issue (was Re: Suggestion for python.el and emacs.py), Steven Huwig, 2005/03/26
- Re: OS X python.el completion issue, Stefan Monnier, 2005/03/26
- Re: OS X python.el completion issue, Steven Huwig, 2005/03/26
- Re: OS X python.el completion issue, Stefan Monnier, 2005/03/26
- Re: OS X python.el completion issue, Steven Huwig, 2005/03/27
- Re: OS X python.el completion issue, Stefan Monnier, 2005/03/27
- Re: OS X python.el completion issue, Steven Huwig, 2005/03/27
- Re: OS X python.el completion issue, Stefan Monnier, 2005/03/28
- Re: OS X python.el completion issue,
Steven Huwig <=
- Re: OS X python.el completion issue, Stefan Monnier, 2005/03/29