[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bug#49822: master e32c7d2: Change Python eval to send directly inste
From: |
Augusto Stoffel |
Subject: |
Re: bug#49822: master e32c7d2: Change Python eval to send directly instead of using temporary files |
Date: |
Tue, 07 Sep 2021 19:37:41 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
On Mon, 6 Sep 2021 at 13:53, Andreas Schwab <schwab@linux-m68k.org> wrote:
> On Sep 06 2021, Michael Albinus wrote:
>
>> Andreas Schwab <schwab@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
Description: Text Data
- Re: bug#49822: master e32c7d2: Change Python eval to send directly instead of using temporary files, (continued)
- Re: bug#49822: master e32c7d2: Change Python eval to send directly instead of using temporary files, Lars Ingebrigtsen, 2021/09/05
- Re: bug#49822: master e32c7d2: Change Python eval to send directly instead of using temporary files, Andreas Schwab, 2021/09/05
- Re: bug#49822: master e32c7d2: Change Python eval to send directly instead of using temporary files, Augusto Stoffel, 2021/09/05
- Re: bug#49822: master e32c7d2: Change Python eval to send directly instead of using temporary files, Michael Albinus, 2021/09/06
- Re: bug#49822: master e32c7d2: Change Python eval to send directly instead of using temporary files, Andreas Schwab, 2021/09/06
- Re: bug#49822: master e32c7d2: Change Python eval to send directly instead of using temporary files, Michael Albinus, 2021/09/06
- Re: bug#49822: master e32c7d2: Change Python eval to send directly instead of using temporary files, Andreas Schwab, 2021/09/06
- Re: bug#49822: master e32c7d2: Change Python eval to send directly instead of using temporary files, Michael Albinus, 2021/09/06
- Re: bug#49822: master e32c7d2: Change Python eval to send directly instead of using temporary files, Augusto Stoffel, 2021/09/06
- Message not available
- Re: bug#49822: master e32c7d2: Change Python eval to send directly instead of using temporary files, Andreas Schwab, 2021/09/07
- Re: bug#49822: master e32c7d2: Change Python eval to send directly instead of using temporary files,
Augusto Stoffel <=
- Re: bug#49822: master e32c7d2: Change Python eval to send directly instead of using temporary files, Eli Zaretskii, 2021/09/07
- Re: bug#49822: master e32c7d2: Change Python eval to send directly instead of using temporary files, Augusto Stoffel, 2021/09/07
- Re: bug#49822: master e32c7d2: Change Python eval to send directly instead of using temporary files, Eli Zaretskii, 2021/09/07
- Re: bug#49822: master e32c7d2: Change Python eval to send directly instead of using temporary files, Augusto Stoffel, 2021/09/07
- Re: bug#49822: master e32c7d2: Change Python eval to send directly instead of using temporary files, Eli Zaretskii, 2021/09/07
- Re: bug#49822: master e32c7d2: Change Python eval to send directly instead of using temporary files, Augusto Stoffel, 2021/09/07
- Re: bug#49822: master e32c7d2: Change Python eval to send directly instead of using temporary files, Eli Zaretskii, 2021/09/07
- Re: bug#49822: master e32c7d2: Change Python eval to send directly instead of using temporary files, Michael Albinus, 2021/09/08
- Re: bug#49822: master e32c7d2: Change Python eval to send directly instead of using temporary files, Barton, Mark, 2021/09/08
- Re: bug#49822: master e32c7d2: Change Python eval to send directly instead of using temporary files, Augusto Stoffel, 2021/09/08