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.

Full log


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)]

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

Previous Next


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