Function: treemacs--read-persist-lines

treemacs--read-persist-lines is a byte-compiled function defined in treemacs-persistence.el.

Signature

(treemacs--read-persist-lines &optional TXT)

Documentation

Read the relevant lines from given TXT or treemacs-persist-file.

Will read all lines, except those that start with # or contain only whitespace.

Source Code

;; Defined in ~/.emacs.d/elpa/treemacs-20251226.1307/treemacs-persistence.el
(defun treemacs--read-persist-lines (&optional txt)
  "Read the relevant lines from given TXT or `treemacs-persist-file'.
Will read all lines, except those that start with # or contain only whitespace."
  (-some->> (or txt (when (file-exists-p treemacs-persist-file)
                      (with-temp-buffer
                        (insert-file-contents treemacs-persist-file)
                        (buffer-string))))
            (s-trim)
            (s-lines)
            (--reject (or (s-blank-str? it)
                          (s-starts-with? "#" it)))))