From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: David Liu Newsgroups: gmane.emacs.bugs Subject: bug#30822: 25.3; python-shell-send-defun sends only one line Date: Wed, 14 Mar 2018 16:05:27 -0400 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="089e08e54efd7f97d2056764e51b" X-Trace: blaine.gmane.org 1521058296 2061 195.159.176.226 (14 Mar 2018 20:11:36 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 14 Mar 2018 20:11:36 +0000 (UTC) To: 30822@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Mar 14 21:11:32 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ewCkF-0000KN-Oy for geb-bug-gnu-emacs@m.gmane.org; Wed, 14 Mar 2018 21:11:32 +0100 Original-Received: from localhost ([::1]:48125 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ewCmD-00060q-IJ for geb-bug-gnu-emacs@m.gmane.org; Wed, 14 Mar 2018 16:13:33 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43347) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ewClo-0005SF-BC for bug-gnu-emacs@gnu.org; Wed, 14 Mar 2018 16:13:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ewClj-0007Za-8J for bug-gnu-emacs@gnu.org; Wed, 14 Mar 2018 16:13:08 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:54014) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ewClj-0007ZV-4n for bug-gnu-emacs@gnu.org; Wed, 14 Mar 2018 16:13:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ewCli-0003Wd-Rh for bug-gnu-emacs@gnu.org; Wed, 14 Mar 2018 16:13:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: David Liu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 14 Mar 2018 20:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 30822 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.152105832513458 (code B ref -1); Wed, 14 Mar 2018 20:13:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 14 Mar 2018 20:12:05 +0000 Original-Received: from localhost ([127.0.0.1]:33675 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ewCkn-0003V0-BP for submit@debbugs.gnu.org; Wed, 14 Mar 2018 16:12:05 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:50429) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ewCed-0003Jm-Hz for submit@debbugs.gnu.org; Wed, 14 Mar 2018 16:05:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ewCeW-0003OD-IP for submit@debbugs.gnu.org; Wed, 14 Mar 2018 16:05:38 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:57033) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ewCeW-0003O0-7l for submit@debbugs.gnu.org; Wed, 14 Mar 2018 16:05:36 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41367) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ewCeU-0002og-A4 for bug-gnu-emacs@gnu.org; Wed, 14 Mar 2018 16:05:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ewCeR-0003Kd-1R for bug-gnu-emacs@gnu.org; Wed, 14 Mar 2018 16:05:34 -0400 Original-Received: from alum-mailsec-scanner-7.mit.edu ([18.7.68.19]:47856) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ewCeQ-0003Jt-SP for bug-gnu-emacs@gnu.org; Wed, 14 Mar 2018 16:05:30 -0400 X-AuditID: 12074413-cf5ff70000000aec-83-5aa980893902 Original-Received: from outgoing-alum.mit.edu (OUTGOING-ALUM.MIT.EDU [18.7.68.33]) (using TLS with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by alum-mailsec-scanner-7.mit.edu (Symantec Messaging Gateway) with SMTP id 36.B1.02796.98089AA5; Wed, 14 Mar 2018 16:05:29 -0400 (EDT) Original-Received: from mail-ot0-f174.google.com (mail-ot0-f174.google.com [74.125.82.174]) (authenticated bits=0) (User authenticated as daveliu@ALUM.MIT.EDU) by outgoing-alum.mit.edu (8.13.8/8.12.4) with ESMTP id w2EK5SBP029581 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT) for ; Wed, 14 Mar 2018 16:05:29 -0400 Original-Received: by mail-ot0-f174.google.com with SMTP id r30-v6so4575094otr.2 for ; Wed, 14 Mar 2018 13:05:29 -0700 (PDT) X-Gm-Message-State: AElRT7Erb596H2V/6xaaacxYtHn64xwlVHRMZp129DczgBVIAqfk+Cmp BxnhymZm8g4ppbOGes04HydNo4wKiGkyimaOEFA= X-Google-Smtp-Source: AG47ELslgwpEXHvRIusakIwmxWh6W/+reO0fe8ci8nFL7LN0l51hajDJ9NvMBSTqS7G4Quq686Go3VzuiRUT+/c+154= X-Received: by 10.157.112.28 with SMTP id k28mr3563343otj.89.1521057928285; Wed, 14 Mar 2018 13:05:28 -0700 (PDT) Original-Received: by 2002:a9d:440b:0:0:0:0:0 with HTTP; Wed, 14 Mar 2018 13:05:27 -0700 (PDT) X-Gmail-Original-Message-ID: X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrHKsWRmVeSWpSXmKPExsUixO6iqNvZsDLK4OtbY4vvB6ocGD3appkF MEZx2aSk5mSWpRbp2yVwZWzfdpe5YElwxePHV9kbGGd7dTFyckgImEjsuTqTuYuRi0NIYAeT xMxjU1khnGdMEjd/vmaHcCYzSjQvXMkC0VIusersNyCbA8guknj2UxoiXCyx/sYsdhCbV0BQ 4uTMJ2DlQgLhEs3T1zOClLMJqEk8eSQFEmYRUJWYsXABI0RrokT7/cdQrQESJy4/BGsVFrCS WNqzFcwWEZCU+HqnlRXEZhbwkWi4uoV1AqPALCTbZiFJQdiaEq3bf7ND2BoSC+7sY4SwtSWW LXzNvICRdRWjXGJOaa5ubmJmTnFqsm5xcmJeXmqRrrlebmaJXmpK6SZGSAAL72DcdVLuEKMA B6MSD+8t5ZVRQqyJZcWVuYcYJTmYlER5909ZESXEl5SfUpmRWJwRX1Sak1p8iFGCg1lJhPd+ IVA5b0piZVVqUT5MSpqDRUmcV22Jup+QQHpiSWp2ampBahFMVoaDQ0mCV78eqFGwKDU9tSIt M6cEIc3EwQkynAdoeDdIDW9xQWJucWY6RP4UYzhH04MHbcwcX6Y9B5J/Hr4EklsegcgDYLLt MYi88eI1kNw1obebWYglLz8vVUqcNwpknADIuIzSPLiNsGT2ilEcGADCvHUgVTzARAi38xXQ OUxA52RuWwFyTkkiQkqqgVErW89U3bVZ1kd93eaLr5aem1op3v/lfMT77jU5oqXK3b/Pm3Ts +OBo/y5kEj/7H18F5epZN35LFiwvXqWz5VPM8rOvkuz36s5NaPNPyHzDorb+0o6k X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Mailman-Approved-At: Wed, 14 Mar 2018 16:12:04 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:144285 Archived-At: --089e08e54efd7f97d2056764e51b Content-Type: text/plain; charset="UTF-8" note: no other Python-related emacs packages are being used; only the builtin one. 1. create new file "test.py" with following: def f(x): return x+1 2. C-c C-p to run-python 3. place point immediately after "return x+1" 4. C-M-x for python-shell-send-defun result: SyntaxError: 'return' outside function it appears that only one line is being sent, instead of both lines. In GNU Emacs 25.3.1 (x86_64-apple-darwin13.4.0, NS appkit-1265.21 Version 10.9.5 (Build 13F1911)) of 2017-09-12 built on builder10-9.local Windowing system distributor 'Apple', version 10.3.1561 Configured using: 'configure --with-ns '--enable-locallisppath=/Library/Application Support/Emacs/${version}/site-lisp:/Library/Application Support/Emacs/site-lisp' --with-modules' Configured features: NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Python Minor modes in effect: shell-dirtrack-mode: t tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-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: uncompressing python.el.gz...done Making completion list... t delete-backward-char: Text is read-only Quit is undefined mouse-2, RET: find function's definition uncompressing python.el.gz...done Load-path shadows: /Users/daveliu/quicklisp/dists/quicklisp/software/slime-v2.20/slime-autoloads hides /Users/daveliu/.emacs.d/elpa/slime-20180308.733/slime-autoloads /Users/daveliu/quicklisp/dists/quicklisp/software/slime-v2.20/slime-tests hides /Users/daveliu/.emacs.d/elpa/slime-20180308.733/slime-tests /Users/daveliu/quicklisp/dists/quicklisp/software/slime-v2.20/slime hides /Users/daveliu/.emacs.d/elpa/slime-20180308.733/slime Features: (shadow sort mail-extr emacsbug message dired rfc822 mml mml-sec epg mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mail-utils jka-compr eieio-opt speedbar sb-image ezimage dframe find-func tramp-cache python tramp-sh tramp tramp-compat auth-source gnus-util mm-util help-fns mail-prsvr password-cache tramp-loaddefs trampver shell pcomplete format-spec json map slime-fancy slime-trace-dialog slime-fontifying-fu slime-package-fu slime-references slime-compiler-notes-tree slime-scratch slime-presentations advice bridge slime-macrostep macrostep slime-mdot-fu slime-enclosing-context slime-fuzzy slime-fancy-trace slime-fancy-inspector slime-c-p-c slime-editing-commands slime-autodoc slime-repl elp slime-parse slime derived edmacro kmacro lisp-mnt gud apropos compile etags xref cl-seq project eieio eieio-core arc-mode archive-mode noutline outline easy-mmode pp comint ansi-color ring hyperspec cl-macs thingatpt browse-url cl tango-dark-theme finder-inf tex-site info slime-autoloads package epg-config seq byte-opt gv bytecomp byte-compile cl-extra help-mode easymenu cconv cl-loaddefs pcase cl-lib time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel 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 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 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 337784 17797) (symbols 48 30156 0) (miscs 40 149 592) (strings 32 48025 8240) (string-bytes 1 1429236) (vectors 16 43362) (vector-slots 8 786245 7866) (floats 8 339 383) (intervals 56 649 397) (buffers 976 27)) --089e08e54efd7f97d2056764e51b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
note: no other Python-related emacs packages are bein= g used;
only the builtin one.

