GNU bug report logs - #79442
RFE: process-lines equivalent for NUL-separated output

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: wishlist; Reported by: Tim Landscheidt <tim@HIDDEN>; dated Sat, 13 Sep 2025 11:28:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 13 Sep 2025 11:27:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Sep 13 07:27:53 2025
Received: from localhost ([127.0.0.1]:54052 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1uxOQ5-0004m9-5b
	for submit <at> debbugs.gnu.org; Sat, 13 Sep 2025 07:27:53 -0400
Received: from lists.gnu.org ([2001:470:142::17]:52924)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <tim@HIDDEN>)
 id 1uxOQ2-0004l2-Q1
 for submit <at> debbugs.gnu.org; Sat, 13 Sep 2025 07:27:51 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <tim@HIDDEN>)
 id 1uxOPu-0004P9-ON
 for bug-gnu-emacs@HIDDEN; Sat, 13 Sep 2025 07:27:42 -0400
Received: from gavdos.tim-landscheidt.de ([2a01:4f8:1c0c:4bd6::1])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <tim@HIDDEN>)
 id 1uxOPs-00051P-Pa
 for bug-gnu-emacs@HIDDEN; Sat, 13 Sep 2025 07:27:42 -0400
Received: from port-62-145-29-194.static.as20676.net ([62.145.29.194]:39218
 helo=vagabond) by gavdos.tim-landscheidt.de with esmtpsa (TLS1.3) tls
 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96)
 (envelope-from <tim@HIDDEN>) id 1uxOPn-0078Kp-3D
 for bug-gnu-emacs@HIDDEN; Sat, 13 Sep 2025 11:27:36 +0000
From: Tim Landscheidt <tim@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: RFE: process-lines equivalent for NUL-separated output
Organization: https://www.tim-landscheidt.de/
X-Debbugs-Cc: 
Date: Sat, 13 Sep 2025 11:27:34 +0000
Message-ID: <87ldmiwq1l.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: pass client-ip=2a01:4f8:1c0c:4bd6::1;
 envelope-from=tim@HIDDEN; helo=gavdos.tim-landscheidt.de
X-Spam_score_int: -18
X-Spam_score: -1.9
X-Spam_bar: -
X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.9 (/)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.1 (/)

Severity: wishlist

The function process-lines executes a program and returns
the lines of its output as a list.  However using newlines
as output separators is prone to errors, and therefore many
programs support using NUL (?\C-@) to separate their output.

Currently, with Emacs one needs to use constructs like:

| (split-string
|  (shell-command-to-string
|   (concat "foo "
|           (shell-quote-argument "bar baz")))
|  "\0"
|  t)

It would be nice if Emacs shipped a function so that the
above could be rewritten as:

| (process-output "foo" "bar baz")




Acknowledgement sent to Tim Landscheidt <tim@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#79442; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sat, 13 Sep 2025 11:30:08 UTC

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