GNU bug report logs -
#49822
28.0.50; python-shell-send functions show no output
Previous Next
Reported by: dalanicolai <at> gmail.com
Date: Mon, 2 Aug 2021 14:33:01 UTC
Severity: normal
Tags: patch
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
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
On Mon, 6 Sep 2021 at 13:53, Andreas Schwab <schwab <at> linux-m68k.org> wrote:
> On Sep 06 2021, Michael Albinus wrote:
>
>> Andreas Schwab <schwab <at> linux-m68k.org> writes:
>>
>>>>> Okay, so is the TTY line length limit of the OS available in Lisp
>>>>> somewhere? Otherwise, can we at least trust that 1024 is the universal
>>>>> lower bound?
>>>>
>>>> On systems with a POSIX shell:
>>>>
>>>> (let ((default-directory "/"))
>>>> (read (shell-command-to-string "getconf LINE_MAX")))
>>>
>>> LINE_MAX has nothing to do with the tty line discipline.
>>
>> I'll never learn it :-(
>>
>> We've discussed this issue some years ago already. IIRC, the outcome was
>> to use "getconf PIPE_BUF /" instead.
>
> Neither has PIPE_BUF.
>
> Andreas.
Okay then. Since there seem to be no better alternatives, I have
attached a new patch reducing the limit to a hard-coded 1024 bytes. If
some day someone adds a variable specifying a more precise limit, then
we can change this.
I have also rearranged things a bit so that the setup code is sent to
the inferior process just once, rather than of on every call to
`python-shell-send-string'. This way, the smaller line length limit
doesn't increase too much the use of temp files, which, as I mentioned,
is slow over ssh.
It would be great if someone with access to a BSD-like OS could test
this. I can only test locally on Linux and over ssh between Linux
machines.
PS: I have some more suggestions around the Python shell. Is the ideal
workflow to keep creating bugs with a small patch to each improvement,
or do you prefer to review a larger collection of changes bundled
together?
[0001-Reduce-limit-of-line-length-sent-to-the-Python-infer.patch (text/x-patch, attachment)]
This bug report was last modified 3 years and 333 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.