GNU bug report logs - #43450
28.0.50; Python shell doesn't echo if shebang

Previous Next

Package: emacs;

Reported by: Gunnar Horrigmo <horrigmo <at> runbox.no>

Date: Wed, 16 Sep 2020 15:25:02 UTC

Severity: normal

Tags: fixed

Found in version 28.0.50

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Gunnar Horrigmo <horrigmo <at> runbox.no>
Cc: Fabián Ezequiel Gallina <fgallina <at> gnu.org>,
 43450 <at> debbugs.gnu.org
Subject: Re: bug#43450: 28.0.50; Python shell doesn't echo if shebang
Date: Fri, 02 Oct 2020 05:33:04 +0200
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> I can reproduce this in Emacs 28, but it doesn't seem to be triggered by
> the shebang:  Adding some blank lines to the top of the buffer also
> triggers the error.  Or ... anything:
>
> (python-shell-buffer-substring 2 (point) nil)
> => "# -*- coding: utf-8 -*-
>
> 1+2"

I have to admit that I don't understand the reason for the coding cookie
at all -- we bind coding-system-for-write to utf-8 before writing the
temp file anyway, and on the Python side, we specify the coding system
explicitly there, too.

But in case it does have an effect, I haven't removed it altogether, but
instead made the C-c C-e command avoid outputting it, which fixes the
problem.  C-M-x, probably a more important command, is not affected by
the cookie one way or another (since it's just side-effecting), so I've
left it alone there.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 4 years and 236 days ago.

Previous Next


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