all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#67510: 29.1; macOS accept-process-output line length limit of 1024
@ 2023-11-28  4:14 Max Arnold
  2023-11-28 14:51 ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Max Arnold @ 2023-11-28  4:14 UTC (permalink / raw)
  To: 67510

[-- Attachment #1: Type: text/plain, Size: 2696 bytes --]

blacken-buffer (from
https://github.com/pythonic-emacs/blacken/blob/master/blacken.el) hangs
at accept-process-output C call if a Python code line length exceeds 1024
characters.

A quick reproducer:

mytest.py:

```
assert res ==
"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
```

mytest.el:

```
(defun test-blacken ()
  (add-to-list 'load-path "~/.emacs.d/elpa/blacken-20230821.1738")
  (require 'blacken)
  (find-file "/tmp/mytest.py")
  (blacken-buffer)
  )
```

Test command:

/Applications/Emacs.app/Contents/MacOS/Emacs -Q -l mytest.el -f
test-blacken

Emacs build
https://github.com/railwaycat/homebrew-emacsmacport/releases/tag/emacs-29.1-mac-10.0

In GNU Emacs 29.1 (build 1, x86_64-apple-darwin21.6.0, Carbon Version
 165 AppKit 2113.6) of 2023-08-08 built on Mac-1691500888998.local
Repository revision: e173249a143cee72d59ae78c4e11038512f5a00f
Repository branch: 29.1-mac-10.0
Windowing system distributor 'Apple Inc.', version 13.6.1
System Description:  macOS 13.6.1

Configured using:
 'configure --with-mac
 --enable-locallisppath=/usr/local/share/emacs/site-lisp:/opt/homebrew/share/emacs/site-lisp
 --enable-mac-app=/Users/runner/work/homebrew-emacsmacport/homebrew-emacsmacport/build-scripts/build_out/tmproot
 --prefix=/Users/runner/work/homebrew-emacsmacport/homebrew-emacsmacport/build-scripts/build_out/tmproot
 --enable-mac-self-contained --with-modules --with-xwidgets
 --with-tree-sitter --without-lcms2 --without-webp'

Configured features:
ACL GMP GNUTLS JSON LIBXML2 MODULES NOTIFY KQUEUE PDUMPER SQLITE3
THREADS TOOLKIT_SCROLL_BARS TREE_SITTER XWIDGETS ZLIB

Important settings:
  value of $LANG: ru_RU.UTF-8
  locale-coding-system: utf-8-unix

[-- Attachment #2: Type: text/html, Size: 3070 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#67510: 29.1; macOS accept-process-output line length limit of 1024
  2023-11-28  4:14 bug#67510: 29.1; macOS accept-process-output line length limit of 1024 Max Arnold
@ 2023-11-28 14:51 ` Eli Zaretskii
       [not found]   ` <CAFA3qscyMGB4F19JhN6ZwpwKY8jjNkrqid7mitf5U5o4PUs2Kw@mail.gmail.com>
  0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2023-11-28 14:51 UTC (permalink / raw)
  To: Max Arnold; +Cc: 67510

> From: Max Arnold <arnold.maxim@gmail.com>
> Date: Tue, 28 Nov 2023 11:14:09 +0700
> 
> blacken-buffer (from https://github.com/pythonic-emacs/blacken/blob/master/blacken.el) hangs
> at accept-process-output C call if a Python code line length exceeds 1024 characters.

Did you try binding process-connection-type to nil around the call to
blacken-buffer?





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#67510: 29.1; macOS accept-process-output line length limit of 1024
       [not found]   ` <CAFA3qscyMGB4F19JhN6ZwpwKY8jjNkrqid7mitf5U5o4PUs2Kw@mail.gmail.com>
@ 2023-11-28 15:43     ` Eli Zaretskii
  2023-12-25 14:29       ` Stefan Kangas
  0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2023-11-28 15:43 UTC (permalink / raw)
  To: Max Arnold; +Cc: 67510

> From: Max Arnold <arnold.maxim@gmail.com>
> Date: Tue, 28 Nov 2023 22:22:31 +0700
> 
> Added one line to blacken.el and it looks like the problem is fixed:
> 
> ```
> (let ((process (make-process :name "blacken"
>                                  :command `(,blacken-executable ,@(blacken-call-args))
>                                  :buffer output-buffer
>                                  :stderr error-buffer
>                                  :noquery t
>                                  :connection-type 'pipe  ;;  <-- ADDED
>                                  :sentinel (lambda (process event)))))
> ```
> 
> Does it mean that the bug is not related to Emacs and I should file it against blacken? If so, sorry for
> the noise.

If blacken has no reason to use PTYs, and it can produce large volumes
of output from the process, then yes, it should use pipes for
communications with the sub-process.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#67510: 29.1; macOS accept-process-output line length limit of 1024
  2023-11-28 15:43     ` Eli Zaretskii
@ 2023-12-25 14:29       ` Stefan Kangas
  2023-12-25 15:08         ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Kangas @ 2023-12-25 14:29 UTC (permalink / raw)
  To: Eli Zaretskii, Max Arnold; +Cc: 67510

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Max Arnold <arnold.maxim@gmail.com>
>> Date: Tue, 28 Nov 2023 22:22:31 +0700
>>
>> Added one line to blacken.el and it looks like the problem is fixed:
>>
>> ```
>> (let ((process (make-process :name "blacken"
>>                                  :command `(,blacken-executable ,@(blacken-call-args))
>>                                  :buffer output-buffer
>>                                  :stderr error-buffer
>>                                  :noquery t
>>                                  :connection-type 'pipe  ;;  <-- ADDED
>>                                  :sentinel (lambda (process event)))))
>> ```
>>
>> Does it mean that the bug is not related to Emacs and I should file it against blacken? If so, sorry for
>> the noise.
>
> If blacken has no reason to use PTYs, and it can produce large volumes
> of output from the process, then yes, it should use pipes for
> communications with the sub-process.

So I guess this is a bug in blacken and not in Emacs?





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#67510: 29.1; macOS accept-process-output line length limit of 1024
  2023-12-25 14:29       ` Stefan Kangas
@ 2023-12-25 15:08         ` Eli Zaretskii
  2023-12-25 18:17           ` Stefan Kangas
  0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2023-12-25 15:08 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: 67510, arnold.maxim

> From: Stefan Kangas <stefankangas@gmail.com>
> Date: Mon, 25 Dec 2023 06:29:17 -0800
> Cc: 67510@debbugs.gnu.org
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> >> From: Max Arnold <arnold.maxim@gmail.com>
> >> Date: Tue, 28 Nov 2023 22:22:31 +0700
> >>
> >> Added one line to blacken.el and it looks like the problem is fixed:
> >>
> >> ```
> >> (let ((process (make-process :name "blacken"
> >>                                  :command `(,blacken-executable ,@(blacken-call-args))
> >>                                  :buffer output-buffer
> >>                                  :stderr error-buffer
> >>                                  :noquery t
> >>                                  :connection-type 'pipe  ;;  <-- ADDED
> >>                                  :sentinel (lambda (process event)))))
> >> ```
> >>
> >> Does it mean that the bug is not related to Emacs and I should file it against blacken? If so, sorry for
> >> the noise.
> >
> > If blacken has no reason to use PTYs, and it can produce large volumes
> > of output from the process, then yes, it should use pipes for
> > communications with the sub-process.
> 
> So I guess this is a bug in blacken and not in Emacs?

I think so, yes.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#67510: 29.1; macOS accept-process-output line length limit of 1024
  2023-12-25 15:08         ` Eli Zaretskii
@ 2023-12-25 18:17           ` Stefan Kangas
  0 siblings, 0 replies; 6+ messages in thread
From: Stefan Kangas @ 2023-12-25 18:17 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 67510, arnold.maxim

tags 67510 + notabug
close 67510
thanks

Eli Zaretskii <eliz@gnu.org> writes:

> I think so, yes.

OK, closing it as notabug.





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-12-25 18:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-28  4:14 bug#67510: 29.1; macOS accept-process-output line length limit of 1024 Max Arnold
2023-11-28 14:51 ` Eli Zaretskii
     [not found]   ` <CAFA3qscyMGB4F19JhN6ZwpwKY8jjNkrqid7mitf5U5o4PUs2Kw@mail.gmail.com>
2023-11-28 15:43     ` Eli Zaretskii
2023-12-25 14:29       ` Stefan Kangas
2023-12-25 15:08         ` Eli Zaretskii
2023-12-25 18:17           ` Stefan Kangas

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.