diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2022-05-12 13:40:04 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2022-05-12 13:44:16 -0700 |
commit | e2b635cdb1a7ea738e391f8ce81a9ee39222a51b (patch) | |
tree | b811d5e6713f6fba6bb4e9c372900f2310b6feb4 /.emacs.d | |
parent | 76214e6b9e78f4853f8970069a1720f58dd2d6cd (diff) | |
download | dotfiles-e2b635cdb1a7ea738e391f8ce81a9ee39222a51b.tar.gz |
tidy up some Emacs package settings
Diffstat (limited to '.emacs.d')
-rw-r--r-- | .emacs.d/init.el | 81 |
1 files changed, 39 insertions, 42 deletions
diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 50ab0cdb..c683db68 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -199,6 +199,9 @@ windows side-by-side in the frame." '(magit-diff-refine-hunk 'all) '(magit-save-repository-buffers nil) '(mail-user-agent 'notmuch-user-agent) + '(mailscripts-detach-head-from-existing-branch 'ask) + '(mailscripts-extract-patches-branch-prefix "mail/") + '(mailscripts-project-library 'project) '(message-citation-line-format "On %a %d %b %Y at %I:%M%p %Z, %N wrote:\12") '(message-citation-line-function 'message-insert-formatted-citation-line) '(message-kill-buffer-on-exit t) @@ -225,6 +228,7 @@ windows side-by-side in the frame." '(notmuch-show-all-tags-list t) '(notmuch-show-insert-text/plain-hook '(notmuch-wash-convert-inline-patch-to-part notmuch-wash-wrap-long-lines notmuch-wash-tidy-citations notmuch-wash-elide-blank-lines notmuch-wash-excerpt-citations)) + '(nov-text-width 78) '(org-adapt-indentation t nil nil "Sometimes set to nil in .dir-locals.el, e.g. in ~/doc/newpapers.") '(org-agenda-entry-text-maxlines 3) '(org-agenda-files "~/doc/emacs-org-agenda-files") @@ -2652,15 +2656,15 @@ to open them using `spw/try-external-open'") ;; populated etc. when I invoke certain commands soon after starting Emacs. (dolist (cmd '(compose-mail notmuch-jump-search notmuch-hello compose-mail-other-window compose-mail-other-frame)) - (advice-add cmd :before (lambda (&rest ignore) (require 'notmuch)))) + (advice-add cmd :before (lambda (&rest ignore) (require 'notmuch))))) - ;; An alternative would be just to bind `notmuch-hello' to C-c m, as s, j - ;; and <f9> have appropriate bindings in `notmuch-hello-mode' such that the - ;; following complete sequences would still call their associated commands. - (global-set-key "\C-cms" #'notmuch-search) - (global-set-key "\C-cmj" #'notmuch-jump-search) - (global-set-key "\C-cmm" #'notmuch-hello) - (global-set-key [?\C-c ?m f9] #'spw/next-unread-group)) +;; An alternative would be just to bind `notmuch-hello' to C-c m, as s, j +;; and <f9> have appropriate bindings in `notmuch-hello-mode' such that the +;; following complete sequences would still call their associated commands. +(global-set-key "\C-cms" #'notmuch-search) +(global-set-key "\C-cmj" #'notmuch-jump-search) +(global-set-key "\C-cmm" #'notmuch-hello) +(global-set-key [?\C-c ?m f9] #'spw/next-unread-group) (with-eval-after-load 'notmuch (require 'notmuch) (require 'notmuch-hello) (require 'notmuch-message) @@ -3199,9 +3203,9 @@ scroll through them." (spw/when-library-available magit ;; Ensure we add magit to project-prefix-map and project-switch-commands as ;; soon as a project.el command is invoked. - (eval-after-load 'project '(require 'magit)) + (eval-after-load 'project '(require 'magit))) - (global-set-key "\C-cgg" #'magit-file-dispatch)) +(global-set-key "\C-cgg" #'magit-file-dispatch) (spw/reclaim-keys-from magit magit-mode-map "\M-w") (with-eval-after-load 'magit @@ -3244,10 +3248,9 @@ scroll through them." ;; but chances are someday I'll want to use that obscure markdown-mode feature (setq ws-butler-global-exempt-modes '(markdown-mode message-mode)) -(spw/when-library-available redtick - (global-set-key "\C-cP" #'redtick) - (global-set-key "\C-cgP" #'redtick-mode) - (setq redtick-history-file nil)) +(global-set-key "\C-cP" #'redtick) +(global-set-key "\C-cgP" #'redtick-mode) +(setq redtick-history-file nil) ;; Insert a copy of the timer earlier in the mode line for when the standard ;; one is pushed out of visibility by a long buffer name in a narrow window. @@ -3291,26 +3294,22 @@ scroll through them." #'org-d20-d20))))) (spw/when-library-available nov - (add-to-list 'auto-mode-alist '("\\.epub\\'" . nov-mode)) - (setq nov-text-width 78)) - -(spw/when-library-available mailscripts - (global-set-key "\C-cvt" #'notmuch-extract-thread-patches-to-project) - (global-set-key "\C-cvw" #'notmuch-extract-message-patches-to-project) - (global-set-key "\C-cgb" #'notmuch-slurp-debbug) - (global-set-key "\C-cgB" #'notmuch-slurp-this-debbug) - (setq mailscripts-extract-patches-branch-prefix "mail/" - mailscripts-detach-head-from-existing-branch 'ask - mailscripts-project-library 'project)) + (add-to-list 'auto-mode-alist '("\\.epub\\'" . nov-mode))) + +(global-set-key "\C-cvt" #'notmuch-extract-thread-patches-to-project) +(global-set-key "\C-cvw" #'notmuch-extract-message-patches-to-project) +(global-set-key "\C-cgb" #'notmuch-slurp-debbug) +(global-set-key "\C-cgB" #'notmuch-slurp-this-debbug) + +(setq ggtags-mode-line-project-name nil) (spw/when-library-available ggtags - (setq ggtags-mode-line-project-name nil) (dolist (hook '(cperl-mode-hook c-mode-hook)) (add-hook hook #'ggtags-mode))) -(spw/when-library-available org-roam - (setq org-roam-v2-ack t) +(setq org-roam-v2-ack t) +(spw/when-library-available org-roam (dolist (fn '(org-roam-dailies-goto-next-note org-roam-dailies-goto-previous-note)) (autoload fn "org-roam-dailies")) @@ -3359,10 +3358,9 @@ scroll through them." (dolist (hook '(html-mode-hook css-mode-hook)) (add-hook hook 'rainbow-mode))) -(spw/when-library-available ebib - (setq ebib-preload-bib-files (list (expand-file-name "~/doc/spw.bib")) - ebib-index-display-fields '(title) - ebib-save-xrefs-first t)) +(setq ebib-preload-bib-files (list (expand-file-name "~/doc/spw.bib")) + ebib-index-display-fields '(title) + ebib-save-xrefs-first t) (with-eval-after-load 'ebib (setq ebib-hidden-fields (delete "translator" ebib-hidden-fields))) @@ -3399,18 +3397,18 @@ scroll through them." bongo-default-directory (expand-file-name default-directory)) (bongo-dired-library-mode 1)))) -(spw/when-library-available bongo - (setq bongo-default-directory (expand-file-name "~/annex/music/") - bongo-prefer-library-buffers nil - bongo-insert-whole-directory-trees t) +(setq bongo-default-directory (expand-file-name "~/annex/music/") + bongo-prefer-library-buffers nil + bongo-insert-whole-directory-trees t) + +;; follow with 'h' to get to dired browse +(global-set-key "\C-cM" #'bongo-playlist) +(spw/when-library-available bongo ;; at first launch, ensure a buffer with `bongo-dired-library-mode' exists, ;; so 'h' takes us there, rather than to a library buffer (advice-add 'bongo-default-playlist-buffer :before #'spw/make-bongo-dired) - ;; follow with 'h' to get to dired browse - (global-set-key "\C-cM" #'bongo-playlist) - ;; apparently bongo-dired-library-mode can interfere with wdired, so toggle (add-hook 'dired-mode-hook #'spw/maybe-activate-or-deactivate-bongo-dired-library-mode) @@ -3419,9 +3417,8 @@ scroll through them." (advice-add 'wdired-change-to-dired-mode :after #'spw/maybe-activate-or-deactivate-bongo-dired-library-mode)) -(spw/when-library-available volume - ;; 'v' again to exit - (global-set-key "\C-cgv" #'volume)) +;; 'v' again to exit +(global-set-key "\C-cgv" #'volume) (defun spw/disable-gnutls-verify (&rest ignore) (setq-local gnutls-verify-error nil)) |