1. cre= ate new file "test.py" with following:

d= ef f(x):
=C2=A0 =C2=A0 return x+1

2. C-c= C-p to run-python

3. place point immediately afte= r "return x+1"

4. C-M-x for python-shell= -send-defun

result:

=C2= =A0 =C2=A0 SyntaxError: 'return' outside function

it appears that only one line is being sent, instead of both lines.=



In GNU Emacs 25.3.1= (x86_64-apple-darwin13.4.0, NS appkit-1265.21 Version 10.9.5 (Build 13F191= 1))
=C2=A0of 2017-09-12 built on builder10-9.local
Wind= owing system distributor 'Apple', version 10.3.1561
Confi= gured using:
=C2=A0'configure --with-ns '--enable-localli= sppath=3D/Library/Application
=C2=A0Support/Emacs/${version}/site= -lisp:/Library/Application
=C2=A0Support/Emacs/site-lisp' --w= ith-modules'

Configured features:
NO= TIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES

<= /div>
Important settings:
=C2=A0 value of $LANG: en_US.UTF-8<= /div>
=C2=A0 locale-coding-system: utf-8-unix

= Major mode: Python

Minor modes in effect:
=C2=A0 shell-dirtrack-mode: t
=C2=A0 tooltip-mode: t
= =C2=A0 global-eldoc-mode: t
=C2=A0 electric-indent-mode: t
<= div>=C2=A0 mouse-wheel-mode: t
=C2=A0 file-name-shadow-mode: t
=C2=A0 global-font-lock-mode: t
=C2=A0 font-lock-mode: t<= /div>
=C2=A0 blink-cursor-mode: t
=C2=A0 auto-composition-mod= e: t
=C2=A0 auto-encryption-mode: t
=C2=A0 auto-compres= sion-mode: t
=C2=A0 line-number-mode: t
=C2=A0 transien= t-mark-mode: t

