Function: projection--shell-command-to-string-1

projection--shell-command-to-string-1 is a natively compiled function defined in projection-utils.el.

Signature

(projection--shell-command-to-string-1 COMMAND)

Documentation

Run COMMAND in a subshell and return (stdout . stderr).

Source Code

;; Defined in /nix/store/j6y921qbdmdqxjnd43iibapbig3p4hai-emacs-packages-deps/share/emacs/site-lisp/elpa/projection-20260614.1822/projection-utils.el
(defun projection--shell-command-to-string-1 (command)
  "Run COMMAND in a subshell and return (stdout . stderr)."
  (let ((stderr-buffer (generate-new-buffer " *projection-stderr*" 'inhibit-buffer-hooks)))
    (unwind-protect
        (cons
         (with-output-to-string
           (with-current-buffer standard-output
             (save-window-excursion
               (shell-command command standard-output stderr-buffer))))

         (with-current-buffer stderr-buffer
           (buffer-substring-no-properties (point-min) (point-max))))
      (kill-buffer stderr-buffer))))