Function: org-persist--gc-orphan-p

org-persist--gc-orphan-p is a byte-compiled function defined in org-persist.el.gz.

Signature

(org-persist--gc-orphan-p)

Documentation

Return non-nil, when orphan files should be garbage-collected.

Remove current sessions from org-persist-gc-lock-file.

Source Code

;; Defined in /usr/src/emacs/lisp/org/org-persist.el.gz
(defun org-persist--gc-orphan-p ()
  "Return non-nil, when orphan files should be garbage-collected.
Remove current sessions from `org-persist-gc-lock-file'."
  (let* ((file (org-file-name-concat org-persist-directory org-persist-gc-lock-file))
         (alist (when (file-exists-p file) (org-persist--read-elisp-file file))))
    (setq alist (org-assoc-delete-all before-init-time alist))
    (org-persist--write-elisp-file file alist)
    ;; Only GC orphan files when there are no active sessions.
    (not alist)))