diff --git a/.emacs.d/mail.el b/.emacs.d/mail.el index 1f96fda..f79bcc4 100644 --- a/.emacs.d/mail.el +++ b/.emacs.d/mail.el @@ -22,7 +22,7 @@ (my-leader-def :infix "am" "" '(:which-key "notmuch") - "m" 'notmuch) + "m" (my/command-in-persp "notmuch" "mail" 0 (notmuch))) (setq notmuch-saved-searches '((:name "drafts" :query "tag:draft") @@ -42,20 +42,20 @@ (my-leader-def :infix "am" "t" '(:which-key "thexcloud@gmail.com") - "ti" '((lambda () (interactive) (notmuch-search "tag:main AND tag:inbox")) :which-key "inbox") - "tu" '((lambda () (interactive) (notmuch-search "tag:main AND tag:unread")) :which-key "unread") - "ts" '((lambda () (interactive) (notmuch-search "tag:main AND tag:sent")) :which-key "sent") - "ta" '((lambda () (interactive) (notmuch-search "tag:main")) :which-key "all mail") + "ti" (my/command-in-persp "tag:main AND tag:inbox" "mail" 0 (notmuch-search "inbox")) + "tu" (my/command-in-persp "tag:main AND tag:unread" "mail" 0 (notmuch-search "unread")) + "ts" (my/command-in-persp "tag:main AND tag:sent" "mail" 0 (notmuch-search "sent")) + "ta" (my/command-in-persp "tag:main" "mail" 0 (notmuch-search "all mail")) "p" '(:which-key "progin6304@gmail.com") - "pi" '((lambda () (interactive) (notmuch-search "tag:progin AND tag:inbox")) :which-key "inbox") - "pu" '((lambda () (interactive) (notmuch-search "tag:progin AND tag:unread")) :which-key "unread") - "ps" '((lambda () (interactive) (notmuch-search "tag:progin AND tag:sent")) :which-key "sent") - "pa" '((lambda () (interactive) (notmuch-search "tag:progin")) :which-key "all mail") + "pi" (my/command-in-persp "tag:progin AND tag:inbox" "mail" 0 (notmuch-search "inbox")) + "pu" (my/command-in-persp "tag:progin AND tag:unread" "mail" 0 (notmuch-search "unread")) + "ps" (my/command-in-persp "tag:progin AND tag:sent" "mail" 0 (notmuch-search "sent")) + "pa" (my/command-in-persp "tag:progin" "mail" 0 (notmuch-search "all mail")) "e" '(:which-key "pvkorytov@etu.ru") - "ei" '((lambda () (interactive) (notmuch-search "tag:pvkorytov AND tag:inbox")) :which-key "inbox") - "eu" '((lambda () (interactive) (notmuch-search "tag:pvkorytov AND tag:unread")) :which-key "unread") - "es" '((lambda () (interactive) (notmuch-search "tag:pvkorytov AND tag:sent")) :which-key "sent") - "ea" '((lambda () (interactive) (notmuch-search "tag:pvkorytov")) :which-key "all mail")) + "ei" (my/command-in-persp "tag:pvkorytov AND tag:inbox" "mail" 0 (notmuch-search "inbox")) + "eu" (my/command-in-persp "tag:pvkorytov AND tag:unread" "mail" 0 (notmuch-search "unread")) + "es" (my/command-in-persp "tag:pvkorytov AND tag:sent" "mail" 0 (notmuch-search "sent")) + "ea" (my/command-in-persp "tag:pvkorytov" "mail" 0 (notmuch-search "all mail"))) (with-eval-after-load 'notmuch (add-hook 'message-setup-hook 'mml-secure-sign-pgpmime)) diff --git a/Desktop.org b/Desktop.org index 2772bfa..835bd12 100644 --- a/Desktop.org +++ b/Desktop.org @@ -562,11 +562,11 @@ Also other local keybindings, that are also available only in =line-mode=: (general-define-key :keymaps '(exwm-mode-map) - "C-q" 'exwm-input-send-next-key + "C-q" #'exwm-input-send-next-key "" (my/app-command "flameshot gui") - " s-" 'perspective-exwm-cycle-exwm-buffers-backward - " s-" 'perspective-exwm-cycle-exwm-buffers-forward - "M-x" 'counsel-M-x + " s-" #'perspective-exwm-cycle-exwm-buffers-backward + " s-" #'perspective-exwm-cycle-exwm-buffers-forward + "M-x" #'counsel-M-x "M-SPC" (general-key "SPC")) #+end_src diff --git a/Emacs.org b/Emacs.org index f069c8b..8dffb7f 100644 --- a/Emacs.org +++ b/Emacs.org @@ -3535,7 +3535,7 @@ So there we have a minor mode that overrides this behavior. (advice-add 'jupyter-org-scalar :around #'my/jupyter-org-scalar-around) #+end_src *** Wrap source code output -A function to remove :RESULTS: drawer from the results. Once again, necessary because emacs-jupyter doesn't seem to respect :results raw. +A function to remove the :RESULTS: drawer from results. Once again, it's necessary because emacs-jupyter doesn't seem to respect =:results raw=. #+begin_src emacs-lisp (defun my/org-strip-results (data) (replace-regexp-in-string ":\\(RESULTS\\|END\\):\n" "" data)) @@ -3543,10 +3543,10 @@ A function to remove :RESULTS: drawer from the results. Once again, necessary be And an all-in-one function to: - prepend =#+NAME:= and =#+CAPTION:= to the source block output. Useful if the output is an image. -- strip :RESULTS: drawer from the output, if necessary +- strip the :RESULTS: drawer from the output, if necessary - wrap results in the =src= block -As for now, looks sufficient to format source code outputs to get a tolerable LaTeX. +As for now, it looks sufficient to format source code outputs to get a tolerable LaTeX. #+begin_src emacs-lisp (defun my/org-caption-wrap (data &optional name caption attrs strip-drawer src-wrap) @@ -5048,22 +5048,13 @@ A bunch of functions for managing dotfiles with yadm. *** Open Emacs config #+begin_src emacs-lisp -(defun my/edit-configuration () - "Open the init file." - (interactive) - (find-file "~/Emacs.org")) +(general-define-key + "C-c c" (my/command-in-persp "Emacs.org" "conf" 1 (find-file "~/Emacs.org"))) -;; (defun my/edit-exwm-configuration () -;; "Open the exwm config file." -;; (interactive) -;; (find-file "~/.emacs.d/exwm.org")) - -(general-define-key "C-c c" 'my/edit-configuration) -;; (general-define-key "C-c C" 'my/edit-exwm-configuration) (my-leader-def :infix "c" "" '(:which-key "configuration") - "c" 'my/edit-configuration) + "c" (my/command-in-persp "Emacs.org" "conf" 1 (find-file "~/Emacs.org"))) #+end_src *** Open Magit for yadm Idea: @@ -5102,8 +5093,14 @@ Open a file managed by yadm. (split-string (shell-command-to-string "yadm ls-files $HOME --full-name") "\n"))))) -(general-define-key "C-c f" 'my/open-yadm-file) -(my-leader-def "cf" 'my/open-yadm-file) +(general-define-key + "C-c f" (my/command-in-persp + "yadm file" "conf" 1 + (my/open-yadm-file))) +(my-leader-def + "cf" (my/command-in-persp + "yadm file" "conf" 1 + (my/open-yadm-file))) #+end_src ** Internet & Multimedia *** Notmuch