From b205f0199da99ec4338074291f58f8c0d54c1590 Mon Sep 17 00:00:00 2001 From: Howard Abrams Date: Thu, 18 Nov 2021 09:40:12 -0800 Subject: [PATCH] Refactored complicated literate with noweb refs This allows me not to worry about order when code is tangled, and instead allows the code to "pull" in named code blocks inside the `use-package` calls. --- ha-email.org | 22 +++++++++++----------- ha-org.org | 13 +++++++------ 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/ha-email.org b/ha-email.org index 675790a..2fb91a0 100644 --- a/ha-email.org +++ b/ha-email.org @@ -49,7 +49,7 @@ brew install notmuch Next, we need some basic configuration settings and some global keybindings: -#+BEGIN_SRC emacs-lisp +#+BEGIN_SRC emacs-lisp :noweb yes (use-package notmuch :init (setq mail-user-agent 'notmuch-user-agent @@ -67,10 +67,14 @@ Next, we need some basic configuration settings and some global keybindings: :bind (:map notmuch-hello-mode-map ("U" . notmuch-retrieve-messages) ; Defined later ("C" . notmuch-mua-new-mail)) + (:map notmuch-tree-mode-map + ("C" . notmuch-mua-new-mail)) :config (ha-leader ; Should I put these under an "m" heading? "a n" '("new mail" . notmuch-retrieve-messages) "a m" '("read mail" . notmuch) - "a c" '("compose mail" . notmuch-mua-new-mail))) + "a c" '("compose mail" . notmuch-mua-new-mail)) + <> + <>) #+END_SRC Also, let's do some basic configuration of Emacs' mail system: #+BEGIN_SRC emacs-lisp @@ -592,21 +596,17 @@ This means: #+END_SRC ** Bucket Keybindings -The bindings in =notmuch-tree-mode= make composing a new mail at the top-level easy: - -#+BEGIN_SRC emacs-lisp - (define-key notmuch-tree-mode-map (kbd "C") 'hey-notmuch-reply-later) -#+END_SRC - A series of keybindings to quickly send messages to one of the pre-defined buckets. The =notmuch-show-mode= is the ... uhm -#+BEGIN_SRC emacs-lisp +#+NAME: hey-show-keybindings +#+BEGIN_SRC emacs-lisp :tangle no (define-key notmuch-show-mode-map (kbd "C") 'hey-notmuch-reply-later) #+END_SRC The bindings in =notmuch-search-mode= are available when looking at a list of messages: -#+BEGIN_SRC emacs-lisp +#+NAME: hey-search-keybindings +#+BEGIN_SRC emacs-lisp :tangle no (define-key notmuch-search-mode-map (kbd "r") 'notmuch-search-reply-to-thread) (define-key notmuch-search-mode-map (kbd "R") 'notmuch-search-reply-to-thread-sender) (define-key notmuch-search-mode-map (kbd "/") 'notmuch-search-filter) @@ -657,7 +657,7 @@ A new option is to use [[https://github.com/jeremy-compostella/org-msg][org-msg] #+END_SRC The idea of linking org documents to email could be nice, however, the =ol-notmuch= package in the [[https://elpa.nongnu.org/nongnu/org-contrib.html][org-contrib]] package needs a maintainer. -#+BEGIN_SRC emacs-lisp +#+BEGIN_SRC emacs-lisp :tangle no (use-package ol-notmuch :after org :straight (:type built-in) diff --git a/ha-org.org b/ha-org.org index d9f40af..be9297b 100644 --- a/ha-org.org +++ b/ha-org.org @@ -42,8 +42,7 @@ Org is a /large/ complex beast with a gazillion settings, so I discuss these lat <> <> <> - <> - <>) + <>) #+END_SRC * Initialization Section Org is an important part of my Emacs world, and with a lot of customization (even though Spacemacs and Doom do a good job getting things started). @@ -330,10 +329,12 @@ Bindings specific to org files: #+END_SRC Oh, and we'll use [[https://github.com/abo-abo/ace-link][ace-link]] for quickly jumping: -#+NAME: ace-keybindings -#+BEGIN_SRC emacs-lisp :tangle no -(use-package ace-link - (define-key org-mode-map (kbd "M-o") 'ace-link-org)) + +#+BEGIN_SRC emacs-lisp + (use-package ace-link + :after org + :config + (define-key org-mode-map (kbd "s-o") 'ace-link-org)) #+END_SRC * Supporting Packages ** Exporters