Juanma Barranquero <lekktu <at> gmail.com>
to control <at> emacsbugs.donarmstrong.com.
Full text available.
Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: ***
X-Spam-Status: No, score=3.1 required=4.0 tests=FOURLA,ONEWORD autolearn=no
version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 140) by emacsbugs.donarmstrong.com; 14 Apr 2008 22:13:53 +0000
Received: from pruche.dit.umontreal.ca (pruche.dit.umontreal.ca [132.204.246.22])
by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m3EMDkLu030633
for <140 <at> emacsbugs.donarmstrong.com>; Mon, 14 Apr 2008 15:13:48 -0700
Received: from ceviche.home (vpn-132-204-232-23.acd.umontreal.ca [132.204.232.23])
by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id m3EMDsib000805
for <140 <at> emacsbugs.donarmstrong.com>; Mon, 14 Apr 2008 18:13:55 -0400
Received: by ceviche.home (Postfix, from userid 20848)
id 38898B4055; Mon, 14 Apr 2008 18:13:08 -0400 (EDT)
Resent-Message-ID: <jwvprssm6ff.fsf-monnier+emacs <at> gnu.org>
Resent-To: 140 <at> debbugs.gnu.org
Resent-From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Resent-Date: Mon, 14 Apr 2008 18:13:08 -0400
X-Original-To: monnier <at> iro.umontreal.ca
Received: from pinpin.iro.umontreal.ca (pinpin.iro.umontreal.ca [132.204.24.52])
by mercure.iro.umontreal.ca (Postfix) with ESMTP id 997272CFBA5
for <monnier <at> iro.umontreal.ca>; Mon, 14 Apr 2008 07:06:13 -0400 (EDT)
Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.173])
by pinpin.iro.umontreal.ca (Postfix) with ESMTP id 213413B8AA7
for <monnier <at> iro.umontreal.ca>; Mon, 14 Apr 2008 07:06:08 -0400 (EDT)
Received: by wf-out-1314.google.com with SMTP id 28so1623379wff.20
for <monnier <at> iro.umontreal.ca>; Mon, 14 Apr 2008 04:06:08 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=googlemail.com; s=gamma;
h=domainkey-signature:received:received:message-id:date:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding:from;
bh=Xj0SCUv/ms9ZBdcZy97fplUYllL1kS8tMp6us+N/L4U=;
b=AFOgaJP6TELSSdnJl6On9MClUxhkSTSRiD4e8cme5qOMriQExcUiwZWNdaGylLuqz7P52PVIcWocin/6t/LR7WAlME9Ixn7nsYyghFUeUmHd99NXcdnNILdOsPjMNfs2vKjQ639UrF6ZJ5I7xbUtkcjyu9i6clKEohuFWkI4XrU=
DomainKey-Signature: a=rsa-sha1; c=nofws;
d=googlemail.com; s=gamma;
h=message-id:date:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding:from;
b=M8duUGYQwlMI0bZO0v+D7nDAOrEx8DrWogVqoRChVktlqNV0AiQVPI362ksv84QohP3pzpR1xrdrlfj8FYwAD2M3poBPa25Zcfr4dVaJbGI6kcWcgcwe+mDnGah+FEQ9Yxj/3NJqewy/Ri8T5yfd2YRm2NKTQr6DCwXyN7yE0jw=
Received: by 10.142.71.9 with SMTP id t9mr878566wfa.246.1208171168207;
Mon, 14 Apr 2008 04:06:08 -0700 (PDT)
Received: from tun0.core.adl.rsp.com.au ( [203.0.153.46])
by mx.google.com with ESMTPS id 30sm11557523wff.11.2008.04.14.04.06.04
(version=TLSv1/SSLv3 cipher=RC4-MD5);
Mon, 14 Apr 2008 04:06:06 -0700 (PDT)
Message-ID: <48033A97.8050208 <at> gmail.com>
Date: Mon, 14 Apr 2008 23:05:59 +1200
User-Agent: Thunderbird 2.0.0.12 (Macintosh/20080213)
MIME-Version: 1.0
To: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
CC: emacs-devel <at> gnu.org
Subject: Re: python-try-complete
References: <47F62CE4.7070903 <at> gmail.com> <jwvr6dcwa9q.fsf-monnier+emacs <at> gnu.org> <4800885A.1090402 <at> gmail.com>
In-Reply-To: <4800885A.1090402 <at> gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
From: Julian Scheid <julians37 <at> googlemail.com>
X-DIRO-MailScanner-Information: Please contact the ISP for more information
X-DIRO-MailScanner: Found to be clean
X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel,
SpamAssassin (score=-2.313, requis 5, BAYES_00 -2.60,
MC_COPYWRT 0.11, MC_TRANSFR 0.11, RCVD_BY_IP 0.07,
SPF_HELO_PASS -0.00)
X-DIRO-MailScanner-From: julians37 <at> googlemail.com
X-NAI-Spam-Score: 0
X-NAI-Spam-Rules: 0 Rules triggered
> Did you have any thoughts about the second problem I described in the
> same mail - python-try-complete locking up when used in a remote buffer?
> To quote from my previous mail,
>
> Either python-try-complete should refrain from launching the process
> remotely by looking at (file-remote-p default-directory), or the
> scripts it launches need to be prepared (e.g. in terms of quoting) for
> being run remotely via ssh.
I had a chance to narrow it down a bit more. Here is the stack trace I
get when I quit while python-try-complete blocks:
Debugger entered--Lisp error: (quit)
accept-process-output(#<process Python> 5)
python-send-receive("import emacs; print '_emacs_out ()'")
run-python(nil t)
python-proc()
python-send-string("emacs.complete(\"exitCode\",\"import os\\nimport
logging\\nimport Queue\\nimport threading\\n\")")
python-send-receive("emacs.complete(\"exitCode\",\"import os\\nimport
logging\\nimport Queue\\nimport threading\\n\")")
byte-code("..." [symbol python-imports read-from-string
python-send-receive format "emacs.complete(%S,%s)"] 6)
python-symbol-completions("exitCode")
(and symbol (python-symbol-completions symbol))
(setq he-expand-list (and symbol (python-symbol-completions symbol)))
(let ((symbol ...)) (he-init-string (- ... ...) (point)) (if (not
...) (push he-search-string he-tried-table)) (setq he-expand-list (and
symbol ...)))
(if old nil (let (...) (he-init-string ... ...) (if ... ...) (setq
he-expand-list ...)))
(unless old (let (...) (he-init-string ... ...) (if ... ...) (setq
he-expand-list ...)))
(progn (unless old (let ... ... ... ...)) (while (and he-expand-list
...) (pop he-expand-list)) (if he-expand-list (progn ... t) (if old ...)
nil))
(if (derived-mode-p (quote python-mode)) (progn (unless old ...)
(while ... ...) (if he-expand-list ... ... nil)))
(when (derived-mode-p (quote python-mode)) (unless old (let ... ...
... ...)) (while (and he-expand-list ...) (pop he-expand-list)) (if
he-expand-list (progn ... t) (if old ...) nil))
python-try-complete(nil)
apply(python-try-complete nil)
hippie-expand(nil)
call-interactively(hippie-expand)
And in *Python* I have:
Python 2.3.4 (#1, Feb 2 2005, 12:11:53)
[GCC 3.4.2 20041017 (Red Hat 3.4.2-6.fc3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> Traceback (most recent call last):
File "<stdin>", line 1, in ?
ImportError: No module named emacs
>>>
Now the interesting thing with the second line of this output is that my
Emacs is running on top of OS X; Linux is running on the box on which
the Python file lives that I've opened using Tramp (that was visited
when I ran hippie-expand.)
So apparently Python gets run remotely (by the magic of Tramp?) but the
"emacs" package which I suspect python-mode uses for helping with
completion isn't available on the remote host; thus the whole completion
attempt fails, but instead of gracefully failing python-try-complete
sits there indefinitely.
There seem to be two problems here:
1) Proper exception and/or exit code handling is missing which would
allow the Python script to exit with an error without locking up Emacs.
2) Either the external Python process should be forced to run locally
even if the file is remote; or python-try-complete should refrain from
launching a Python process at all if the file is remote; or
python-try-complete should be prepared for its external process to run
remotely and set up its environment properly (by uploading the emacs
module and setting PYTHONPATH accordingly.)
As I said earlier I don't use python-try-complete anymore but FWIW
simply not running Python when file-remote-p looks to me to be the best
option.
I'm using Emacs 22.1.2 and tramp 2.1.13.
Hope this helps,
Julian
Julian Scheid <julians37 <at> googlemail.com>:Emacs Bugs <bug-gnu-emacs <at> gnu.org>.
Full text available.bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:bug#140; Package emacs.
Full text available.
Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: ***
X-Spam-Status: No, score=3.0 required=4.0 tests=ONEWORD autolearn=no
version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 14 Apr 2008 20:08:20 +0000
Received: from ironport2-out.teksavvy.com (ironport2-out.pppoe.ca [206.248.154.182])
by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m3EK8D7g029630
for <submit <at> emacsbugs.donarmstrong.com>; Mon, 14 Apr 2008 13:08:14 -0700
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: Al4FAENWA0hMCqsI/2dsb2JhbACBXpB0lFeEFA
X-IronPort-AV: E=Sophos;i="4.25,656,1199682000";
d="scan'208";a="18493495"
Received: from smtp.pppoe.ca (HELO smtp.teksavvy.com) ([65.39.196.238])
by ironport2-out.teksavvy.com with ESMTP; 14 Apr 2008 16:08:07 -0400
Received: from pastel.home ([76.10.171.8])
by smtp.teksavvy.com (Internet Mail Server v1.0) with ESMTP id UYW46907
for <submit <at> emacsbugs.donarmstrong.com>; Mon, 14 Apr 2008 16:08:07 -0400
Received: by pastel.home (Postfix, from userid 20848)
id 46F147F3C; Mon, 14 Apr 2008 16:08:07 -0400 (EDT)
Resent-Message-ID: <jwvy77gi4ig.fsf-monnier+emacs <at> gnu.org>
Resent-To: submit <at> debbugs.gnu.org
Resent-From: Stefan Monnier <monnier <at> iro.umontreal.ca>
Resent-Date: Mon, 14 Apr 2008 16:08:07 -0400
X-Original-To: monnier <at> iro.umontreal.ca
Received: from pinpin.iro.umontreal.ca (pinpin.iro.umontreal.ca [132.204.24.52])
by mercure.iro.umontreal.ca (Postfix) with ESMTP id 8DF422FE9D2
for <monnier <at> iro.umontreal.ca>; Sat, 12 Apr 2008 06:01:53 -0400 (EDT)
Received: from lists.gnu.org (lists.gnu.org [199.232.76.165])
by pinpin.iro.umontreal.ca (Postfix) with ESMTP id BEC8E3B8B43
for <monnier <at> iro.umontreal.ca>; Sat, 12 Apr 2008 06:01:48 -0400 (EDT)
Received: from localhost ([127.0.0.1] helo=lists.gnu.org)
by lists.gnu.org with esmtp (Exim 4.43)
id 1JkcYO-0003gz-KG
for monnier <at> iro.umontreal.ca; Sat, 12 Apr 2008 06:01:48 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
id 1JkcY1-0003f0-4f
for emacs-devel <at> gnu.org; Sat, 12 Apr 2008 06:01:25 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
id 1JkcXy-0003d1-2H
for emacs-devel <at> gnu.org; Sat, 12 Apr 2008 06:01:23 -0400
Received: from [199.232.76.173] (helo=monty-python.gnu.org)
by lists.gnu.org with esmtp (Exim 4.43) id 1JkcXx-0003cr-RJ
for emacs-devel <at> gnu.org; Sat, 12 Apr 2008 06:01:21 -0400
Received: from wa-out-1112.google.com ([209.85.146.180])
by monty-python.gnu.org with esmtp (Exim 4.60)
(envelope-from <julians37 <at> googlemail.com>) id 1JkcXx-0003IC-Nj
for emacs-devel <at> gnu.org; Sat, 12 Apr 2008 06:01:21 -0400
Received: by wa-out-1112.google.com with SMTP id k34so814704wah.10
for <emacs-devel <at> gnu.org>; Sat, 12 Apr 2008 03:01:17 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=googlemail.com; s=gamma;
h=domainkey-signature:received:received:message-id:date:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding:from;
bh=+a7TSstHS81bs1x/t2bn648f5fayLicW4sSKE3Dfjio=;
b=YIvlj1hVDYVZRKYmcHm1Nsc5X7ElF3Frqy4+j/mVhbvCwiMccnkI0Oo+fcffjgbb70PhZYaMhQzSFviCA4F1YAxdLyu867yn/tnH3gksMVWT5Dd1ERHukNi1hHHPswh09XxtcGWgwx3UYWvR7MNCURNoKo0NvM4mUhSBLELQlMo=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma;
h=message-id:date:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding:from;
b=WnQQV55bkltM28WwQ3xlqIaXbQsqLIYe6+wdvpB7E8biVw/NsYELftCZ4qyZkzMn3EgTIr7wlfqcEUkWk12W2poruFtmY7L2u0AX1PeH1KK/xlKRgvgRlt8Wm5s7cbyvsASJy6O3QU8lDamaFLDfJiptXylf1+YYCl9cNoSsVXk=
Received: by 10.141.163.12 with SMTP id q12mr2114409rvo.190.1207994477950;
Sat, 12 Apr 2008 03:01:17 -0700 (PDT)
Received: from ?192.168.1.3? ( [210.86.66.147])
by mx.google.com with ESMTPS id l31sm6240011rvb.2.2008.04.12.03.01.15
(version=TLSv1/SSLv3 cipher=RC4-MD5);
Sat, 12 Apr 2008 03:01:17 -0700 (PDT)
Message-ID: <4800885A.1090402 <at> gmail.com>
Date: Sat, 12 Apr 2008 22:00:58 +1200
User-Agent: Thunderbird 2.0.0.12 (Macintosh/20080213)
MIME-Version: 1.0
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
References: <47F62CE4.7070903 <at> gmail.com>
<jwvr6dcwa9q.fsf-monnier+emacs <at> gnu.org>
In-Reply-To: <jwvr6dcwa9q.fsf-monnier+emacs <at> gnu.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
From: Julian Scheid <julians37 <at> googlemail.com>
X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2)
Cc: emacs-devel <at> gnu.org
Subject: Re: python-try-complete
X-BeenThere: emacs-devel <at> gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "Emacs development discussions." <emacs-devel.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/emacs-devel>,
<mailto:emacs-devel-request <at> gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/emacs-devel>
List-Post: <mailto:emacs-devel <at> gnu.org>
List-Help: <mailto:emacs-devel-request <at> gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/emacs-devel>,
<mailto:emacs-devel-request <at> gnu.org?subject=subscribe>
X-Mailman-Copy: yes
Sender: emacs-devel-bounces+monnier=iro.umontreal.ca <at> gnu.org
Errors-To: emacs-devel-bounces+monnier=iro.umontreal.ca <at> gnu.org
X-DIRO-MailScanner-Information: Please contact the ISP for more information
X-DIRO-MailScanner: Found to be clean
X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel,
SpamAssassin (score=-1.873, requis 5, BAYES_00 -2.60,
RCVD_BY_IP 0.07, RECEIVED_FROM_NOUNK 0.66, SPF_HELO_PASS -0.00)
X-DIRO-MailScanner-From: emacs-devel-bounces+monnier=iro.umontreal.ca <at> gnu.org
>> I take issue with one of its design decisions however: sneaking in
>> python-try-complete into hippie-expand-try-functions-list.
>
> Agreed, it should be fixed on the EMACS_22_BASE branch now,
Thanks for that, Stefan.
Did you have any thoughts about the second problem I described in the
same mail - python-try-complete locking up when used in a remote buffer?
To quote from my previous mail,
Either python-try-complete should refrain from launching the process
remotely by looking at (file-remote-p default-directory), or the
scripts it launches need to be prepared (e.g. in terms of quoting) for
being run remotely via ssh.
I am not using python-try-complete anymore but this is a bug and I would
be happy to help fix it.
Julian
Julian Scheid <julians37 <at> googlemail.com>:Emacs Bugs <bug-gnu-emacs <at> gnu.org>.
Full text available.bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:bug#140; Package emacs.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.