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

Previous Next

Package: emacs;

Reported by: Tim Landscheidt <tim <at> tim-landscheidt.de>

Date: Sat, 13 Sep 2025 11:28:02 UTC

Severity: wishlist

Full log


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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Tim Landscheidt <tim <at> tim-landscheidt.de>
Cc: 79442 <at> debbugs.gnu.org
Subject: Re: bug#79442: RFE: process-lines equivalent for NUL-separated output
Date: Sat, 13 Sep 2025 14:51:30 +0300
> From: Tim Landscheidt <tim <at> tim-landscheidt.de>
> Date: Sat, 13 Sep 2025 11:27:34 +0000
> 
> 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")

So you want process-lines to call split-string for you (given some
optional argument)?




This bug report was last modified 5 days ago.

Previous Next


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