Skip to content

Commit

Permalink
[Persistence] Don't validate that a project exists if it is ignored.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander-Miller committed Feb 14, 2024
1 parent cda980b commit 025b7ce
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/elisp/treemacs-customization.el
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,12 @@ Can be set to nil to disable workspace persistence."
"Action to perform when a persisted project is not found on the disk.
If the project is not found, the project can either be kept in the project list,
or removed from it. If the project is removed, when projects are persisted, the
missing project will not appear in the project list next time Emacs is started."
missing project will not appear in the project list next time Emacs is started.
Possible values are:
- `ask'
- `remove'
- `keep'"
:type '(choice (const :tag "Ask whether to remove" ask)
(const :tag "Remove without asking" remove)
(const :tag "Keep without asking" keep))
Expand Down
1 change: 1 addition & 0 deletions src/elisp/treemacs-persistence.el
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ PROJ-COUNT: Int"
;; `treemacs-missing-project-action'. Remote files are skipped to avoid opening
;; Tramp connections.
(treemacs-return-if (and (string= treemacs--org-edit-buffer-name (buffer-name))
(not (s-starts-with? "** COMMENT" prev))
(not (file-remote-p path))
(not (file-exists-p path)))
`(error ,line ,(format (as-warning "File '%s' does not exist") (propertize path 'face 'font-lock-string-face))))
Expand Down

0 comments on commit 025b7ce

Please sign in to comment.