Function: majutsu-process-file

majutsu-process-file is a natively compiled function defined in majutsu-process.el.

Signature

(majutsu-process-file PROGRAM &optional INFILE DESTINATION DISPLAY &rest ARGS)

Documentation

Run PROGRAM synchronously like process-file with Majutsu process defaults.

This centralizes subprocess environment and coding behavior for jj invocations. Unlike process-file, this implementation waits via accept-process-output, so Emacs can service subprocesses such as an Emacs-based GPG pinentry while jj is running.

Source Code

;; Defined in /nix/store/jagqw3nms546pad0gxi5f3wsckk6pji7-emacs-packages-deps/share/emacs/site-lisp/majutsu-process.el
(defun majutsu-process-file (program &optional infile destination display &rest args)
  "Run PROGRAM synchronously like `process-file' with Majutsu process defaults.

This centralizes subprocess environment and coding behavior for jj invocations.
Unlike `process-file', this implementation waits via
`accept-process-output', so Emacs can service subprocesses such as an
Emacs-based GPG pinentry while jj is running."
  (let ((process-environment (majutsu-process-environment args))
        (default-process-coding-system '(utf-8-unix . utf-8-unix)))
    (if (or display
            (eq destination 0)
            (not (majutsu--process-file-supported-p infile destination)))
        (apply #'process-file program infile destination display args)
      (apply #'majutsu--process-file-responsive
             program infile destination args))))