Recent messages:
uncompre= ssing python.el.gz...done
Making completion list...
t

delete-backward-char: Text is read-only
Q= uit

<C-tab> is undefined
mouse-2, = RET: find function's definition
uncompressing python.el.gz...= done

Load-path shadows:
/Users/daveliu/q= uicklisp/dists/quicklisp/software/slime-v2.20/slime-autoloads hides /Users/= daveliu/.emacs.d/elpa/slime-20180308.733/slime-autoloads
/Users/d= aveliu/quicklisp/dists/quicklisp/software/slime-v2.20/slime-tests hides /Us= ers/daveliu/.emacs.d/elpa/slime-20180308.733/slime-tests
/Users/d= aveliu/quicklisp/dists/quicklisp/software/slime-v2.20/slime hides /Users/da= veliu/.emacs.d/elpa/slime-20180308.733/slime

Featu= res:
(shadow sort mail-extr emacsbug message dired rfc822 mml mml= -sec epg
mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabb= rev gmm-utils
mailheader sendmail rfc2047 rfc2045 ietf-drums mail= -utils jka-compr
eieio-opt speedbar sb-image ezimage dframe find-= func tramp-cache python
tramp-sh tramp tramp-compat auth-source g= nus-util mm-util help-fns
mail-prsvr password-cache tramp-loaddef= s trampver shell pcomplete
format-spec json map slime-fancy slime= -trace-dialog slime-fontifying-fu
slime-package-fu slime-referenc= es slime-compiler-notes-tree
slime-scratch slime-presentations ad= vice bridge slime-macrostep
macrostep slime-mdot-fu slime-enclosi= ng-context slime-fuzzy
slime-fancy-trace slime-fancy-inspector sl= ime-c-p-c
slime-editing-commands slime-autodoc slime-repl elp sli= me-parse slime
derived edmacro kmacro lisp-mnt gud apropos compil= e etags xref cl-seq
project eieio eieio-core arc-mode archive-mod= e noutline outline
easy-mmode pp comint ansi-color ring hyperspec= cl-macs thingatpt
browse-url cl tango-dark-theme finder-inf tex-= site info slime-autoloads
package epg-config seq byte-opt gv byte= comp byte-compile cl-extra
help-mode easymenu cconv cl-loaddefs p= case cl-lib time-date mule-util
tooltip eldoc electric uniquify e= diff-hook vc-hooks lisp-float-type
mwheel ns-win ucs-normalize te= rm/common-win tool-bar dnd fontset image
regexp-opt fringe tabula= ted-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 frame cl-generic cham
georgian utf= -8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean jap= anese eucjp-ms cp51932 hebrew greek romanian slovak czech
europea= n ethiopic indian cyrillic chinese charscript case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice
loaddefs button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
ha= shtable-print-readable backquote kqueue cocoa ns multi-tty
make-n= etwork-process emacs)

Memory information:
((conses 16 337784 17797)
=C2=A0(symbols 48 30156 0)
= =C2=A0(miscs 40 149 592)
=C2=A0(strings 32 48025 8240)
= =C2=A0(string-bytes 1 1429236)
=C2=A0(vectors 16 43362)
=C2=A0(vector-slots 8 786245 7866)
=C2=A0(floats 8 339 383)
=C2=A0(intervals 56 649 397)
=C2=A0(buffers 976 27))
<= div>
--089e08e54efd7f97d2056764e51b--