Function: treemacs--write-error-persist-state
treemacs--write-error-persist-state is a byte-compiled function
defined in treemacs-persistence.el.
Signature
(treemacs--write-error-persist-state LINES ERROR)
Documentation
Write broken state LINES and ERROR to treemacs-last-error-persist-file.
Source Code
;; Defined in ~/.emacs.d/elpa/treemacs-20251226.1307/treemacs-persistence.el
(defun treemacs--write-error-persist-state (lines error)
"Write broken state LINES and ERROR to `treemacs-last-error-persist-file'."
(-let [txt (concat (format "# State when last error occurred on %s\n" (format-time-string "%F %T"))
(format "# Error was %s\n\n" error)
(apply #'concat (--map (concat it "\n") lines)))]
(unless (file-exists-p treemacs-last-error-persist-file)
(make-directory (file-name-directory treemacs-last-error-persist-file) :with-parents))
(write-region txt nil treemacs-last-error-persist-file nil :silent)))