[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/workroom 23ff6f463e 53/74: Don't fail to restore if the wo
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/workroom 23ff6f463e 53/74: Don't fail to restore if the workroom project is non-existant |
Date: |
Sun, 27 Nov 2022 16:03:28 -0500 (EST) |
branch: elpa/workroom
commit 23ff6f463e7f33bec6c25ba57bb0c1b79df845a4
Author: Akib Azmain Turja <akib@disroot.org>
Commit: Akib Azmain Turja <akib@disroot.org>
Don't fail to restore if the workroom project is non-existant
---
workroom.el | 26 +++++++++++++++++---------
1 file changed, 17 insertions(+), 9 deletions(-)
diff --git a/workroom.el b/workroom.el
index dce77dadcc..7da26c6d8b 100644
--- a/workroom.el
+++ b/workroom.el
@@ -1913,15 +1913,23 @@ argument while setting as the buffer manager, PROJECT,
the project."
(cl-destructuring-bind (data buffers) args
(let ((project (project-current
nil (plist-get data :project-root))))
- (setf (workroom-buffer-manager-data room)
- `( :project ,project
- :whitelist ,(cl-set-difference
- buffers (project-buffers project))
- :blacklist ,(cl-delete-if
- #'null
- (mapcar
- #'get-buffer
- (plist-get data :blacklist))))))))))
+ (if project
+ (setf (workroom-buffer-manager-data room)
+ `( :project ,project
+ :whitelist ,(cl-set-difference
+ buffers (project-buffers project))
+ :blacklist ,(cl-delete-if
+ #'null
+ (mapcar
+ #'get-buffer
+ (plist-get data :blacklist)))))
+ ;; The project no longer exists, so hand over the buffers
+ ;; to the plain default manager.
+ (workroom-set-buffer-manager-function
+ room #'workroom--default-buffer-manager
+ 'do-not-initialize)
+ (workroom--default-buffer-manager
+ room :load data buffers)))))))
(defun workroom--project-name (project)
"Return a name for project PROJECT."
- [nongnu] elpa/workroom d4c499d81f 23/74: Fix the creation invalid workrooms in workroom-switch, (continued)
- [nongnu] elpa/workroom d4c499d81f 23/74: Fix the creation invalid workrooms in workroom-switch, ELPA Syncer, 2022/11/27
- [nongnu] elpa/workroom 92866534e9 25/74: Make lines less longer than 75 characters in README, ELPA Syncer, 2022/11/27
- [nongnu] elpa/workroom e9637846b5 27/74: Rewrite workroom to fix some long-standing problems, ELPA Syncer, 2022/11/27
- [nongnu] elpa/workroom df98158320 54/74: Bump version to 2.0.3, ELPA Syncer, 2022/11/27
- [nongnu] elpa/workroom b81e76e0a3 48/74: Bump version to 2.0.1, ELPA Syncer, 2022/11/27
- [nongnu] elpa/workroom 9db06cc7e7 46/74: Bump version to 2.0, ELPA Syncer, 2022/11/27
- [nongnu] elpa/workroom 5def9e5862 73/74: Ignore texinfo.tex while preparing release, ELPA Syncer, 2022/11/27
- [nongnu] elpa/workroom 827dcd2049 55/74: Fix cloning default workroom, ELPA Syncer, 2022/11/27
- [nongnu] elpa/workroom 895b77f7ce 62/74: Some refactoring, ELPA Syncer, 2022/11/27
- [nongnu] elpa/workroom 4dbc8b5822 69/74: Fix code injection to desktop file, ELPA Syncer, 2022/11/27
- [nongnu] elpa/workroom 23ff6f463e 53/74: Don't fail to restore if the workroom project is non-existant,
ELPA Syncer <=
- [nongnu] elpa/workroom a1f5cc9754 52/74: Make the workroom custom group part of tools group, ELPA Syncer, 2022/11/27
- [nongnu] elpa/workroom 3b7b17e2cc 72/74: Bump version to 2.2.4, ELPA Syncer, 2022/11/27
- [nongnu] elpa/workroom c50e7219a0 07/74: Make README Codeberg compatible, ELPA Syncer, 2022/11/27
- [nongnu] elpa/workroom 31eabf2547 21/74: Add some comments for explaining the code, ELPA Syncer, 2022/11/27
- [nongnu] elpa/workroom 64b465093e 20/74: Make line no more wide than 75 characters, ELPA Syncer, 2022/11/27
- [nongnu] elpa/workroom 6d159a5566 24/74: Use `string=' to compare workroom and view names, ELPA Syncer, 2022/11/27
- [nongnu] elpa/workroom a4845ad57f 44/74: Don't switch room in workroom-switch if ROOM is current, ELPA Syncer, 2022/11/27
- [nongnu] elpa/workroom 4c4fd7830c 34/74: Add Winner integration, ELPA Syncer, 2022/11/27
- [nongnu] elpa/workroom e7dc14236e 42/74: Fix out of sync documentation, ELPA Syncer, 2022/11/27
- [nongnu] elpa/workroom 3144324e33 39/74: Add an user manual, ELPA Syncer, 2022/11/27