From dd004dea79ffb3be7a26585c9bbc529f83b48593 Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Sun, 1 Dec 2019 15:02:38 +0700 Subject: [PATCH] Easier creation of named workspaces When a user tries to switch to a named workspace that doesn't exist, creat it, instead of just failing. Signed-off-by: Rudi Grinberg --- modules/ui/workspaces/autoload/workspaces.el | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/modules/ui/workspaces/autoload/workspaces.el b/modules/ui/workspaces/autoload/workspaces.el index 7821c19af..be87f477a 100644 --- a/modules/ui/workspaces/autoload/workspaces.el +++ b/modules/ui/workspaces/autoload/workspaces.el @@ -318,9 +318,7 @@ end of the workspace list." (error "No workspace at #%s" (1+ index))) (+workspace-switch dest))) ((stringp index) - (unless (member index names) - (error "No workspace named %s" index)) - (+workspace-switch index)) + (+workspace-switch index t)) (t (error "Not a valid index: %s" index))) (unless (called-interactively-p 'interactive)