Function: ghostel--osc-progress

ghostel--osc-progress is a natively compiled function defined in ghostel.el.

Signature

(ghostel--osc-progress STATE-STR PROGRESS)

Documentation

Dispatch ConEmu OSC 9;4 progress to ghostel-progress-function.

STATE-STR is the state name as a string (sent from the native module); it is converted to a known symbol via an explicit allowlist to avoid polluting the obarray if a future Zig-side typo sneaks in. Unknown state strings are silently dropped. PROGRESS is an integer 0-100 or nil.

Source Code

;; Defined in /nix/store/1252krff0gb2kisjcpp45m50cpdskfrl-emacs-packages-deps/share/emacs/site-lisp/ghostel.el
(defun ghostel--osc-progress (state-str progress)
  "Dispatch ConEmu OSC 9;4 progress to `ghostel-progress-function'.
STATE-STR is the state name as a string (sent from the native
module); it is converted to a known symbol via an explicit allowlist
to avoid polluting the obarray if a future Zig-side typo sneaks in.
Unknown state strings are silently dropped.
PROGRESS is an integer 0-100 or nil."
  (when ghostel-progress-function
    (let ((state-sym (pcase state-str
                       ("remove"        'remove)
                       ("set"           'set)
                       ("error"         'error)
                       ("indeterminate" 'indeterminate)
                       ("pause"         'pause))))
      (when state-sym
        (condition-case err
            (funcall ghostel-progress-function state-sym progress)
          (error
           (message "ghostel: progress handler error: %s"
                    (error-message-string err))))))))