Function: majutsu-process--with-editor-open-file

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

Signature

(majutsu-process--with-editor-open-file PROCESS LINE)

Documentation

Return the file opened by with-editor control LINE from PROCESS.

Source Code

;; Defined in /nix/store/jagqw3nms546pad0gxi5f3wsckk6pji7-emacs-packages-deps/share/emacs/site-lisp/majutsu-process.el
(defun majutsu-process--with-editor-open-file (process line)
  "Return the file opened by with-editor control LINE from PROCESS."
  (save-match-data
    (when (string-match with-editor-sleeping-editor-regexp line)
      (let ((arg0 (match-string 2 line))
            (arg1 (match-string 3 line))
            (dir (match-string 4 line))
            file)
        (cond
         ((string-match "\\`\\+[0-9]+\\(?::[0-9]+\\)?\\'" arg0)
          (setq file arg1))
         (t
          (setq file arg0)))
        (when file
          (unless (file-name-absolute-p file)
            (setq file (expand-file-name file dir)))
          (when-let* ((root (and process (process-get process 'default-dir)))
                      (remote (file-remote-p root)))
            (setq file (concat remote file)))
          file)))))