GNU bug report logs - #30822
python-shell-send-defun can't send first line of buffer

Previous Next

Package: emacs;

Reported by: David Liu <daveliu <at> alum.mit.edu>

Date: Wed, 14 Mar 2018 20:13:02 UTC

Severity: minor

Tags: confirmed, fixed, patch

Found in versions 25.3, 26.1

Fixed in version 27.1

Done: Noam Postavsky <npostavs <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 30822 in the body.
You can then email your comments to 30822 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#30822; Package emacs. (Wed, 14 Mar 2018 20:13:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to David Liu <daveliu <at> alum.mit.edu>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 14 Mar 2018 20:13:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: David Liu <daveliu <at> alum.mit.edu>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.3; python-shell-send-defun sends only one line
Date: Wed, 14 Mar 2018 16:05:27 -0400
[Message part 1 (text/plain, inline)]
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

<C-tab> 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))
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#30822; Package emacs. (Wed, 14 Mar 2018 20:38:01 GMT) Full text and rfc822 format available.

Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: David Liu <daveliu <at> alum.mit.edu>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: 25.3; python-shell-send-defun sends only one line
Date: Wed, 14 Mar 2018 16:37:30 -0400
[Message part 1 (text/plain, inline)]
regarding the possible bug with python-shell-send-defun, it seems to *only*
occurs if the python function starts on the very first line of the file.
Otherwise, python-shell-send-defun works perfectly.

On Wed, Mar 14, 2018 at 4:05 PM, David Liu <daveliu <at> alum.mit.edu> wrote:

> 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
>
> <C-tab> 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))
>
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#30822; Package emacs. (Thu, 15 Mar 2018 00:23:02 GMT) Full text and rfc822 format available.

Message #11 received at 30822 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> gmail.com>
To: David Liu <daveliu <at> alum.mit.edu>
Cc: 30822 <at> debbugs.gnu.org
Subject: Re: bug#30822: 25.3; python-shell-send-defun sends only one line
Date: Wed, 14 Mar 2018 20:22:10 -0400
retitle 30822 python-shell-send-defun can't send first line of buffer
tags 30822 + confirmed
found 30822 26.1
severity 30822 minor
quit

David Liu <daveliu <at> alum.mit.edu> writes:

> regarding the possible bug with python-shell-send-defun, it seems to
> *only* occurs if the python function starts on the very first line of
> the file. Otherwise, python-shell-send-defun works perfectly.

