GNU bug report logs - #24322
25.1.50; Python completion should not strip trailing space

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: minor; Reported by: Dan Davison <dandavison7@HIDDEN>; Keywords: confirmed; dated Sat, 27 Aug 2016 21:11:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Severity set to 'minor' from 'normal' Request was from npostavs@HIDDEN to control <at> debbugs.gnu.org. Full text available.
Added tag(s) confirmed. Request was from npostavs@HIDDEN to control <at> debbugs.gnu.org. Full text available.

Message received at 24322 <at> debbugs.gnu.org:


Received: (at 24322) by debbugs.gnu.org; 3 Jul 2017 22:00:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jul 03 18:00:45 2017
Received: from localhost ([127.0.0.1]:50880 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1dS9Of-0005aR-Cg
	for submit <at> debbugs.gnu.org; Mon, 03 Jul 2017 18:00:45 -0400
Received: from mail-it0-f66.google.com ([209.85.214.66]:36260)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <npostavs@HIDDEN>)
 id 1dS9Od-0005a9-Gx; Mon, 03 Jul 2017 18:00:43 -0400
Received: by mail-it0-f66.google.com with SMTP id k3so9215742ita.3;
 Mon, 03 Jul 2017 15:00:43 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version;
 bh=vZSEFiSEi+0u3yXXOShQNg7b7307jeAug7/acbMKDxA=;
 b=ckuCYG2AfZUMl1pPzTtWBpHx8WDUMDJRFE1PpM1vKFi37BbUCM3mR3zvRYMmlj8tbl
 G8RuG31+gOF30a4N+zS3fBGzU/yuowZ5ZvAaucahQBLEEY15S20kapo1PWQwhjVCwf2D
 fbpqrWuPzsPzhSyOCordlUTJShb3DeNjLDK5DFKQYZ04bhNXCxtPCeuNyr0J/CJEBy35
 5JR+A7+toB7qUfAvc8GqM1RgqfvXe57prbE1g052Mixmp6bZZp9+fzeGtBNZ5wKPUKq9
 YZpQ/yobBhl5vWXsXJ+iPevu/SaRZ9OTZDMVSBYXqTlpKp4JcoWcVEb3hQpBTTFeihaS
 4Uew==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:from:to:cc:subject:references:date
 :in-reply-to:message-id:user-agent:mime-version;
 bh=vZSEFiSEi+0u3yXXOShQNg7b7307jeAug7/acbMKDxA=;
 b=pfMrZh7ijxEayHQJZST9fUW3xWX6zkQiUFZ5of7tkUl2HFaplHAdbCD7YvkVr0EK05
 zIKkn3/z5jjvQlHAGkNQMd7O83oRBjBOz2X0SMdSmZDf/nVVH7ra9ZAIpl5kb0d/DdwD
 RpJ0wXegcmtV5za4Wb7JpS8m70vK3Rrl8JnVzt7S7fAXFiRdMaO/Ih3Mgj9CrZuv30Vw
 vvUM0wT9QUbIzew0X8PYGaI3Y8ld+gPHbVWRWe9lZhpe+/kNqek+CYLB0UZ9TpUD24ap
 Y6ceC+gQSMipRfwh5QY85ZoYFsqxyauDyj4hkRYaxR9k8NYVonqaqLvDMTOTU+UCVedx
 NjeA==
X-Gm-Message-State: AIVw110KKMwg4EQNGLHHFEbPjUIdHlSJCmXZDPnXBsQck9+GJm/Yol0Z
 oMnsrzYBO/7vPfN4
X-Received: by 10.36.19.5 with SMTP id 5mr10930507itz.65.1499119237602;
 Mon, 03 Jul 2017 15:00:37 -0700 (PDT)
Received: from zony ([45.2.7.65])
 by smtp.googlemail.com with ESMTPSA id b14sm3366827itb.18.2017.07.03.15.00.36
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Mon, 03 Jul 2017 15:00:36 -0700 (PDT)
From: npostavs@HIDDEN
To: Dan Davison <dandavison7@HIDDEN>
Subject: Re: bug#24322: [PATCH] Re: 25.1.50;
 Python completion should not strip trailing space
References: <CA+QSd75F30b_FCjRvF8D1FpjcWxcymbMxJ+oGETGu1bG6ETWPg@HIDDEN>
 <CA+QSd754kG9tMywu5tpntOwD5wCz2R0hnKSV2NmK-ABVVy3ewg@HIDDEN>
 <CA+QSd75c1SyJxVxETunn_5O4vh7oqKLKOoReiSkUaoh7zSDyNg@HIDDEN>
 <CA+QSd74+khgOV+s5FWp5tQzR8WFnF9YAm6LWjVhh5W5Y6uZ6mw@HIDDEN>
