feat(notmuch): use a different workspace name

The workspace name *notmuch* is more consistent with Doom's other app
workspace names like *mu4e* and *rss*.
This commit is contained in:
Antonio Ruiz 2022-08-31 14:39:13 -04:00 committed by Henrik Lissner
parent b2154b5f9b
commit 3f9e62dab7

View file

@ -1,5 +1,8 @@
;;; email/notmuch/autoload.el -*- lexical-binding: t; -*- ;;; email/notmuch/autoload.el -*- lexical-binding: t; -*-
(defvar +notmuch-workspace-name "*notmuch*"
"Name of the workspace created by `=notmuch', dedicated to notmuch.")
;;;###autoload ;;;###autoload
(defun =notmuch () (defun =notmuch ()
"Activate (or switch to) `notmuch' in its workspace." "Activate (or switch to) `notmuch' in its workspace."
@ -7,7 +10,7 @@
(condition-case-unless-debug e (condition-case-unless-debug e
(progn (progn
(when (modulep! :ui workspaces) (when (modulep! :ui workspaces)
(+workspace-switch "*MAIL*" t)) (+workspace-switch +notmuch-workspace-name t))
(if-let* ((win (cl-find-if (lambda (it) (string-match-p "^\\*notmuch" (buffer-name (window-buffer it)))) (if-let* ((win (cl-find-if (lambda (it) (string-match-p "^\\*notmuch" (buffer-name (window-buffer it))))
(doom-visible-windows)))) (doom-visible-windows))))
(select-window win) (select-window win)