Function: project-remember-project
project-remember-project is an autoloaded, interactive and
byte-compiled function defined in project.el.gz.
Signature
(project-remember-project PR &optional NO-WRITE STABLE)
Documentation
Add project PR to the front of the project list.
If project PR satisfies project-list-exclude, then nothing is done.
Save the result in project-list-file if the list of projects
has changed.
When called from Lisp, optional argument NO-WRITE non-nil means to
suppress saving project-list-file.
Optional argument STABLE means don't move PR to the front of the project
list if it's already present further down the project list.
Probably introduced at or before Emacs version 31.1.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/project.el.gz
;;;###autoload
(defun project-remember-project (pr &optional no-write stable)
"Add project PR to the front of the project list.
If project PR satisfies `project-list-exclude', then nothing is done.
Save the result in `project-list-file' if the list of projects
has changed.
When called from Lisp, optional argument NO-WRITE non-nil means to
suppress saving `project-list-file'.
Optional argument STABLE means don't move PR to the front of the project
list if it's already present further down the project list."
(interactive (list (project-current t)))
(let ((root (project-root pr))
(interact (called-interactively-p 'any)))
(if (seq-some (lambda (r)
(if (functionp r)
(funcall r pr)
(string-match-p r root)))
project-list-exclude)
(when interact
(message "Current project is blacklisted!"))
(project--remember-dir root no-write stable)
(when interact
(message "Current project remembered")))))