Function: projectile-session--serialize-buffer
projectile-session--serialize-buffer is a byte-compiled function
defined in projectile.el.
Signature
(projectile-session--serialize-buffer BUFFER)
Documentation
Serialize BUFFER via the first matching entry of the serializer registry.
Return a cons (KIND . RECORD), or nil when no entry handles BUFFER. Each registry entry is tried in isolation: a matcher or serializer that errors, or that yields a non-readable record, is skipped rather than aborting the whole session save.
Source Code
;; Defined in ~/.emacs.d/elpa/projectile-20260820.1509/projectile.el
(defun projectile-session--serialize-buffer (buffer)
"Serialize BUFFER via the first matching entry of the serializer registry.
Return a cons (KIND . RECORD), or nil when no entry handles BUFFER.
Each registry entry is tried in isolation: a matcher or serializer that
errors, or that yields a non-readable record, is skipped rather than
aborting the whole session save."
(catch 'done
(dolist (entry projectile-session-buffer-serializers)
(ignore-errors
(let ((key (car entry))
(serialize (cadr entry)))
(when (projectile-session--buffer-matches-p key buffer)
(let ((record (with-current-buffer buffer (funcall serialize buffer))))
(when (and record (projectile-session--readable-p record))
(throw 'done
(cons (projectile-session--buffer-kind key buffer)
record))))))))
nil))