Indeed, there is an unconditional call to `forward-line', which makes it
impossible to for python-shell-send-defun to send the first line of the
buffer:

(defun python-shell-send-defun (&optional arg msg)
  [...]
    (python-shell-send-region
     (progn
       (end-of-line 1)
       (while (and (or (python-nav-beginning-of-defun)
                       (beginning-of-line 1))
                   (> (current-indentation) 0)))
       (when (not arg)
         (while (and (forward-line -1)
                     (looking-at (python-rx decorator))))
         (forward-line 1)) ; <-----------------------------------
       (point-marker))
      [...]





Changed bug title to 'python-shell-send-defun can't send first line of buffer' from '25.3; python-shell-send-defun sends only one line' Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Thu, 15 Mar 2018 00:23:02 GMT) Full text and rfc822 format available.

Added tag(s) confirmed. Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Thu, 15 Mar 2018 00:23:02 GMT) Full text and rfc822 format available.

bug Marked as found in versions 26.1. Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Thu, 15 Mar 2018 00:23:02 GMT) Full text and rfc822 format available.

Severity set to 'minor' from 'normal' Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Thu, 15 Mar 2018 00:23:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#30822; Package emacs. (Fri, 06 Apr 2018 09:30:02 GMT) Full text and rfc822 format available.

Message #22 received at 30822 <at> debbugs.gnu.org (full text, mbox):

From: Nitish <nitishch <at> protonmail.com>
To: "30822 <at> debbugs.gnu.org" <30822 <at> debbugs.gnu.org>
Subject: bug#30822: 25.3; python-shell-send-defun sends only one line
Date: Thu, 05 Apr 2018 23:22:19 -0400
[Message part 1 (text/plain, inline)]
As Noam Postavsky mentioned, there was an unconditional (forward-line 1) expression.

The issue manifests itself in a different way too. In the example that David Liu gave, add a decorator to the function on the first line. Then `python-shell-send-defun` enters an infinite loop.

The attached patch fixes both these issues. `(forward-line 1)` should be called only when `(forward-line -1)` moves Point and `(looking-at..` returns false.
[0001-30822-Fixed-infinite-loop-and-also-removed-an-extra-.patch (text/x-patch, attachment)]

Added tag(s) patch. Request was from Nitish <nitishch <at> protonmail.com> to control <at> debbugs.gnu.org. (Fri, 06 Apr 2018 09:30:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#30822; Package emacs. (Sat, 07 Apr 2018 02:28:01 GMT) Full text and rfc822 format available.

Message #27 received at 30822 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> gmail.com>
To: Nitish <nitishch <at> protonmail.com>
Cc: "30822 <at> debbugs.gnu.org" <30822 <at> debbugs.gnu.org>
Subject: Re: bug#30822: 25.3; python-shell-send-defun sends only one line
Date: Fri, 06 Apr 2018 22:26:56 -0400
Nitish <nitishch <at> protonmail.com> writes:

>         (when (not arg)
> -         (while (and (forward-line -1)
> -                     (looking-at (python-rx decorator))))
> -         (forward-line 1))
> +         (while (and
> +                 ;; Make sure forward-line actually moves Point
> +                 (eq (forward-line -1) 0)
> +                 ;; If Point is at a decorator, loop.
> +                 ;; else, move one line down and exit the loop.
> +                 (or (looking-at (python-rx decorator))
> +                     (and (forward-line 1) nil)))))

Thanks.  You could drop the comments, since they just repeat what the
code is saying.  And, while I know it's fairly common to use `and' and
`or' like that to encode conditionals, perhaps using `if' directly would
minimize the temptation to rephrase it as an "if" statement in English.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#30822; Package emacs. (Sat, 07 Apr 2018 02:47:02 GMT) Full text and rfc822 format available.

Message #30 received at 30822 <at> debbugs.gnu.org (full text, mbox):

From: Nitish <nitishch <at> protonmail.com>
To: npostavs <at> gmail.com
Cc: 30822 <at> debbugs.gnu.org
Subject: Re: bug#30822: 25.3; python-shell-send-defun sends only one line
Date: Fri, 06 Apr 2018 22:45:50 -0400
[Message part 1 (text/plain, inline)]
I will remove the comments.

To use if condition, we would need equivalent of a break. What is the elisp-y way of breaking out of a loop.

Sent from ProtonMail mobile

-------- Original Message --------
On Apr 6, 2018, 7:26 PM, Noam Postavsky wrote:

> Nitish  writes:
>
>> (when (not arg)
>> - (while (and (forward-line -1)
>> - (looking-at (python-rx decorator))))
>> - (forward-line 1))
>> + (while (and
>> + ;; Make sure forward-line actually moves Point
>> + (eq (forward-line -1) 0)
>> + ;; If Point is at a decorator, loop.
>> + ;; else, move one line down and exit the loop.
>> + (or (looking-at (python-rx decorator))
>> + (and (forward-line 1) nil)))))
>
> Thanks. You could drop the comments, since they just repeat what the
> code is saying. And, while I know it's fairly common to use `and' and
> `or' like that to encode conditionals, perhaps using `if' directly would
> minimize the temptation to rephrase it as an "if" statement in English. @protonmail.com>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#30822; Package emacs. (Sat, 07 Apr 2018 03:02:01 GMT) Full text and rfc822 format available.

Message #33 received at 30822 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> gmail.com>
To: Nitish <nitishch <at> protonmail.com>
Cc: 30822 <at> debbugs.gnu.org
Subject: Re: bug#30822: 25.3; python-shell-send-defun sends only one line
Date: Fri, 06 Apr 2018 23:01:19 -0400
Nitish <nitishch <at> protonmail.com> writes:

> I will remove the comments.
>
> To use if condition, we would need equivalent of a break. What is the
> elisp-y way of breaking out of a loop.

I meant, instead of

    (or (looking-at (python-rx decorator))
        (and (forward-line 1) nil))

use

    (if (looking-at (python-rx decorator)) t
      (forward-line 1)
      nil)

Or at least use `progn' instead of that `and', since forward-line always
returns non-nil anyway:

    (or (looking-at (python-rx decorator))
        (progn (forward-line 1) nil))





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#30822; Package emacs. (Sat, 07 Apr 2018 03:38:02 GMT) Full text and rfc822 format available.

Message #36 received at 30822 <at> debbugs.gnu.org (full text, mbox):