Date: Mon, 03 Jul 2017 18:02:13 -0400
In-Reply-To: <CA+QSd74+khgOV+s5FWp5tQzR8WFnF9YAm6LWjVhh5W5Y6uZ6mw@HIDDEN> (Dan
 Davison's message of "Sat, 27 Aug 2016 22:58:25 +0000")
Message-ID: <87lgo5i3h6.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.7 (/)
X-Debbugs-Envelope-To: 24322
Cc: 24322 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.7 (/)

tags 24322 + confirmed
severity 24322 minor
quit

Sorry it took so long for someone to reach this report.

Dan Davison <dandavison7@HIDDEN> writes:

>>>> From emacs -Q:
>>>>
>>>> (setq python-shell-interpreter "ipython"
>>>>       python-shell-interpreter-args "-i")

Using plain "python" shows the behaviour you describe.  I can't really
get ipython working properly unless I add --simple-prompt to
python-shell-interpreter-args, and then it seems that ipython itself
prints the completions without a space.

I'm using ipython 5.1.0, I think I've read in some other bug that the
--simple-prompt started being necessary from version 5.x.

> The patch currently only fixes "native" (readline-based) completion. If it
> is agreed that this is the correct direction I can prepare a similar patch
> for the non-native / legacy completion function
> `python-shell-completion-get-completions', which shows the same behavior.

Yes please!





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#24322; Package emacs. Full text available.

Message received at 24322 <at> debbugs.gnu.org:


Received: (at 24322) by debbugs.gnu.org; 27 Aug 2016 22:58:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Aug 27 18:58:44 2016
Received: from localhost ([127.0.0.1]:42273 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1bdmYm-0004on-1c
	for submit <at> debbugs.gnu.org; Sat, 27 Aug 2016 18:58:44 -0400
Received: from mail-it0-f52.google.com ([209.85.214.52]:35290)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dandavison7@HIDDEN>) id 1bdmYj-0004oW-Rn
 for 24322 <at> debbugs.gnu.org; Sat, 27 Aug 2016 18:58:42 -0400
Received: by mail-it0-f52.google.com with SMTP id x131so50457273ite.0
 for <24322 <at> debbugs.gnu.org>; Sat, 27 Aug 2016 15:58:41 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to;
 bh=PGDcl3f1zcEiLJaxCA8elDx3LHfT0yz7Nw5CCkrxVxY=;
 b=oqQmXfRF4QoSCODMpuBpDi5V1x0Et4gHxs5VEreQCpBwgGkctKb8yLDz9boEwehvKQ
 cOc5SvwvMA1zaDq2wTO9tN5ds3KRMgxfCgih3q02O7lFImhGMILJxcbbNhWwq29n1sEt
 cGeVRLufwbO6NoWw3pToBmd1EcJGCaH+oyhV/Ww7JM/DsV1uCB9NyRftQCPd6RlOWvA9
 RmI6bm7HYJLbhle+EPrSo2sOaClsC4z/+GzvXrtpRGddgTeCZagzONQLATOayOW3E10F
 dpzDbe6oatAjQxccaUp7u0/uCPeBW3j+eIrfi2bC63pLMgYw7BgDKNvK+N+wR3+8BqNL
 MEHQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to;
 bh=PGDcl3f1zcEiLJaxCA8elDx3LHfT0yz7Nw5CCkrxVxY=;
 b=RXE5zXVWPaxWlIhX6kfLY61myLEPZoRcUTmRzOfkz2vCszFKSuTdc1g20SGRPaNEq4
 XeFpxmq0v5lx0iXhmKyAiOtgsemRKb07OC5iPl1yPls5no+kCR7zG1l3wwL4GEZUkktM
 iOu9+gLgltT+7plUUS4fQm0KrCukRWsyZLz4TCSao+hDuBB1NYr4m4QvL5XrI5W/PZpt
 f0xENMcbUPRcHUGi5fzAdqLagbZtOP4vNMRb6obUD75PqXoIIroImLTOZM5Aq/bjSvN5
 kTuJFr5Lc74ph7T+aIULICU+vjxNY4IbSoaM5+WUBrzp7nv4R0uRbAZYut+tYzFlwEDq
 SBQA==
X-Gm-Message-State: AE9vXwMbZPZ2ZWXsTPNOMSDEd0q57nnm6FLd3g3ZOh6WssFW2CGGgvGrLQ4817n6Qq63AScv7fiOFVqdIoowQg==
X-Received: by 10.36.46.203 with SMTP id i194mr6017045ita.69.1472338716008;
 Sat, 27 Aug 2016 15:58:36 -0700 (PDT)
MIME-Version: 1.0
References: <CA+QSd75F30b_FCjRvF8D1FpjcWxcymbMxJ+oGETGu1bG6ETWPg@HIDDEN>
 <CA+QSd754kG9tMywu5tpntOwD5wCz2R0hnKSV2NmK-ABVVy3ewg@HIDDEN>
 <CA+QSd75c1SyJxVxETunn_5O4vh7oqKLKOoReiSkUaoh7zSDyNg@HIDDEN>
In-Reply-To: <CA+QSd75c1SyJxVxETunn_5O4vh7oqKLKOoReiSkUaoh7zSDyNg@HIDDEN>
From: Dan Davison <dandavison7@HIDDEN>
Date: Sat, 27 Aug 2016 22:58:25 +0000
Message-ID: <CA+QSd74+khgOV+s5FWp5tQzR8WFnF9YAm6LWjVhh5W5Y6uZ6mw@HIDDEN>
Subject: Re: [PATCH] Re: 25.1.50;
 Python completion should not strip trailing space
To: 24322 <at> debbugs.gnu.org
Content-Type: multipart/alternative; boundary=001a114aae5e282572053b159288
X-Spam-Score: -0.5 (/)
X-Debbugs-Envelope-To: 24322
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

--001a114aae5e282572053b159288
Content-Type: text/plain; charset=UTF-8

The patch currently only fixes "native" (readline-based) completion. If it
is agreed that this is the correct direction I can prepare a similar patch
for the non-native / legacy completion function
`python-shell-completion-get-completions', which shows the same behavior.

On Sat, 27 Aug 2016 at 14:47 Dan Davison <dandavison7@HIDDEN> wrote:

> Here is the patch pasted into the body of an email:
>
> From 8e69b33a53ea30389a5e3946dd711320a77e0d23 Mon Sep 17 00:00:00 2001
> From: Dan Davison <dandavison7@HIDDEN>
> Date: Fri, 5 Aug 2016 12:19:20 -0700
> Subject: [PATCH] Don't strip space from python completions
>
> The returned completion deliberately includes a space after a word like
> 'import', which is always followed by more words.
>
> * lisp/progmodes/python.el
> (python-shell-completion-native-get-completions):
> Remove space from regular expression character class
> ---
>  lisp/progmodes/python.el | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
> index ad69f87..8616279 100644
> --- a/lisp/progmodes/python.el
> +++ b/lisp/progmodes/python.el
> @@ -3551,7 +3551,7 @@ completion."
>                   (split-string
>                    (buffer-substring-no-properties
>                     (line-beginning-position) (point-min))
> -                  "[ \f\t\n\r\v()]+" t)
> +                  "[\f\t\n\r\v()]+" t)
>                   :test #'string=))))
>          (set-process-filter process original-filter-fn)))))
>
> --
> 2.3.2 (Apple Git-55)
>
>
> On Sat, 27 Aug 2016 at 14:21 Dan Davison <dandavison7@HIDDEN> wrote:
>
>> Patch attached.
>>
>> This patch is also available as a pull request at at
>> https://github.com/dandavison/emacs/pull/1 The commit hash
>> is 8e69b33a53ea30389a5e3946dd711320a77e0d23.
>>
>> I have only tested this on macOS. As far as I am aware, when the space
>> character is present, it is present deliberately and it is appropriate to
>> retain it, but I would appreciate feedback from python.el experts.
>>
>> On Sat, 27 Aug 2016 at 14:10 Dan Davison <dandavison7@HIDDEN> wrote:
>>
>>> From emacs -Q:
>>>
>>> (setq python-shell-interpreter "ipython"
>>>       python-shell-interpreter-args "-i")
>>>
>>> M-x run-python
>>>
>>> In the python comint buffer insert "from itertools imp" and hit tab.
>>>
>>> You will see "imp" completed as "import" (no trailing space).
>>>
>>> However, if you do this in ipython itself, you will see "imp" completed
>>> as "import ". This (i.e. what ipython does) is the desired behavior
>>> (because import is always followed by another word).
>>>
>>> In GNU Emacs 25.1.50.1 (x86_64-apple-darwin14.5.0, NS appkit-1348.17
>>> Version 10.10.5 (Build 14F27))
>>>  of 2016-04-16 built on hemiprocne
>>> Repository revision: 934549e23d6bda5231375dbfed7b42a966c85d14
>>> Windowing system distributor 'Apple', version 10.3.1348
>>> Configured using:
>>>  'configure --prefix=/usr/local/Cellar/emacs/HEAD
>>>  --enable-locallisppath=/usr/local/share/emacs/site-lisp
>>>  --infodir=/usr/local/Cellar/emacs/HEAD/share/info/emacs --with-xml2
>>>  --without-dbus --without-gnutls --with-ns --disable-ns-self-contained'
>>>
>>> Configured features:
>>> JPEG NOTIFY ACL LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS
>>>
>>> Important settings:
>>>   value of $LANG: en_US.UTF-8
>>>   locale-coding-system: utf-8-unix
>>>
>>> Major mode: Lisp Interaction
>>>
>>> Minor modes in effect:
>>>   tooltip-mode: t
>>>   global-eldoc-mode: t
>>>   electric-indent-mode: t
>>>   mouse-wheel-mode: t
>>>   tool-bar-mode: t
>>>   menu-bar-mode: t
>>>   file-name-shadow-mode: t
>>>   global-font-lock-mode: t
>>>   font-lock-mode: t
>>>   blink-cursor-mode: t
>>>   auto-composition-mode: t
>>>   auto-encryption-mode: t
>>>   auto-compression-mode: t
>>>   line-number-mode: t
>>>   transient-mark-mode: t
>>>
>>> Recent messages:
>>> For information about GNU Emacs and the GNU system, type C-h C-a.
>>>
>>> Load-path shadows:
>>> None found.
>>>
>>> Features:
>>> (shadow sort mail-extr emacsbug message dired dired-loaddefs format-spec
>>> rfc822 mml easymenu mml-sec password-cache epa derived epg epg-config
>>> gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse
>>> rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
>>> ietf-drums mm-util mail-prsvr mail-utils time-date mule-util tooltip
>>> eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel
>>> term/ns-win ns-win ucs-normalize term/common-win tool-bar dnd fontset
>>> image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode
>>> prog-mode register page menu-bar rfn-eshadow timer select scroll-bar
>>> mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame
>>> cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai
>>> tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian
>>> slovak czech european ethiopic indian cyrillic chinese charscript
>>> case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer
>>> cl-preloaded nadvice loaddefs button faces cus-face macroexp files
>>> text-properties overlay sha1 md5 base64 format env code-pages mule
>>> custom widget hashtable-print-readable backquote kqueue cocoa ns
>>> multi-tty make-network-process emacs)
>>>
>>> Memory information:
>>> ((conses 16 195970 9329)
>>>  (symbols 48 19431 0)
>>>  (miscs 40 43 170)
>>>  (strings 32 14792 5110)
>>>  (string-bytes 1 431078)
>>>  (vectors 16 32763)
>>>  (vector-slots 8 640839 4764)
>>>  (floats 8 156 54)
>>>  (intervals 56 194 0)
>>>  (buffers 976 11))
>>>
>>>

