Function: projectile-session--write

projectile-session--write is a byte-compiled function defined in projectile.el.

Signature

(projectile-session--write ROOT DATA)

Documentation

Write session DATA for project ROOT, creating the session directory.

Return non-nil only when the file was actually written, so callers don't report success for an unwritable session directory. Binds print-circle so shared or circular structure in a record can't hang the write.

Source Code

;; Defined in ~/.emacs.d/elpa/projectile-20260820.1509/projectile.el
(defun projectile-session--write (root data)
  "Write session DATA for project ROOT, creating the session directory.
Return non-nil only when the file was actually written, so callers don't
report success for an unwritable session directory.  Binds `print-circle'
so shared or circular structure in a record can't hang the write."
  (let ((file (projectile-session--file root)))
    (ignore-errors (make-directory (file-name-directory file) t))
    (and (file-writable-p file)
         (progn
           (let ((print-circle t))
             (projectile-serialize data file))
           (file-exists-p file)))))