From: Nitish <nitishch <at> protonmail.com>
To: Noam Postavsky <npostavs <at> gmail.com>
Cc: "30822 <at> debbugs.gnu.org" <30822 <at> debbugs.gnu.org>
Subject: Re: bug#30822: 25.3; python-shell-send-defun sends only one line
Date: Fri, 06 Apr 2018 23:37:29 -0400
[Message part 1 (text/plain, inline)]
Attaching the updated patch.
[0001-Fix-python-shell-send-defun-for-functions-starting-a.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#30822; Package emacs. (Sun, 08 Apr 2018 16:08:01 GMT) Full text and rfc822 format available.

Message #39 received at 30822 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> gmail.com>
To: Nitish <nitishch <at> protonmail.com>
Cc: "30822 <at> debbugs.gnu.org" <30822 <at> debbugs.gnu.org>
Subject: Re: bug#30822: 25.3; python-shell-send-defun sends only one line
Date: Sun, 08 Apr 2018 12:07:39 -0400
Nitish <nitishch <at> protonmail.com> writes:

> Attaching the updated patch.

Thanks.  I see you have one previous tiny change, am I correct in
assuming your copyright status is unchanged?  (This patch should still
fit within the 15 line limit, though you are approaching it.)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#30822; Package emacs. (Sun, 08 Apr 2018 16:22:02 GMT) Full text and rfc822 format available.

Message #42 received at 30822 <at> debbugs.gnu.org (full text, mbox):

From: Nitish <nitishch <at> protonmail.com>
To: npostavs <at> gmail.com
Cc: 30822 <at> debbugs.gnu.org
Subject: Re: bug#30822: 25.3; python-shell-send-defun sends only one line
Date: Sun, 08 Apr 2018 12:21:13 -0400
[Message part 1 (text/plain, inline)]
Yes. You are right. Will change it sometime :)

-------- Original Message --------
On Apr 8, 2018, 9:07 AM, Noam Postavsky wrote:

> Nitish  writes:
>
>> Attaching the updated patch.
>
> Thanks. I see you have one previous tiny change, am I correct in
> assuming your copyright status is unchanged? (This patch should still
> fit within the 15 line limit, though you are approaching it.) @protonmail.com>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#30822; Package emacs. (Sun, 08 Apr 2018 16:45:01 GMT) Full text and rfc822 format available.

Message #45 received at 30822 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> gmail.com>
To: Nitish <nitishch <at> protonmail.com>
Cc: "30822 <at> debbugs.gnu.org" <30822 <at> debbugs.gnu.org>
Subject: Re: bug#30822: 25.3; python-shell-send-defun sends only one line
Date: Sun, 08 Apr 2018 12:44:03 -0400
tags 30822 fixed
close 30822 27.1
quit

Nitish <nitishch <at> protonmail.com> writes:

> Attaching the updated patch.

Pushed to master.

