From: Noam Postavsky <npostavs@gmail.com>
To: David Liu <daveliu@alum.mit.edu>
Cc: 30822@debbugs.gnu.org
Subject: bug#30822: 25.3; python-shell-send-defun sends only one line
Date: Wed, 14 Mar 2018 20:22:10 -0400 [thread overview]
Message-ID: <87fu52w5l9.fsf@gmail.com> (raw)
In-Reply-To: <CAMSHvJFRPBcSwn_WRMcsZM06qJMebLxwUvmw81x8uz+md9_ajg@mail.gmail.com> (David Liu's message of "Wed, 14 Mar 2018 16:37:30 -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@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))
[...]
next prev parent reply other threads:[~2018-03-15 0:22 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-14 20:05 bug#30822: 25.3; python-shell-send-defun sends only one line David Liu
2018-03-14 20:37 ` David Liu
2018-03-15 0:22 ` Noam Postavsky [this message]
2018-04-06 3:22 ` Nitish
2018-04-07 2:26 ` Noam Postavsky
2018-04-07 2:45 ` Nitish
2018-04-07 3:01 ` Noam Postavsky
2018-04-07 3:37 ` Nitish
2018-04-08 16:07 ` Noam Postavsky
2018-04-08 16:21 ` Nitish
2018-04-08 16:44 ` Noam Postavsky
2018-04-09 6:12 ` Andreas Röhler
2018-04-09 11:56 ` Noam Postavsky
2018-04-11 14:49 ` Andreas Röhler
2018-04-11 14:57 ` Noam Postavsky
2018-04-11 17:29 ` Andreas Röhler
2018-04-11 17:33 ` Noam Postavsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87fu52w5l9.fsf@gmail.com \
--to=npostavs@gmail.com \
--cc=30822@debbugs.gnu.org \
--cc=daveliu@alum.mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).