--001a114aae5e282572053b159288
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">The patch currently only fixes &quot;native&quot; (readlin=
e-based) completion. If it is agreed that this is the correct direction I c=
an prepare a similar patch for the non-native / legacy completion function =
`python-shell-completion-get-completions&#39;, which shows the same behavio=
r.</div><br><div class=3D"gmail_quote"><div dir=3D"ltr">On Sat, 27 Aug 2016=
 at 14:47 Dan Davison &lt;<a href=3D"mailto:dandavison7@HIDDEN">dandavis=
on7@HIDDEN</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" sty=
le=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div d=
ir=3D"ltr">Here is the patch pasted into the body of an email:<div><br></di=
v><div><div>From 8e69b33a53ea30389a5e3946dd711320a77e0d23 Mon Sep 17 00:00:=
00 2001</div><div>From: Dan Davison &lt;<a href=3D"mailto:dandavison7@gmail=
.com" target=3D"_blank">dandavison7@HIDDEN</a>&gt;</div><div>Date: Fri, =
5 Aug 2016 12:19:20 -0700</div><div>Subject: [PATCH] Don&#39;t strip space =
from python completions</div><div><br></div><div>The returned completion de=
liberately includes a space after a word like</div><div>&#39;import&#39;, w=
hich is always followed by more words.</div><div><br></div><div>* lisp/prog=
modes/python.el (python-shell-completion-native-get-completions):</div><div=
>Remove space from regular expression character class</div><div>---</div><d=
iv>=C2=A0lisp/progmodes/python.el | 2 +-</div><div>=C2=A01 file changed, 1 =
insertion(+), 1 deletion(-)</div><div><br></div><div>diff --git a/lisp/prog=
modes/python.el b/lisp/progmodes/python.el</div><div>index ad69f87..8616279=
 100644</div><div>--- a/lisp/progmodes/python.el</div><div>+++ b/lisp/progm=
odes/python.el</div><div>@@ -3551,7 +3551,7 @@ completion.&quot;</div><div>=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (split-strin=
g</div><div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0(buffer-substring-no-properties</div><div>=C2=A0 =C2=A0 =C2=A0 =C2=A0=
 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (line-beginning-position) (point=
-min))</div><div>- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0&quot;[ \f\t\n\r\v()]+&quot; t)</div><div>+ =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0&quot;[\f\t\n\r\v()]+&quot; t)</div><=
div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 :test #&=
#39;string=3D))))</div><div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(set-process-=
filter process original-filter-fn)))))</div></div></div><div dir=3D"ltr"><d=
iv><div>=C2=A0</div><div>--=C2=A0</div><div>2.3.2 (Apple Git-55)</div><div>=
<br></div></div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr">On Sa=
t, 27 Aug 2016 at 14:21 Dan Davison &lt;<a href=3D"mailto:dandavison7@gmail=
.com" target=3D"_blank">dandavison7@HIDDEN</a>&gt; wrote:<br></div><bloc=
kquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #cc=
c solid;padding-left:1ex"><div dir=3D"ltr">Patch attached.<div><br></div><d=
iv>This patch is also available as a pull request at at=C2=A0<a href=3D"htt=
ps://github.com/dandavison/emacs/pull/1" target=3D"_blank">https://github.c=
om/dandavison/emacs/pull/1</a>=C2=A0The commit hash is=C2=A08e69b33a53ea303=
89a5e3946dd711320a77e0d23.</div><div><br></div><div>I have only tested this=
 on macOS. As far as I am aware, when the space character is present, it is=
 present deliberately and it is appropriate to retain it, but I would appre=
ciate feedback from python.el experts.</div><div><br><div class=3D"gmail_qu=
ote"><div dir=3D"ltr">On Sat, 27 Aug 2016 at 14:10 Dan Davison &lt;<a href=
=3D"mailto:dandavison7@HIDDEN" target=3D"_blank">dandavison7@HIDDEN</=
a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0 =
0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div=
>From emacs -Q:</div><div><br></div><div>(setq python-shell-interpreter &qu=
ot;ipython&quot;</div><div>=C2=A0 =C2=A0 =C2=A0 python-shell-interpreter-ar=
gs &quot;-i&quot;)</div><div><br></div><div>M-x run-python</div><div><br></=
div><div>In the python comint buffer insert &quot;from itertools imp&quot; =
and hit tab.</div><div><br></div><div>You will see &quot;imp&quot; complete=
d as &quot;import&quot; (no trailing space).</div><div><br></div><div>Howev=
er, if you do this in ipython itself, you will see &quot;imp&quot; complete=
d</div><div>as &quot;import &quot;. This (i.e. what ipython does) is the de=
sired behavior</div><div>(because import is always followed by another word=
).</div><div><br></div><div>In GNU Emacs 25.1.50.1 (x86_64-apple-darwin14.5=
.0, NS appkit-1348.17 Version 10.10.5 (Build 14F27))</div><div>=C2=A0of 201=
6-04-16 built on hemiprocne</div><div>Repository revision: 934549e23d6bda52=
31375dbfed7b42a966c85d14</div><div>Windowing system distributor &#39;Apple&=
#39;, version 10.3.1348</div><div>Configured using:</div><div>=C2=A0&#39;co=
nfigure --prefix=3D/usr/local/Cellar/emacs/HEAD</div><div>=C2=A0--enable-lo=
callisppath=3D/usr/local/share/emacs/site-lisp</div><div>=C2=A0--infodir=3D=
/usr/local/Cellar/emacs/HEAD/share/info/emacs --with-xml2</div><div>=C2=A0-=
-without-dbus --without-gnutls --with-ns --disable-ns-self-contained&#39;</=
div><div><br></div><div>Configured features:</div><div>JPEG NOTIFY ACL LIBX=
ML2 ZLIB TOOLKIT_SCROLL_BARS NS</div><div><br></div><div>Important settings=
:</div><div>=C2=A0 value of $LANG: en_US.UTF-8</div><div>=C2=A0 locale-codi=
ng-system: utf-8-unix</div><div><br></div><div>Major mode: Lisp Interaction=
</div><div><br></div><div>Minor modes in effect:</div><div>=C2=A0 tooltip-m=
ode: t</div><div>=C2=A0 global-eldoc-mode: t</div><div>=C2=A0 electric-inde=
nt-mode: t</div><div>=C2=A0 mouse-wheel-mode: t</div><div>=C2=A0 tool-bar-m=
ode: t</div><div>=C2=A0 menu-bar-mode: t</div><div>=C2=A0 file-name-shadow-=
mode: t</div><div>=C2=A0 global-font-lock-mode: t</div><div>=C2=A0 font-loc=
k-mode: t</div><div>=C2=A0 blink-cursor-mode: t</div><div>=C2=A0 auto-compo=
sition-mode: t</div><div>=C2=A0 auto-encryption-mode: t</div><div>=C2=A0 au=
to-compression-mode: t</div><div>=C2=A0 line-number-mode: t</div><div>=C2=
=A0 transient-mark-mode: t</div><div><br></div><div>Recent messages:</div><=
div>For information about GNU Emacs and the GNU system, type C-h C-a.</div>=
<div><br></div><div>Load-path shadows:</div><div>None found.</div><div><br>=
</div><div>Features:</div><div>(shadow sort mail-extr emacsbug message dire=
d dired-loaddefs format-spec</div><div>rfc822 mml easymenu mml-sec password=
-cache epa derived epg epg-config</div><div>gnus-util rmail rmail-loaddefs =
mm-decode mm-bodies mm-encode mail-parse</div><div>rfc2231 mailabbrev gmm-u=
tils mailheader sendmail rfc2047 rfc2045</div><div>ietf-drums mm-util mail-=
prsvr mail-utils time-date mule-util tooltip</div><div>eldoc electric uniqu=
ify ediff-hook vc-hooks lisp-float-type mwheel</div><div>term/ns-win ns-win=
 ucs-normalize term/common-win tool-bar dnd fontset</div><div>image regexp-=
opt fringe tabulated-list newcomment elisp-mode lisp-mode</div><div>prog-mo=
de register page menu-bar rfn-eshadow timer select scroll-bar</div><div>mou=
se jit-lock font-lock syntax facemenu font-core term/tty-colors frame</div>=
<div>cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai<=
/div><div>tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romani=
an</div><div>slovak czech european ethiopic indian cyrillic chinese charscr=
ipt</div><div>case-table epa-hook jka-cmpr-hook help simple abbrev obarray =
minibuffer</div><div>cl-preloaded nadvice loaddefs button faces cus-face ma=
croexp files</div><div>text-properties overlay sha1 md5 base64 format env c=
ode-pages mule</div><div>custom widget hashtable-print-readable backquote k=
queue cocoa ns</div><div>multi-tty make-network-process emacs)</div><div><b=
r></div><div>Memory information:</div><div>((conses 16 195970 9329)</div><d=
iv>=C2=A0(symbols 48 19431 0)</div><div>=C2=A0(miscs 40 43 170)</div><div>=
=C2=A0(strings 32 14792 5110)</div><div>=C2=A0(string-bytes 1 431078)</div>=
<div>=C2=A0(vectors 16 32763)</div><div>=C2=A0(vector-slots 8 640839 4764)<=
/div><div>=C2=A0(floats 8 156 54)</div><div>=C2=A0(intervals 56 194 0)</div=
><div>=C2=A0(buffers 976 11))</div><div><br></div></div></blockquote></div>=
</div></div></blockquote></div></blockquote></div>

--001a114aae5e282572053b159288--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#24322; Package emacs. Full text available.

Message received at 24322 <at> debbugs.gnu.org:


Received: (at 24322) by debbugs.gnu.org; 27 Aug 2016 21:47:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Aug 27 17:47:21 2016
Received: from localhost ([127.0.0.1]:42247 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1bdlRg-00038T-TK
	for submit <at> debbugs.gnu.org; Sat, 27 Aug 2016 17:47:21 -0400
Received: from mail-it0-f45.google.com ([209.85.214.45]:37035)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dandavison7@HIDDEN>) id 1bdlRe-00038H-Pt
 for 24322 <at> debbugs.gnu.org; Sat, 27 Aug 2016 17:47:19 -0400
Received: by mail-it0-f45.google.com with SMTP id d65so46403611ith.0
 for <24322 <at> debbugs.gnu.org>; Sat, 27 Aug 2016 14:47:18 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to;
 bh=sZngcmN1TOI5RC/7bAyqMu4dprXMpE2LopI4eh99XCE=;
 b=oZRDfUnYiTAZIvipJNYdcjyHh9eMDUlGn5hu6QjRyzbYp2sPWkJVJoNWKrHMCQYiGZ
 iWQknxMkPZorIZyx2mUZbyj3UEyzcWpQpF4MpqU4fHUty/BALvvpi+u8J9RyIo5XeGl9
 JXzthzQd5U5ps7Cps116Pznw6K425Kfc41I7KaqApIs2qD4B5xAzUf7z0AeyejDn05b9
 ZXIxMp2Un+5Hiq3OLkDGA357nKTxZfPIqAuokLJLz2Sg+/AgOHeuDcroSiDo2fy+74H9
 Sfk6IzwuSxkwIHwuBSl7/fpp9y9tUD3sL2blXypzbDDZkpocQn6TNdOxKg7RaKyqbbPS
 ePQw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to;
 bh=sZngcmN1TOI5RC/7bAyqMu4dprXMpE2LopI4eh99XCE=;
 b=S211NiiEkpbEdOmSurN/x8sM6IhRyA5X5Yzf08oIxNoOo9ahcA8/X7AcxQS4lBV8l2
 uh5qBh04EtY5FOSQFY6rRHMaDqF2J9v8HU7bbLc2imF40cIqUFObykmq49iaj2Eg7uLK
 EWfSUMadYe0fTff4JLzt8iKeLDYWwJRPRn7VD/qL0JMhCJHFscA6A3+Y3gFL2wWgEFkx
 zV7AkZg1DIc5Y+G/3PGaxkWpSaMHZNhUczXzccHoAPeQos07hxbmo11TLnOBQqa6zKLD
 /7wWIN9TuxGpcMEgcp8jdJFDtGM+PhrLPKmYcGvHqD4kcEcYeaadkSZe95tTq1njKCC2
 bDkQ==
X-Gm-Message-State: AE9vXwMNVRtGEgLM2wW3SaJA1nJjy5x4KkitA255jwrjEe3bXSmMq9PDDTE0gTUIQCgh+iR5R+kMMZ/eUjMy9Q==
X-Received: by 10.107.11.170 with SMTP id 42mr12095323iol.184.1472334433081;
 Sat, 27 Aug 2016 14:47:13 -0700 (PDT)
MIME-Version: 1.0
References: <CA+QSd75F30b_FCjRvF8D1FpjcWxcymbMxJ+oGETGu1bG6ETWPg@HIDDEN>
 <CA+QSd754kG9tMywu5tpntOwD5wCz2R0hnKSV2NmK-ABVVy3ewg@HIDDEN>
In-Reply-To: <CA+QSd754kG9tMywu5tpntOwD5wCz2R0hnKSV2NmK-ABVVy3ewg@HIDDEN>
From: Dan Davison <dandavison7@HIDDEN>
Date: Sat, 27 Aug 2016 21:47:02 +0000
Message-ID: <CA+QSd75c1SyJxVxETunn_5O4vh7oqKLKOoReiSkUaoh7zSDyNg@HIDDEN>
Subject: Re: [PATCH] Re: 25.1.50;
 Python completion should not strip trailing space
To: 24322 <at> debbugs.gnu.org
Content-Type: multipart/alternative; boundary=001a113ec7f4dff218053b1492d5
X-Spam-Score: -0.5 (/)
X-Debbugs-Envelope-To: 24322
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

--001a113ec7f4dff218053b1492d5
Content-Type: text/plain; charset=UTF-8

Here is the patch pasted into the body of an email:

From 8e69b33a53ea30389a5e3946dd711320a77e0d23 Mon Sep 17 00:00:00 2001
From: Dan Davison <dandavison7@HIDDEN>
Date: Fri, 5 Aug 2016 12:19:20 -0700
Subject: [PATCH] Don't strip space from python completions

The returned completion deliberately includes a space after a word like
'import', which is always followed by more words.

* lisp/progmodes/python.el (python-shell-completion-native-get-completions):
Remove space from regular expression character class
---
 lisp/progmodes/python.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index ad69f87..8616279 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -3551,7 +3551,7 @@ completion."
                  (split-string
                   (buffer-substring-no-properties
                    (line-beginning-position) (point-min))
-                  "[ \f\t\n\r\v()]+" t)
+                  "[\f\t\n\r\v()]+" t)
                  :test #'string=))))
         (set-process-filter process original-filter-fn)))))

-- 
2.3.2 (Apple Git-55)


On Sat, 27 Aug 2016 at 14:21 Dan Davison <dandavison7@HIDDEN> wrote:

> Patch attached.
>
> This patch is also available as a pull request at at
> https://github.com/dandavison/emacs/pull/1 The commit hash
> is 8e69b33a53ea30389a5e3946dd711320a77e0d23.
>
> I have only tested this on macOS. As far as I am aware, when the space
> character is present, it is present deliberately and it is appropriate to
> retain it, but I would appreciate feedback from python.el experts.
>
> On Sat, 27 Aug 2016 at 14:10 Dan Davison <dandavison7@HIDDEN> wrote:
>
>> From emacs -Q:
>>
>> (setq python-shell-interpreter "ipython"
>>       python-shell-interpreter-args "-i")
>>
>> M-x run-python
>>
>> In the python comint buffer insert "from itertools imp" and hit tab.
>>
>> You will see "imp" completed as "import" (no trailing space).
>>
>> However, if you do this in ipython itself, you will see "imp" completed
>> as "import ". This (i.e. what ipython does) is the desired behavior
>> (because import is always followed by another word).
>>
>> In GNU Emacs 25.1.50.1 (x86_64-apple-darwin14.5.0, NS appkit-1348.17
>> Version 10.10.5 (Build 14F27))
>>  of 2016-04-16 built on hemiprocne
>> Repository revision: 934549e23d6bda5231375dbfed7b42a966c85d14
>> Windowing system distributor 'Apple', version 10.3.1348
>> Configured using:
>>  'configure --prefix=/usr/local/Cellar/emacs/HEAD
>>  --enable-locallisppath=/usr/local/share/emacs/site-lisp
>>  --infodir=/usr/local/Cellar/emacs/HEAD/share/info/emacs --with-xml2
>>  --without-dbus --without-gnutls --with-ns --disable-ns-self-contained'
>>
>> Configured features:
>> JPEG NOTIFY ACL LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS
>>
>> Important settings:
>>   value of $LANG: en_US.UTF-8
>>   locale-coding-system: utf-8-unix
>>
>> Major mode: Lisp Interaction
>>
>> Minor modes in effect:
>>   tooltip-mode: t
>>   global-eldoc-mode: t
>>   electric-indent-mode: t
>>   mouse-wheel-mode: t
>>   tool-bar-mode: t
>>   menu-bar-mode: t
>>   file-name-shadow-mode: t
>>   global-font-lock-mode: t
>>   font-lock-mode: t
>>   blink-cursor-mode: t
>>   auto-composition-mode: t
>>   auto-encryption-mode: t
>>   auto-compression-mode: t
>>   line-number-mode: t
>>   transient-mark-mode: t
>>
>> Recent messages:
>> For information about GNU Emacs and the GNU system, type C-h C-a.
>>
>> Load-path shadows:
>> None found.
>>
>> Features:
>> (shadow sort mail-extr emacsbug message dired dired-loaddefs format-spec
>> rfc822 mml easymenu mml-sec password-cache epa derived epg epg-config
>> gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse
>> rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
>> ietf-drums mm-util mail-prsvr mail-utils time-date mule-util tooltip
>> eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel
>> term/ns-win ns-win ucs-normalize term/common-win tool-bar dnd fontset
>> image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode
>> prog-mode register page menu-bar rfn-eshadow timer select scroll-bar
>> mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame
>> cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai
>> tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian
>> slovak czech european ethiopic indian cyrillic chinese charscript
>> case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer
>> cl-preloaded nadvice loaddefs button faces cus-face macroexp files
>> text-properties overlay sha1 md5 base64 format env code-pages mule
>> custom widget hashtable-print-readable backquote kqueue cocoa ns
>> multi-tty make-network-process emacs)
>>
>> Memory information:
>> ((conses 16 195970 9329)
>>  (symbols 48 19431 0)
>>  (miscs 40 43 170)
>>  (strings 32 14792 5110)
>>  (string-bytes 1 431078)
>>  (vectors 16 32763)
>>  (vector-slots 8 640839 4764)
>>  (floats 8 156 54)
>>  (intervals 56 194 0)
>>  (buffers 976 11))
>>
>>

--001a113ec7f4dff218053b1492d5
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Here is the patch pasted into the body of an email:<div><b=
r></div><div><div>From 8e69b33a53ea30389a5e3946dd711320a77e0d23 Mon Sep 17 =
00:00:00 2001</div><div>From: Dan Davison &lt;<a href=3D"mailto:dandavison7=
@gmail.com">dandavison7@HIDDEN</a>&gt;</div><div>Date: Fri, 5 Aug 2016 1=
2:19:20 -0700</div><div>Subject: [PATCH] Don&#39;t strip space from python =
completions</div><div><br></div><div>The returned completion deliberately i=
ncludes a space after a word like</div><div>&#39;import&#39;, which is alwa=
ys followed by more words.</div><div><br></div><div>* lisp/progmodes/python=
.el (python-shell-completion-native-get-completions):</div><div>Remove spac=
e from regular expression character class</div><div>---</div><div>=C2=A0lis=
p/progmodes/python.el | 2 +-</div><div>=C2=A01 file changed, 1 insertion(+)=
, 1 deletion(-)</div><div><br></div><div>diff --git a/lisp/progmodes/python=
.el b/lisp/progmodes/python.el</div><div>index ad69f87..8616279 100644</div=
><div>--- a/lisp/progmodes/python.el</div><div>+++ b/lisp/progmodes/python.=
el</div><div>@@ -3551,7 +3551,7 @@ completion.&quot;</div><div>=C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (split-string</div><di=
v>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(buf=
fer-substring-no-properties</div><div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (line-beginning-position) (point-min))</=
div><div>- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0&q=
uot;[ \f\t\n\r\v()]+&quot; t)</div><div>+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0&quot;[\f\t\n\r\v()]+&quot; t)</div><div>=C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 :test #&#39;str=
ing=3D))))</div><div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(set-process-filter =
process original-filter-fn)))))</div><div>=C2=A0</div><div>--=C2=A0</div><d=
iv>2.3.2 (Apple Git-55)</div><div><br></div></div></div><br><div class=3D"g=
mail_quote"><div dir=3D"ltr">On Sat, 27 Aug 2016 at 14:21 Dan Davison &lt;<=
a href=3D"mailto:dandavison7@HIDDEN">dandavison7@HIDDEN</a>&gt; wrote=
:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;bor=
der-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr">Patch attached.<=
div><br></div><div>This patch is also available as a pull request at at=C2=
=A0<a href=3D"https://github.com/dandavison/emacs/pull/1" target=3D"_blank"=
>https://github.com/dandavison/emacs/pull/1</a>=C2=A0The commit hash is=C2=
=A08e69b33a53ea30389a5e3946dd711320a77e0d23.</div><div><br></div><div>I hav=
e only tested this on macOS. As far as I am aware, when the space character=
 is present, it is present deliberately and it is appropriate to retain it,=
 but I would appreciate feedback from python.el experts.</div><div><br><div=
 class=3D"gmail_quote"><div dir=3D"ltr">On Sat, 27 Aug 2016 at 14:10 Dan Da=
vison &lt;<a href=3D"mailto:dandavison7@HIDDEN" target=3D"_blank">dandav=
ison7@HIDDEN</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" s=
tyle=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div=
 dir=3D"ltr"><div>From emacs -Q:</div><div><br></div><div>(setq python-shel=
l-interpreter &quot;ipython&quot;</div><div>=C2=A0 =C2=A0 =C2=A0 python-she=
ll-interpreter-args &quot;-i&quot;)</div><div><br></div><div>M-x run-python=
</div><div><br></div><div>In the python comint buffer insert &quot;from ite=
rtools imp&quot; and hit tab.</div><div><br></div><div>You will see &quot;i=
mp&quot; completed as &quot;import&quot; (no trailing space).</div><div><br=
></div><div>However, if you do this in ipython itself, you will see &quot;i=
mp&quot; completed</div><div>as &quot;import &quot;. This (i.e. what ipytho=
n does) is the desired behavior</div><div>(because import is always followe=
d by another word).</div><div><br></div><div>In GNU Emacs 25.1.50.1 (x86_64=
-apple-darwin14.5.0, NS appkit-1348.17 Version 10.10.5 (Build 14F27))</div>=
<div>=C2=A0of 2016-04-16 built on hemiprocne</div><div>Repository revision:=
 934549e23d6bda5231375dbfed7b42a966c85d14</div><div>Windowing system distri=
butor &#39;Apple&#39;, version 10.3.1348</div><div>Configured using:</div><=
div>=C2=A0&#39;configure --prefix=3D/usr/local/Cellar/emacs/HEAD</div><div>=
=C2=A0--enable-locallisppath=3D/usr/local/share/emacs/site-lisp</div><div>=
=C2=A0--infodir=3D/usr/local/Cellar/emacs/HEAD/share/info/emacs --with-xml2=
</div><div>=C2=A0--without-dbus --without-gnutls --with-ns --disable-ns-sel=
f-contained&#39;</div><div><br></div><div>Configured features:</div><div>JP=
EG NOTIFY ACL LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS</div><div><br></div><div>=
Important settings:</div><div>=C2=A0 value of $LANG: en_US.UTF-8</div><div>=
=C2=A0 locale-coding-system: utf-8-unix</div><div><br></div><div>Major mode=
: Lisp Interaction</div><div><br></div><div>Minor modes in effect:</div><di=
v>=C2=A0 tooltip-mode: t</div><div>=C2=A0 global-eldoc-mode: t</div><div>=
=C2=A0 electric-indent-mode: t</div><div>=C2=A0 mouse-wheel-mode: t</div><d=
iv>=C2=A0 tool-bar-mode: t</div><div>=C2=A0 menu-bar-mode: t</div><div>=C2=
=A0 file-name-shadow-mode: t</div><div>=C2=A0 global-font-lock-mode: t</div=
><div>=C2=A0 font-lock-mode: t</div><div>=C2=A0 blink-cursor-mode: t</div><=
div>=C2=A0 auto-composition-mode: t</div><div>=C2=A0 auto-encryption-mode: =
t</div><div>=C2=A0 auto-compression-mode: t</div><div>=C2=A0 line-number-mo=
de: t</div><div>=C2=A0 transient-mark-mode: t</div><div><br></div><div>Rece=
nt messages:</div><div>For information about GNU Emacs and the GNU system, =
type C-h C-a.</div><div><br></div><div>Load-path shadows:</div><div>None fo=
und.</div><div><br></div><div>Features:</div><div>(shadow sort mail-extr em=
acsbug message dired dired-loaddefs format-spec</div><div>rfc822 mml easyme=
nu mml-sec password-cache epa derived epg epg-config</div><div>gnus-util rm=
ail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse</div><div>rfc22=
31 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045</div><div>ietf-=
drums mm-util mail-prsvr mail-utils time-date mule-util tooltip</div><div>e=
ldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel</div><div=
>term/ns-win ns-win ucs-normalize term/common-win tool-bar dnd fontset</div=
><div>image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mod=
e</div><div>prog-mode register page menu-bar rfn-eshadow timer select scrol=
l-bar</div><div>mouse jit-lock font-lock syntax facemenu font-core term/tty=
-colors frame</div><div>cl-generic cham georgian utf-8-lang misc-lang vietn=
amese tibetan thai</div><div>tai-viet lao korean japanese eucjp-ms cp51932 =
hebrew greek romanian</div><div>slovak czech european ethiopic indian cyril=
lic chinese charscript</div><div>case-table epa-hook jka-cmpr-hook help sim=
ple abbrev obarray minibuffer</div><div>cl-preloaded nadvice loaddefs butto=
n faces cus-face macroexp files</div><div>text-properties overlay sha1 md5 =
base64 format env code-pages mule</div><div>custom widget hashtable-print-r=
eadable backquote kqueue cocoa ns</div><div>multi-tty make-network-process =
emacs)</div><div><br></div><div>Memory information:</div><div>((conses 16 1=
95970 9329)</div><div>=C2=A0(symbols 48 19431 0)</div><div>=C2=A0(miscs 40 =
43 170)</div><div>=C2=A0(strings 32 14792 5110)</div><div>=C2=A0(string-byt=
es 1 431078)</div><div>=C2=A0(vectors 16 32763)</div><div>=C2=A0(vector-slo=
ts 8 640839 4764)</div><div>=C2=A0(floats 8 156 54)</div><div>=C2=A0(interv=
als 56 194 0)</div><div>=C2=A0(buffers 976 11))</div><div><br></div></div><=
/blockquote></div></div></div></blockquote></div>

--001a113ec7f4dff218053b1492d5--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#24322; Package emacs. Full text available.

Message received at 24322 <at> debbugs.gnu.org:


Received: (at 24322) by debbugs.gnu.org; 27 Aug 2016 21:22:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Aug 27 17:22:06 2016
Received: from localhost ([127.0.0.1]:42241 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1bdl3F-0002X2-JY
	for submit <at> debbugs.gnu.org; Sat, 27 Aug 2016 17:22:05 -0400
Received: from mail-it0-f47.google.com ([209.85.214.47]:36098)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dandavison7@HIDDEN>) id 1bdl3E-0002WY-6W
 for 24322 <at> debbugs.gnu.org; Sat, 27 Aug 2016 17:22:04 -0400
Received: by mail-it0-f47.google.com with SMTP id e63so48476027ith.1
 for <24322 <at> debbugs.gnu.org>; Sat, 27 Aug 2016 14:22:04 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to;
 bh=mLaZZr3yW0zfVA/n832GQ201FkuKiZS03W1TifSe3hg=;
 b=cbhM4A6nvYMLpA3q9H12wAMTEoJfP8qV/Oo7oqrx/fW4mWcan4PVj1eIw/qdkjiBhy
 m2+XzP81E44M6QRU+d3w5MOmewI0wDpjmdh1wspPZCq/fgjywmxDIEjdoPxkzYZz09Y7
 NhrkcpW7WI+aorDL3+jtSXeGNhpXfCrxq2lUKCptYQS4hh6ZxOEq8HqUaj9oSzYrVe9b
 Qc4G+Gyqw2sNRqHqggdyeimX/VuACJg9GgMl+T+AO4sIwMjyu6cCMTHJ9zPqvidSvJhg
 yHGwvBClubiqSJP+cNy3HFA5fQdDQ/LHBiOdSThVSXkUk9CgvbUP75pM0018Mm3sw6UK
 7bAA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to;
 bh=mLaZZr3yW0zfVA/n832GQ201FkuKiZS03W1TifSe3hg=;
 b=QJxnkxt5Fw7XmdvYnPvjSPxya9h27wMoDaW73zwSNFNKXTXTK+GCFiZQTdIzaghxVT
 SroiYZnR3jCUK4/zvz8pnyuAF7mS+HcVUStrjXsix0w0F3P86FIwWA7IvC4CMd2OYr2O
 Cdx6ERvSukYl7mhPx2bjLtg+DeX9/CrVOjFVJiZpoT/uGCdAXqJHCM82uVoyKcf+I1eP
 PHGqAy4g7kmP3/c2lcJOzEQghCATzL8vw40KkUzgm+qKK/ZIVfmogu7adFRDGD/O6xik
 cTZriAdH6EaDU/q1xlpZJCCpmlTK527kAFRYYrRtCPkTKQ91zMx7pKt3QgmNLwZiwQa1
 v1tw==
X-Gm-Message-State: AE9vXwORUQPqZVlasXIC3tzIReyRtLa/+zV/rfQsxZ61NMhmx7qrAxgbHrUibL3EQ/VgWqsrTFubjjTYf2Tw/Q==
X-Received: by 10.107.11.170 with SMTP id 42mr12035722iol.184.1472332918144;
 Sat, 27 Aug 2016 14:21:58 -0700 (PDT)
MIME-Version: 1.0
References: <CA+QSd75F30b_FCjRvF8D1FpjcWxcymbMxJ+oGETGu1bG6ETWPg@HIDDEN>
In-Reply-To: <CA+QSd75F30b_FCjRvF8D1FpjcWxcymbMxJ+oGETGu1bG6ETWPg@HIDDEN>
From: Dan Davison <dandavison7@HIDDEN>
Date: Sat, 27 Aug 2016 21:21:47 +0000
Message-ID: <CA+QSd754kG9tMywu5tpntOwD5wCz2R0hnKSV2NmK-ABVVy3ewg@HIDDEN>
Subject: [PATCH] Re: 25.1.50; Python completion should not strip trailing space
To: 24322 <at> debbugs.gnu.org
Content-Type: multipart/mixed; boundary=001a113ec7f493eb19053b1438f8
X-Spam-Score: -0.5 (/)
X-Debbugs-Envelope-To: 24322
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

--001a113ec7f493eb19053b1438f8
Content-Type: multipart/alternative; boundary=001a113ec7f493eb14053b1438f6

--001a113ec7f493eb14053b1438f6
Content-Type: text/plain; charset=UTF-8

Patch attached.

This patch is also available as a pull request at at
https://github.com/dandavison/emacs/pull/1 The commit hash
is 8e69b33a53ea30389a5e3946dd711320a77e0d23.

I have only tested this on macOS. As far as I am aware, when the space
character is present, it is present deliberately and it is appropriate to
retain it, but I would appreciate feedback from python.el experts.

On Sat, 27 Aug 2016 at 14:10 Dan Davison <dandavison7@HIDDEN> wrote:

> From emacs -Q:
>
> (setq python-shell-interpreter "ipython"
>       python-shell-interpreter-args "-i")
>
> M-x run-python
>
> In the python comint buffer insert "from itertools imp" and hit tab.
>
> You will see "imp" completed as "import" (no trailing space).
>
> However, if you do this in ipython itself, you will see "imp" completed
> as "import ". This (i.e. what ipython does) is the desired behavior
> (because import is always followed by another word).
>
> In GNU Emacs 25.1.50.1 (x86_64-apple-darwin14.5.0, NS appkit-1348.17
> Version 10.10.5 (Build 14F27))
>  of 2016-04-16 built on hemiprocne
> Repository revision: 934549e23d6bda5231375dbfed7b42a966c85d14
> Windowing system distributor 'Apple', version 10.3.1348
> Configured using:
>  'configure --prefix=/usr/local/Cellar/emacs/HEAD
>  --enable-locallisppath=/usr/local/share/emacs/site-lisp
>  --infodir=/usr/local/Cellar/emacs/HEAD/share/info/emacs --with-xml2
>  --without-dbus --without-gnutls --with-ns --disable-ns-self-contained'
>
> Configured features:
> JPEG NOTIFY ACL LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS
>
> Important settings:
>   value of $LANG: en_US.UTF-8
>   locale-coding-system: utf-8-unix
>
> Major mode: Lisp Interaction
>
> Minor modes in effect:
>   tooltip-mode: t
>   global-eldoc-mode: t
>   electric-indent-mode: t
>   mouse-wheel-mode: t
>   tool-bar-mode: t
>   menu-bar-mode: t
>   file-name-shadow-mode: t
>   global-font-lock-mode: t
>   font-lock-mode: t
>   blink-cursor-mode: t
>   auto-composition-mode: t
>   auto-encryption-mode: t
>   auto-compression-mode: t
>   line-number-mode: t
>   transient-mark-mode: t
>
> Recent messages:
> For information about GNU Emacs and the GNU system, type C-h C-a.
>
> Load-path shadows:
> None found.
>
> Features:
> (shadow sort mail-extr emacsbug message dired dired-loaddefs format-spec
> rfc822 mml easymenu mml-sec password-cache epa derived epg epg-config
> gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse
> rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
> ietf-drums mm-util mail-prsvr mail-utils time-date mule-util tooltip
> eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel
> term/ns-win ns-win ucs-normalize term/common-win tool-bar dnd fontset
> image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode
> prog-mode register page menu-bar rfn-eshadow timer select scroll-bar
> mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame
> cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai
> tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian
> slovak czech european ethiopic indian cyrillic chinese charscript
> case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer
> cl-preloaded nadvice loaddefs button faces cus-face macroexp files
> text-properties overlay sha1 md5 base64 format env code-pages mule
> custom widget hashtable-print-readable backquote kqueue cocoa ns
> multi-tty make-network-process emacs)
>
> Memory information:
> ((conses 16 195970 9329)
>  (symbols 48 19431 0)
>  (miscs 40 43 170)
>  (strings 32 14792 5110)
>  (string-bytes 1 431078)
>  (vectors 16 32763)
>  (vector-slots 8 640839 4764)
>  (floats 8 156 54)
>  (intervals 56 194 0)
>  (buffers 976 11))
>
>

--001a113ec7f493eb14053b1438f6
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Patch attached.<div><br></div><div>This patch is also avai=
lable as a pull request at at=C2=A0<a href=3D"https://github.com/dandavison=
/emacs/pull/1">https://github.com/dandavison/emacs/pull/1</a>=C2=A0The comm=
it hash is=C2=A08e69b33a53ea30389a5e3946dd711320a77e0d23.</div><div><br></d=
iv><div>I have only tested this on macOS. As far as I am aware, when the sp=
ace character is present, it is present deliberately and it is appropriate =
to retain it, but I would appreciate feedback from python.el experts.</div>=
<div><br><div class=3D"gmail_quote"><div dir=3D"ltr">On Sat, 27 Aug 2016 at=
 14:10 Dan Davison &lt;<a href=3D"mailto:dandavison7@HIDDEN">dandavison7=
@gmail.com</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=
=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=
=3D"ltr"><div>From emacs -Q:</div><div><br></div><div>(setq python-shell-in=
terpreter &quot;ipython&quot;</div><div>=C2=A0 =C2=A0 =C2=A0 python-shell-i=
nterpreter-args &quot;-i&quot;)</div><div><br></div><div>M-x run-python</di=
v><div><br></div><div>In the python comint buffer insert &quot;from itertoo=
ls imp&quot; and hit tab.</div><div><br></div><div>You will see &quot;imp&q=
uot; completed as &quot;import&quot; (no trailing space).</div><div><br></d=
iv><div>However, if you do this in ipython itself, you will see &quot;imp&q=
uot; completed</div><div>as &quot;import &quot;. This (i.e. what ipython do=
es) is the desired behavior</div><div>(because import is always followed by=
 another word).</div><div><br></div><div>In GNU Emacs 25.1.50.1 (x86_64-app=
le-darwin14.5.0, NS appkit-1348.17 Version 10.10.5 (Build 14F27))</div><div=
>=C2=A0of 2016-04-16 built on hemiprocne</div><div>Repository revision: 934=
549e23d6bda5231375dbfed7b42a966c85d14</div><div>Windowing system distributo=
r &#39;Apple&#39;, version 10.3.1348</div><div>Configured using:</div><div>=
=C2=A0&#39;configure --prefix=3D/usr/local/Cellar/emacs/HEAD</div><div>=C2=
=A0--enable-locallisppath=3D/usr/local/share/emacs/site-lisp</div><div>=C2=
=A0--infodir=3D/usr/local/Cellar/emacs/HEAD/share/info/emacs --with-xml2</d=
iv><div>=C2=A0--without-dbus --without-gnutls --with-ns --disable-ns-self-c=
ontained&#39;</div><div><br></div><div>Configured features:</div><div>JPEG =
NOTIFY ACL LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS</div><div><br></div><div>Imp=
ortant settings:</div><div>=C2=A0 value of $LANG: en_US.UTF-8</div><div>=C2=
=A0 locale-coding-system: utf-8-unix</div><div><br></div><div>Major mode: L=
isp Interaction</div><div><br></div><div>Minor modes in effect:</div><div>=
=C2=A0 tooltip-mode: t</div><div>=C2=A0 global-eldoc-mode: t</div><div>=C2=
=A0 electric-indent-mode: t</div><div>=C2=A0 mouse-wheel-mode: t</div><div>=
=C2=A0 tool-bar-mode: t</div><div>=C2=A0 menu-bar-mode: t</div><div>=C2=A0 =
file-name-shadow-mode: t</div><div>=C2=A0 global-font-lock-mode: t</div><di=
v>=C2=A0 font-lock-mode: t</div><div>=C2=A0 blink-cursor-mode: t</div><div>=
=C2=A0 auto-composition-mode: t</div><div>=C2=A0 auto-encryption-mode: t</d=
iv><div>=C2=A0 auto-compression-mode: t</div><div>=C2=A0 line-number-mode: =
t</div><div>=C2=A0 transient-mark-mode: t</div><div><br></div><div>Recent m=
essages:</div><div>For information about GNU Emacs and the GNU system, type=
 C-h C-a.</div><div><br></div><div>Load-path shadows:</div><div>None found.=
</div><div><br></div><div>Features:</div><div>(shadow sort mail-extr emacsb=
ug message dired dired-loaddefs format-spec</div><div>rfc822 mml easymenu m=
ml-sec password-cache epa derived epg epg-config</div><div>gnus-util rmail =
rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse</div><div>rfc2231 m=
ailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045</div><div>ietf-drum=
s mm-util mail-prsvr mail-utils time-date mule-util tooltip</div><div>eldoc=
 electric uniquify ediff-hook vc-hooks lisp-float-type mwheel</div><div>ter=
m/ns-win ns-win ucs-normalize term/common-win tool-bar dnd fontset</div><di=
v>image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode</d=
iv><div>prog-mode register page menu-bar rfn-eshadow timer select scroll-ba=
r</div><div>mouse jit-lock font-lock syntax facemenu font-core term/tty-col=
ors frame</div><div>cl-generic cham georgian utf-8-lang misc-lang vietnames=
e tibetan thai</div><div>tai-viet lao korean japanese eucjp-ms cp51932 hebr=
ew greek romanian</div><div>slovak czech european ethiopic indian cyrillic =
chinese charscript</div><div>case-table epa-hook jka-cmpr-hook help simple =
abbrev obarray minibuffer</div><div>cl-preloaded nadvice loaddefs button fa=
ces cus-face macroexp files</div><div>text-properties overlay sha1 md5 base=
64 format env code-pages mule</div><div>custom widget hashtable-print-reada=
ble backquote kqueue cocoa ns</div><div>multi-tty make-network-process emac=
s)</div><div><br></div><div>Memory information:</div><div>((conses 16 19597=
0 9329)</div><div>=C2=A0(symbols 48 19431 0)</div><div>=C2=A0(miscs 40 43 1=
70)</div><div>=C2=A0(strings 32 14792 5110)</div><div>=C2=A0(string-bytes 1=
 431078)</div><div>=C2=A0(vectors 16 32763)</div><div>=C2=A0(vector-slots 8=
 640839 4764)</div><div>=C2=A0(floats 8 156 54)</div><div>=C2=A0(intervals =
56 194 0)</div><div>=C2=A0(buffers 976 11))</div><div><br></div></div></blo=
ckquote></div></div></div>

--001a113ec7f493eb14053b1438f6--

--001a113ec7f493eb19053b1438f8
Content-Type: application/octet-stream; 
	name="0001-Don-t-strip-space-from-python-completions.patch"
Content-Disposition: attachment; 
	filename="0001-Don-t-strip-space-from-python-completions.patch"
Content-Transfer-Encoding: base64
Content-ID: <156cdda40caa93885781>
X-Attachment-Id: 156cdda40caa93885781

RnJvbSA4ZTY5YjMzYTUzZWEzMDM4OWE1ZTM5NDZkZDcxMTMyMGE3N2UwZDIzIE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBEYW4gRGF2aXNvbiA8ZGFuZGF2aXNvbjdAZ21haWwuY29tPgpE
YXRlOiBGcmksIDUgQXVnIDIwMTYgMTI6MTk6MjAgLTA3MDAKU3ViamVjdDogW1BBVENIXSBEb24n
dCBzdHJpcCBzcGFjZSBmcm9tIHB5dGhvbiBjb21wbGV0aW9ucwoKVGhlIHJldHVybmVkIGNvbXBs
ZXRpb24gZGVsaWJlcmF0ZWx5IGluY2x1ZGVzIGEgc3BhY2UgYWZ0ZXIgYSB3b3JkIGxpa2UKJ2lt
cG9ydCcsIHdoaWNoIGlzIGFsd2F5cyBmb2xsb3dlZCBieSBtb3JlIHdvcmRzLgoKKiBsaXNwL3By
b2dtb2Rlcy9weXRob24uZWwgKHB5dGhvbi1zaGVsbC1jb21wbGV0aW9uLW5hdGl2ZS1nZXQtY29t
cGxldGlvbnMpOgpSZW1vdmUgc3BhY2UgZnJvbSByZWd1bGFyIGV4cHJlc3Npb24gY2hhcmFjdGVy
IGNsYXNzCi0tLQogbGlzcC9wcm9nbW9kZXMvcHl0aG9uLmVsIHwgMiArLQogMSBmaWxlIGNoYW5n
ZWQsIDEgaW5zZXJ0aW9uKCspLCAxIGRlbGV0aW9uKC0pCgpkaWZmIC0tZ2l0IGEvbGlzcC9wcm9n
bW9kZXMvcHl0aG9uLmVsIGIvbGlzcC9wcm9nbW9kZXMvcHl0aG9uLmVsCmluZGV4IGFkNjlmODcu
Ljg2MTYyNzkgMTAwNjQ0Ci0tLSBhL2xpc3AvcHJvZ21vZGVzL3B5dGhvbi5lbAorKysgYi9saXNw
L3Byb2dtb2Rlcy9weXRob24uZWwKQEAgLTM1NTEsNyArMzU1MSw3IEBAIGNvbXBsZXRpb24uIgog
ICAgICAgICAgICAgICAgICAoc3BsaXQtc3RyaW5nCiAgICAgICAgICAgICAgICAgICAoYnVmZmVy
LXN1YnN0cmluZy1uby1wcm9wZXJ0aWVzCiAgICAgICAgICAgICAgICAgICAgKGxpbmUtYmVnaW5u
aW5nLXBvc2l0aW9uKSAocG9pbnQtbWluKSkKLSAgICAgICAgICAgICAgICAgICJbIFxmXHRcblxy
XHYoKV0rIiB0KQorICAgICAgICAgICAgICAgICAgIltcZlx0XG5cclx2KCldKyIgdCkKICAgICAg
ICAgICAgICAgICAgOnRlc3QgIydzdHJpbmc9KSkpKQogICAgICAgICAoc2V0LXByb2Nlc3MtZmls
dGVyIHByb2Nlc3Mgb3JpZ2luYWwtZmlsdGVyLWZuKSkpKSkKIAotLSAKMi4zLjIgKEFwcGxlIEdp
dC01NSkKCg==
--001a113ec7f493eb19053b1438f8--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#24322; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 27 Aug 2016 21:10:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Aug 27 17:10:49 2016
Received: from localhost ([127.0.0.1]:42236 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1bdksL-0002Fn-DZ
	for submit <at> debbugs.gnu.org; Sat, 27 Aug 2016 17:10:49 -0400
Received: from eggs.gnu.org ([208.118.235.92]:45294)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dandavison7@HIDDEN>) id 1bdksJ-0002Fa-TQ
 for submit <at> debbugs.gnu.org; Sat, 27 Aug 2016 17:10:48 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <dandavison7@HIDDEN>) id 1bdksC-0007j4-RS
 for submit <at> debbugs.gnu.org; Sat, 27 Aug 2016 17:10:42 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: *
X-Spam-Status: No, score=1.1 required=5.0 tests=BAYES_50,
 FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,HTML_MESSAGE,T_DKIM_INVALID
 autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:58828)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <dandavison7@HIDDEN>) id 1bdksC-0007ij-J0
 for submit <at> debbugs.gnu.org; Sat, 27 Aug 2016 17:10:40 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:36255)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <dandavison7@HIDDEN>) id 1bdks9-00058S-Ug
 for bug-gnu-emacs@HIDDEN; Sat, 27 Aug 2016 17:10:39 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <dandavison7@HIDDEN>) id 1bdks7-0007i4-VT
 for bug-gnu-emacs@HIDDEN; Sat, 27 Aug 2016 17:10:37 -0400
Received: from mail-it0-x235.google.com ([2607:f8b0:4001:c0b::235]:38565)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <dandavison7@HIDDEN>) id 1bdks7-0007he-P4
 for bug-gnu-emacs@HIDDEN; Sat, 27 Aug 2016 17:10:35 -0400
Received: by mail-it0-x235.google.com with SMTP id g62so45681241ith.1
 for <bug-gnu-emacs@HIDDEN>; Sat, 27 Aug 2016 14:10:35 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:from:date:message-id:subject:to;
 bh=dfTk/oDmZ8VFYsu36v1oRE0eIGgjxCfxX5JM0YjqvEA=;
 b=fqJEoZCO1yOGZbURlrG5ZHlurhsbnZo/HWbeZXcwZaoLArF5cAytmqQU+alSj+GlcT
 dBbKBZNLvb9FGyROpBy9jft49iE9vLaNS80xSkhrzbATNVgyOsYzousSAVUnKOjiM3eI
 B/9J8c/kix9Hb6XrhYgEfCp5GRavXiLLilEDzXTgd9MLLdc5tyxLVQoHbyITh9suMIqW
 rrTIeh2Lu69aABUi9Abw5Ve+wOX29+He1CnDMk7rtWmjMidb9qOlavnWXZ7OWdwp+BDA
 aBMedCepWYrNIiAfDVebcSmsMHqwxTVYKJMKVB4kRu8Htp/nZwx0m4sZkXDauXqDFqyX
 dl/w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
 bh=dfTk/oDmZ8VFYsu36v1oRE0eIGgjxCfxX5JM0YjqvEA=;
 b=cVTZyPHp+bVRuW1ugTIIdEZBFi8T2mGtA0Yr2eXoEJ1yTjMfLjzt3mMn0Npu3qDkDL
 Zu9Sr1rHUyE8dSsNgt8kSSf59If2dpcc/ZZs97LIvljRHJ96CoD5zleKVeIbqiH3Ytcu
 qN9jrJdcpZM06r6ys3SLkKhE2TpyT3aGAdX406fA7nIepu0UKLlXHEToWdk7qGXHFDtc
 1xRbimINYABeX4tqHpyGShJmNm/rFE+ih3GypEo9FKFuECmujs4EPLizECyDUexCX22E
 9oykqxP9M+RunSULwudBPq2zXRJDKlJP7JOtyHXgky1cemVId+Rw7yXIhPc2ufcDSnD1
 uRqA==
X-Gm-Message-State: AE9vXwMdW594YSMssZprXAcx2atohXWAMfR0v7m38Lju+swlZilPSpgOq5mtZcla816vu79kFot41wGuAnc83A==
X-Received: by 10.107.11.170 with SMTP id 42mr12002805iol.184.1472332234694;
 Sat, 27 Aug 2016 14:10:34 -0700 (PDT)
MIME-Version: 1.0
From: Dan Davison <dandavison7@HIDDEN>
Date: Sat, 27 Aug 2016 21:10:23 +0000
Message-ID: <CA+QSd75F30b_FCjRvF8D1FpjcWxcymbMxJ+oGETGu1bG6ETWPg@HIDDEN>
Subject: 25.1.50; Python completion should not strip trailing space
To: "bug-gnu-emacs@HIDDEN" <bug-gnu-emacs@HIDDEN>
Content-Type: multipart/alternative; boundary=001a113ec7f4d7273a053b140fa9
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -3.8 (---)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.8 (---)

--001a113ec7f4d7273a053b140fa9
Content-Type: text/plain; charset=UTF-8

From emacs -Q:

(setq python-shell-interpreter "ipython"
      python-shell-interpreter-args "-i")

M-x run-python

In the python comint buffer insert "from itertools imp" and hit tab.

You will see "imp" completed as "import" (no trailing space).

However, if you do this in ipython itself, you will see "imp" completed
as "import ". This (i.e. what ipython does) is the desired behavior
(because import is always followed by another word).

In GNU Emacs 25.1.50.1 (x86_64-apple-darwin14.5.0, NS appkit-1348.17
Version 10.10.5 (Build 14F27))
 of 2016-04-16 built on hemiprocne
Repository revision: 934549e23d6bda5231375dbfed7b42a966c85d14
Windowing system distributor 'Apple', version 10.3.1348
Configured using:
 'configure --prefix=/usr/local/Cellar/emacs/HEAD
 --enable-locallisppath=/usr/local/share/emacs/site-lisp
 --infodir=/usr/local/Cellar/emacs/HEAD/share/info/emacs --with-xml2
 --without-dbus --without-gnutls --with-ns --disable-ns-self-contained'

Configured features:
JPEG NOTIFY ACL LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message dired dired-loaddefs format-spec
rfc822 mml easymenu mml-sec password-cache epa derived epg epg-config
gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mail-utils time-date mule-util tooltip
eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel
term/ns-win ns-win ucs-normalize term/common-win tool-bar dnd fontset
image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame
cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai
tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian
slovak czech european ethiopic indian cyrillic chinese charscript
case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote kqueue cocoa ns
multi-tty make-network-process emacs)

Memory information:
((conses 16 195970 9329)
 (symbols 48 19431 0)
 (miscs 40 43 170)
 (strings 32 14792 5110)
 (string-bytes 1 431078)
 (vectors 16 32763)
 (vector-slots 8 640839 4764)
 (floats 8 156 54)
 (intervals 56 194 0)
 (buffers 976 11))

--001a113ec7f4d7273a053b140fa9
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>From emacs -Q:</div><div><br></div><div>(setq python-=
shell-interpreter &quot;ipython&quot;</div><div>=C2=A0 =C2=A0 =C2=A0 python=
-shell-interpreter-args &quot;-i&quot;)</div><div><br></div><div>M-x run-py=
thon</div><div><br></div><div>In the python comint buffer insert &quot;from=
 itertools imp&quot; and hit tab.</div><div><br></div><div>You will see &qu=
ot;imp&quot; completed as &quot;import&quot; (no trailing space).</div><div=
><br></div><div>However, if you do this in ipython itself, you will see &qu=
ot;imp&quot; completed</div><div>as &quot;import &quot;. This (i.e. what ip=
ython does) is the desired behavior</div><div>(because import is always fol=
lowed by another word).</div><div><br></div><div>In GNU Emacs 25.1.50.1 (x8=
6_64-apple-darwin14.5.0, NS appkit-1348.17 Version 10.10.5 (Build 14F27))</=
div><div>=C2=A0of 2016-04-16 built on hemiprocne</div><div>Repository revis=
ion: 934549e23d6bda5231375dbfed7b42a966c85d14</div><div>Windowing system di=
stributor &#39;Apple&#39;, version 10.3.1348</div><div>Configured using:</d=
iv><div>=C2=A0&#39;configure --prefix=3D/usr/local/Cellar/emacs/HEAD</div><=
div>=C2=A0--enable-locallisppath=3D/usr/local/share/emacs/site-lisp</div><d=
iv>=C2=A0--infodir=3D/usr/local/Cellar/emacs/HEAD/share/info/emacs --with-x=
ml2</div><div>=C2=A0--without-dbus --without-gnutls --with-ns --disable-ns-=
self-contained&#39;</div><div><br></div><div>Configured features:</div><div=
>JPEG NOTIFY ACL LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS</div><div><br></div><d=
iv>Important settings:</div><div>=C2=A0 value of $LANG: en_US.UTF-8</div><d=
iv>=C2=A0 locale-coding-system: utf-8-unix</div><div><br></div><div>Major m=
ode: Lisp Interaction</div><div><br></div><div>Minor modes in effect:</div>=
<div>=C2=A0 tooltip-mode: t</div><div>=C2=A0 global-eldoc-mode: t</div><div=
>=C2=A0 electric-indent-mode: t</div><div>=C2=A0 mouse-wheel-mode: t</div><=
div>=C2=A0 tool-bar-mode: t</div><div>=C2=A0 menu-bar-mode: t</div><div>=C2=
=A0 file-name-shadow-mode: t</div><div>=C2=A0 global-font-lock-mode: t</div=
><div>=C2=A0 font-lock-mode: t</div><div>=C2=A0 blink-cursor-mode: t</div><=
div>=C2=A0 auto-composition-mode: t</div><div>=C2=A0 auto-encryption-mode: =
t</div><div>=C2=A0 auto-compression-mode: t</div><div>=C2=A0 line-number-mo=
de: t</div><div>=C2=A0 transient-mark-mode: t</div><div><br></div><div>Rece=
nt messages:</div><div>For information about GNU Emacs and the GNU system, =
type C-h C-a.</div><div><br></div><div>Load-path shadows:</div><div>None fo=
und.</div><div><br></div><div>Features:</div><div>(shadow sort mail-extr em=
acsbug message dired dired-loaddefs format-spec</div><div>rfc822 mml easyme=
nu mml-sec password-cache epa derived epg epg-config</div><div>gnus-util rm=
ail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse</div><div>rfc22=
31 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045</div><div>ietf-=
drums mm-util mail-prsvr mail-utils time-date mule-util tooltip</div><div>e=
ldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel</div><div=
>term/ns-win ns-win ucs-normalize term/common-win tool-bar dnd fontset</div=
><div>image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mod=
e</div><div>prog-mode register page menu-bar rfn-eshadow timer select scrol=
l-bar</div><div>mouse jit-lock font-lock syntax facemenu font-core term/tty=
-colors frame</div><div>cl-generic cham georgian utf-8-lang misc-lang vietn=
amese tibetan thai</div><div>tai-viet lao korean japanese eucjp-ms cp51932 =
hebrew greek romanian</div><div>slovak czech european ethiopic indian cyril=
lic chinese charscript</div><div>case-table epa-hook jka-cmpr-hook help sim=
ple abbrev obarray minibuffer</div><div>cl-preloaded nadvice loaddefs butto=
n faces cus-face macroexp files</div><div>text-properties overlay sha1 md5 =
base64 format env code-pages mule</div><div>custom widget hashtable-print-r=
eadable backquote kqueue cocoa ns</div><div>multi-tty make-network-process =
emacs)</div><div><br></div><div>Memory information:</div><div>((conses 16 1=
95970 9329)</div><div>=C2=A0(symbols 48 19431 0)</div><div>=C2=A0(miscs 40 =
43 170)</div><div>=C2=A0(strings 32 14792 5110)</div><div>=C2=A0(string-byt=
es 1 431078)</div><div>=C2=A0(vectors 16 32763)</div><div>=C2=A0(vector-slo=
ts 8 640839 4764)</div><div>=C2=A0(floats 8 156 54)</div><div>=C2=A0(interv=
als 56 194 0)</div><div>=C2=A0(buffers 976 11))</div><div><br></div></div>

--001a113ec7f4d7273a053b140fa9--




Acknowledgement sent to Dan Davison <dandavison7@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#24322; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.