[1: 5fb34352f6]: 2018-04-08 12:36:00 -0400
  Fix python-shell-send-defun at start of buffer (Bug#30822)
  https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=5fb34352f6050ba225d14f2a51a6b99739826b1b




Added tag(s) fixed. Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Sun, 08 Apr 2018 16:45:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 27.1, send any further explanations to 30822 <at> debbugs.gnu.org and David Liu <daveliu <at> alum.mit.edu> Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Sun, 08 Apr 2018 16:45:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#30822; Package emacs. (Mon, 09 Apr 2018 06:13:01 GMT) Full text and rfc822 format available.

Message #52 received at 30822 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Röhler <andreas.roehler <at> easy-emacs.de>
To: Noam Postavsky <npostavs <at> gmail.co>
Cc: nitishch <at> protonmail.com, 30822 <at> debbugs.gnu.org
Subject: Re: bug#30822: 25.3; python-shell-send-defun sends only one line
Date: Mon, 9 Apr 2018 08:12:30 +0200
On 08.04.2018 18:44, Noam Postavsky wrote:
> tags 30822 fixed
> close 30822 27.1
> quit
> 
> Nitish<nitishch <at> protonmail.com>  writes:
> 
>> Attaching the updated patch.
> Pushed to master.
> 
> [1: 5fb34352f6]: 2018-04-08 12:36:00 -0400
>    Fix python-shell-send-defun at start of buffer (Bug#30822)
>    https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=5fb34352f6050ba225d14f2a51a6b99739826b1b
> 
> 
> 

Please consider re-opening.
Isn't this a bug of python-nav-beginning-of-defun and the fix belonging 
there?

Cheers,
Andreas




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#30822; Package emacs. (Mon, 09 Apr 2018 11:57:02 GMT) Full text and rfc822 format available.

Message #55 received at 30822 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> gmail.com>
To: Andreas Röhler <andreas.roehler <at> easy-emacs.de>
Cc: nitishch <at> protonmail.com, 30822 <at> debbugs.gnu.org,
 Noam Postavsky <npostavs <at> gmail.co>
Subject: Re: bug#30822: 25.3; python-shell-send-defun sends only one line
Date: Mon, 09 Apr 2018 07:56:44 -0400
Andreas Röhler <andreas.roehler <at> easy-emacs.de> writes:

> Please consider re-opening.
> Isn't this a bug of python-nav-beginning-of-defun and the fix
> belonging there?

I don't see why.  If you have a bug to report against
python-nav-beginning-of-defun please just say what you mean.






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#30822; Package emacs. (Wed, 11 Apr 2018 14:50:01 GMT) Full text and rfc822 format available.

Message #58 received at 30822 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Röhler <andreas.roehler <at> easy-emacs.de>
To: Noam Postavsky <npostavs <at> gmail.com>
Cc: nitishch <at> protonmail.com, 30822 <at> debbugs.gnu.org,
 Noam Postavsky <npostavs <at> gmail.co>
Subject: Re: bug#30822: 25.3; python-shell-send-defun sends only one line
Date: Wed, 11 Apr 2018 16:49:44 +0200
On 09.04.2018 13:56, Noam Postavsky wrote:
> Andreas Röhler <andreas.roehler <at> easy-emacs.de> writes:
> 
>> Please consider re-opening.
>> Isn't this a bug of python-nav-beginning-of-defun and the fix
>> belonging there?
> 
> I don't see why.  If you have a bug to report against
> python-nav-beginning-of-defun please just say what you mean.
> 
> 


Well, if a function is decorated, shouldn't a command reaching the start 
of def now reach the start of decorator?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#30822; Package emacs. (Wed, 11 Apr 2018 14:58:01 GMT) Full text and rfc822 format available.

Message #61 received at 30822 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> gmail.com>
To: Andreas Röhler <andreas.roehler <at> easy-emacs.de>
Cc: Nitish <nitishch <at> protonmail.com>, 30822 <at> debbugs.gnu.org
Subject: Re: bug#30822: 25.3; python-shell-send-defun sends only one line
Date: Wed, 11 Apr 2018 10:57:52 -0400
On 11 April 2018 at 10:49, Andreas Röhler <andreas.roehler <at> easy-emacs.de> wrote:
> On 09.04.2018 13:56, Noam Postavsky wrote:
>>
>> Andreas Röhler <andreas.roehler <at> easy-emacs.de> writes:
>>
>>> Please consider re-opening.
>>> Isn't this a bug of python-nav-beginning-of-defun and the fix
>>> belonging there?
>>
>> I don't see why.  If you have a bug to report against
>> python-nav-beginning-of-defun please just say what you mean.
>
> Well, if a function is decorated, shouldn't a command reaching the start of
> def now reach the start of decorator?

Changing python-nav-beginning-of-defun to behave that way sounds
reasonable, but it should be pursued in a separate (wishlist) bug, not
this one.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#30822; Package emacs. (Wed, 11 Apr 2018 17:29:01 GMT) Full text and rfc822 format available.

Message #64 received at 30822 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Röhler <andreas.roehler <at> easy-emacs.de>
To: Noam Postavsky <npostavs <at> gmail.com>
Cc: Nitish <nitishch <at> protonmail.com>, 30822 <at> debbugs.gnu.org
Subject: Re: bug#30822: 25.3; python-shell-send-defun sends only one line
Date: Wed, 11 Apr 2018 19:29:20 +0200
On 11.04.2018 16:57, Noam Postavsky wrote:
> On 11 April 2018 at 10:49, Andreas Röhler <andreas.roehler <at> easy-emacs.de> wrote:
>> On 09.04.2018 13:56, Noam Postavsky wrote:
>>>
>>> Andreas Röhler <andreas.roehler <at> easy-emacs.de> writes:
>>>
>>>> Please consider re-opening.
>>>> Isn't this a bug of python-nav-beginning-of-defun and the fix
>>>> belonging there?
>>>
>>> I don't see why.  If you have a bug to report against
>>> python-nav-beginning-of-defun please just say what you mean.
>>
>> Well, if a function is decorated, shouldn't a command reaching the start of
>> def now reach the start of decorator?
> 
> Changing python-nav-beginning-of-defun to behave that way sounds
> reasonable, but it should be pursued in a separate (wishlist) bug, not
> this one.
> 


Or fixing the bug here at the right place solves two at once?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#30822; Package emacs. (Wed, 11 Apr 2018 17:34:01 GMT) Full text and rfc822 format available.

Message #67 received at 30822 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> gmail.com>
To: Andreas Röhler <andreas.roehler <at> easy-emacs.de>
Cc: Nitish <nitishch <at> protonmail.com>, 30822 <at> debbugs.gnu.org
Subject: Re: bug#30822: 25.3; python-shell-send-defun sends only one line
Date: Wed, 11 Apr 2018 13:33:49 -0400
On 11 April 2018 at 13:29, Andreas Röhler <andreas.roehler <at> easy-emacs.de> wrote:

> Or fixing the bug here at the right place solves two at once?

Look, the bug reported here was fixed. If you want to start changing
the behaviour of python-nav-beginning-of-defun (possibly breaking
other code which relies on the current behaviour) it should be
discussed separately.
Bug numbers are not a scarce resource.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 10 May 2018 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 7 years and 99 days ago.

Previous Next


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