diff --git a/README.org b/README.org index 03070c6..08e618b 100644 --- a/README.org +++ b/README.org @@ -449,6 +449,28 @@ by experienced Emacs users. ;; Finally, switch to that window. (other-window 1))))) #+end_src + +** [[info:elisp#Processes][Processes (info)]] +:PROPERTIES: +:CUSTOM_ID: sec:processes +:END: + +Listing [[lst:process-utilities]] defines a function to run a (command-line) program +with arguments and to obtain a list with its numeric exit status as well as its +output to =stdout=. + +#+caption[Process utilities]: +#+caption: Process utilities. +#+name: lst:process-utilities +#+begin_src emacs-lisp + ;; https://gitlab.com/howardabrams/spacemacs.d/blob/master/layers/ha-org/funcs.el#L418 + (defun shell-command-with-exit-code (program &rest args) + "Run PROGRAM with ARGS and return exit-code and output in a list." + (with-temp-buffer + (list (apply 'call-process program nil (current-buffer) nil args) + (buffer-string)))) +#+end_src + * [[info:emacs#Package Installation][Install the selected packages (info)]] :PROPERTIES: :CUSTOM_ID: sec:install-selected-packages