diff options
Diffstat (limited to 'custom')
-rw-r--r-- | custom/jao-custom-completion.el | 7 | ||||
-rw-r--r-- | custom/jao-custom-eww.el | 34 | ||||
-rw-r--r-- | custom/jao-custom-exwm.el | 9 | ||||
-rw-r--r-- | custom/jao-custom-gnus.el | 300 | ||||
-rw-r--r-- | custom/jao-custom-notmuch.el | 13 | ||||
-rw-r--r-- | custom/jao-custom-org.el | 6 |
6 files changed, 210 insertions, 159 deletions
diff --git a/custom/jao-custom-completion.el b/custom/jao-custom-completion.el index b44f9b6..490fd65 100644 --- a/custom/jao-custom-completion.el +++ b/custom/jao-custom-completion.el @@ -87,7 +87,7 @@ (funcall fun lines) (move-overlay vertico--candidates-ov (point-min) (point-min)) (overlay-put vertico--candidates-ov 'after-string (apply #'concat lines)) - (vertico--resize-window (length lines)))) + (vertico--resize))) (advice-add 'vertico--display-candidates :around #'jao-vertico--display)) @@ -107,7 +107,7 @@ :ensure t :bind (("C-x M-:" . consult-complex-command) ("C-x b" . consult-buffer) - ("C-x C-b" . consult-buffer) + ("C-x C-b" . switch-to-buffer) ("C-x 4 b" . consult-buffer-other-window) ("C-c b" . project-find-file) ("C-c h" . nil) @@ -126,8 +126,7 @@ ("M-g e" . consult-error) ("M-s m" . consult-multi-occur) ("M-y" . consult-yank-pop) - ("C-s" . isearch-forward) - ("<help> a" . consult-apropos)) + ("C-s" . isearch-forward)) :custom ((consult-preview-key (kbd "`"))) diff --git a/custom/jao-custom-eww.el b/custom/jao-custom-eww.el index 0409fc5..1b766c9 100644 --- a/custom/jao-custom-eww.el +++ b/custom/jao-custom-eww.el @@ -116,16 +116,17 @@ ;;; eww to org (defun jao-eww-to-org (&optional dest) - (interactive) - (unless (org-region-active-p) + (interactive "P") + (unless (or (and (interactive-p) dest) (org-region-active-p)) (let ((shr-width 80)) (eww-readable))) - (let* ((start (if (org-region-active-p) (region-beginning) (point-min))) + (let* ((dest (unless (interactive-p) dest)) + (start (if (org-region-active-p) (region-beginning) (point-min))) (end (if (org-region-active-p) (region-end) (point-max))) - (buff (or dest (generate-new-buffer "*eww-to-org*"))) (link (eww-current-url)) - (title (or (plist-get eww-data :title) ""))) + (title (plist-get eww-data :title)) + (buff (save-current-buffer (or dest (jao-org-notes-create title))))) (with-current-buffer buff - (insert "#+title: " title "\n#+link: " link "\n\n") + (insert "#+link: " link "\n\n") (org-mode)) (save-excursion (goto-char start) @@ -183,6 +184,15 @@ It should be the title of the web page as returned by `rdrview'" (if eww-rdrview-mode (eww-rdrview-mode -1) (eww-rdrview-mode 1)) (eww-reload)) +;;; auto-readable +(defvar jao-eww-auto-readable-urls + (regexp-opt '("guardian.co.uk" "theguardian.com" "github.com" "eldiario.es"))) + +(defun jao-eww-autoread () + (when (string-match-p jao-eww-auto-readable-urls (or (eww-current-url))) + (eww-readable))) + +(add-hook 'eww-after-render-hook #'jao-eww-autoread) ;;; package (use-package shr :custom ((shr-width nil) @@ -201,10 +211,11 @@ It should be the title of the web page as returned by `rdrview'" (eww-header-line-format " %u") (eww-form-checkbox-selected-symbol "☒") (eww-buffer-name-length 180) - (eww-readable-urls '("guardian\\.co\\.uk" - "theguardian\\.com" - "eldiario\\.es" - "theconversation"))) + ;; (eww-readable-urls '("guardian\\.co\\.uk" + ;; "theguardian\\.com" + ;; "eldiario\\.es" + ;; "theconversation")) + ) :config (with-eval-after-load "org" (require 'ol-eww nil t)) @@ -268,5 +279,8 @@ It should be the title of the web page as returned by `rdrview'" (advice-add 'shr-tag-img :around #'jao-shr-tag-img) (advice-add 'shr-insert :around #'jao-shr-insert) +;; (advice-remove 'shr-tag-img #'jao-shr-tag-img) +;; (advice-remove 'shr-insert #'jao-shr-insert) + ;;; . (provide 'jao-custom-eww) diff --git a/custom/jao-custom-exwm.el b/custom/jao-custom-exwm.el index d90eeda..3cb3fc9 100644 --- a/custom/jao-custom-exwm.el +++ b/custom/jao-custom-exwm.el @@ -130,7 +130,7 @@ (defun jao-exwm--setup-float () (set-frame-parameter nil 'jao-position nil) - (cond ((string= "Firefox" exwm-class-name) + (cond ((member exwm-class-name '("firefox" "Firefox" "Sofice")) (jao-exwm--center-float 900 600)) ((member exwm-class-name '("mpv" "vlc")) (jao-exwm--center-float 1200)))) @@ -151,7 +151,7 @@ (add-hook 'exwm-workspace-switch-hook #'jao-minibuffer-refresh) (require 'exwm-systemtray) -(exwm-systemtray-enable) +(exwm-systemtray-mode 1) (defun jao-exwm--watch-tray (sym newval op where) (setq jao-minibuffer-right-margin (* 2 (length newval))) @@ -194,7 +194,9 @@ (defun jao-exwm-switch-to-next-x () (interactive) - (let ((bfs (seq-filter (lambda (b) (buffer-local-value 'exwm-class-name b)) + (let ((bfs (seq-filter (lambda (b) + (with-current-buffer b + (derived-mode-p 'exwm-mode))) (buffer-list (window-frame))))) (when (car bfs) (switch-to-buffer (car (reverse bfs)))))) @@ -530,6 +532,7 @@ ([f9] . jao-bright-show))) ;; (customize-set-variable 'exwm-input-global-keys exwm-input-global-keys) +(exwm-wm-mode) ;;; . (provide 'jao-custom-exwm) diff --git a/custom/jao-custom-gnus.el b/custom/jao-custom-gnus.el index bc7ce51..ce77285 100644 --- a/custom/jao-custom-gnus.el +++ b/custom/jao-custom-gnus.el @@ -1,6 +1,6 @@ ;; gnus configuration -*- lexical-binding: t -*- -;;; Feature switching vars +;;; features (defvar jao-gnus-use-local-imap nil) (defvar jao-gnus-use-leafnode nil) (defvar jao-gnus-use-gandi-imap nil) @@ -9,15 +9,9 @@ (defvar jao-gnus-use-nnml nil) (defvar jao-gnus-use-maildirs nil) (defvar jao-notmuch-enabled nil) +(defvar jao-gnus-nnml-group-params nil) -;;; Startup and kill -(setq gnus-interactive-exit t) - -(defun jao-quit-gnus () (gnus-group-exit) t) - -(add-hook 'kill-emacs-query-functions #'jao-quit-gnus) - -;;; Directories +;;; directories (defun jao-gnus-dir (dir) (expand-file-name dir gnus-home-directory)) @@ -36,10 +30,9 @@ nndraft-directory (jao-gnus-dir "drafts") nnrss-directory (jao-gnus-dir "rss")) -;;; Verbosity +;;; looks +;;;; verbosity (setq gnus-verbose 4) - -;;; Looks ;;;; geometry (defvar jao-gnus-use-three-panes t) (defvar jao-gnus-groups-width 50) @@ -54,10 +47,12 @@ ;; (dolist (m '(calendar-mode org-agenda-mode gnus-group-mode)) ;; (add-to-list 'display-buffer-alist `((major-mode . ,m) (dedicated t)))) + (setq calendar-left-margin 6) + (let ((side-bar '(vertical 1.0 ("inbox.org" 0.4) ("*Org Agenda*" 1.0) - ("*Calendar*" 9))) + ("*Calendar*" 8))) (wide-len jao-gnus-wide-width) (groups-len jao-gnus-groups-width) (summary-len (- jao-gnus-wide-width jao-gnus-groups-width))) @@ -97,7 +92,7 @@ (advice-add 'gnus-mode-line-buffer-identification :override #'identity) (setq gnus-mode-line-image-cache nil) -;;; Search +;;; search (setq gnus-search-use-parsed-queries nil gnus-search-notmuch-raw-queries-p nil gnus-permanently-visible-groups "^nnselect:.*" @@ -119,7 +114,7 @@ (cl-defmethod gnus-search-indexed-search-command ((engine gnus-search-recoll) (qstring string) - _query + query &optional groups) (let* ((subdir (slot-value engine 'remove-prefix)) (sep (slot-value engine 'separator)) @@ -133,13 +128,23 @@ (mapconcat (lambda (d) (format "dir:%s" d)) gdirs " OR ") ")"))) - (q (concat "mime:message " dirsq " (" qstring ")"))) - ;; (message "query is: %s" q) + (qstring (if (string-prefix-p "id:" qstring) + (replace-regexp-in-string "<\\|>" "\"" qstring) + qstring)) + (qstring (if (cdr (assoc 'thread query)) + (concat qstring " OR " + (replace-regexp-in-string "id:\"" "ref:\"" + qstring)) + qstring)) + (qstring (replace-regexp-in-string " or " " OR " qstring)) + (qstring (replace-regexp-in-string " and " " AND " qstring)) + (q (format "mime:message %s (%s)" dirsq qstring))) + ;; (message "query is: %s -- %S" q query) `("-b" "-t" "-q" ,q)))) ;; (add-to-list 'gnus-parameters '("^nnselect:.*" (nnselect-rescan . t))) -;;; News server +;;; news (defvar jao-gnus-leafnode-spool "/var/spool/news/") (setq gnus-select-method (cond @@ -171,7 +176,7 @@ (dolist (p jao-gnus-leafnode-group-params) (add-to-list 'gnus-parameters p t))) -;;; Mail +;;; mail ;;;; nnmail (setq nnmail-treat-duplicates 'delete nnmail-scan-directory-mail-source-once nil @@ -207,73 +212,10 @@ (when jao-gnus-use-nnml (add-to-list 'gnus-secondary-select-methods - `(nnml "" (gnus-search-engine gnus-search-recoll - (remove-prefix ,(jao-gnus-dir "Mail/")))))) - -(defvar jao-gnus-nnml-group-params - `(("nnml:\\(local\\|trash\\|spam\\)" - (auto-expire . t) - (total-expire . t) - (expiry-wait . 1) - (expiry-target . delete)) - ("nnml:jao\\..*" - (posting-style ("Gcc" "nnml:jao.trove")) ;; ("Bcc" "proton@jao.io") - (jao-gnus--trash-group "nnml:trash") - (jao-gnus--spam-group "nnml:spam") - (jao-gnus--archiving-group "nnml:jao.trove") - (gcc-self . t)) - ("nnml:jao\\.hacking" - (posting-style ("Gcc" "nnml:jao.hacking") - (address "jao@gnu.org"))) ;; ("Bcc" "hacking@jao.io") - ("nnml:jao\\.drivel" - (auto-expire . t) - (total-expire . t) - (expiry-wait . 3) - (expiry-target . delete)) - ("nnml:bigml\\..*" - (gcc-self . nil) - (auto-expire . t) - (total-expire . t) - (expiry-wait . 3) - (expiry-target . delete) - (posting-style (address "jao@bigml.com")) - (jao-gnus--trash-group "nnml:trash") - (jao-gnus--spam-group "nnml:spam") - (jao-gnus--archiving-group "nnml:bigml.trove")) - ("nnml:bigml\\.inbox" - (gcc-self . t) - (auto-expire . t) - (total-expire . t) - (expiry-wait . 7) - (expiry-target . "nnml:bigml.trove")) - ("nnml:bigml\\.alba" - (gcc-self . t) - (auto-expire . nil) - (total-expire . nil) - (expiry-target . nil) - (expiry-wait . nil)) - ("nnml:bigml\\.trove" - (auto-expire . t) - (total-expire . t) - (expiry-target . delete) - (expiry-wait . 365)) - ("nnml:feeds\\.\\(.*\\)" - (posting-style ("Gcc" "nnml:feeds.trove") - (address "jao@gnu.org")) - (auto-expire . t) - (total-expire . t) - (expiry-wait . 7) - (expiry-target . delete) - (comment . "feeds.\\1") - (jao-gnus--archiving-group "nnml:feeds.trove")) - ("nnml:feeds\\.\\(news\\|emacs-\\(bugs\\|diffs|\\github\\)\\)$" - (expiry-wait . 2)) - ("nnml:feeds\\.trove" - (auto-expire . nil) - (total-expire . nil)) - ("nnml:feeds\\.fun" - (mm-html-inhibit-images nil) - (mm-html-blocked-images nil)))) + ;; `(nnml "" (gnus-search-engine gnus-search-recoll + ;; (remove-prefix ,(jao-gnus-dir "Mail/")))) + `(nnml "" (gnus-search-engine gnus-search-notmuch + (remove-prefix "/home/jao/var/mail/gnus"))))) (when jao-gnus-use-nnml (dolist (p jao-gnus-nnml-group-params) @@ -297,7 +239,7 @@ (add-to-list 'gnus-secondary-select-methods '(nnimap "gandi" (nnimap-address "mail.gandi.net")))) -;;; Groups +;;; groups (setq gnus-group-line-format " %m%S%p%3y%P%* %~(pad-right 30)G %B\n" ;; " %m%S%p%P:%~(pad-right 35)c %3y %B\n" @@ -310,7 +252,26 @@ (add-hook 'gnus-select-group-hook 'gnus-group-set-timestamp) (add-hook 'gnus-group-mode-hook 'gnus-topic-mode) -;;; Summary +;;; rss +(setq nnrss-use-local t ;; M-x nnrss-generate-download-script + nnrss-ignore-article-fields '(category + dc:creator + dc:date + enclosure + guid + link + media:content + media:thumbnail + media:title + post-id + pubDate + slash:comments)) + +(add-to-list 'gnus-parameters `(,(format "nnrss:%s.*" + (regexp-opt jao-gnus-image-groups t)) + (mm-html-inhibit-images nil) + (mm-html-blocked-images nil))) +;;; summary ;;;; configuration (setq gnus-summary-ignore-duplicates t gnus-suppress-duplicates t @@ -327,8 +288,8 @@ gnus-summary-make-false-root 'adopt gnus-summary-gather-subject-limit nil ;; 120 gnus-summary-thread-gathering-function #'gnus-gather-threads-by-subject - gnus-sort-gathered-threads-function 'gnus-thread-sort-by-number - gnus-thread-sort-functions '(gnus-thread-sort-by-number)) + gnus-sort-gathered-threads-function 'gnus-thread-sort-by-date + gnus-thread-sort-functions '(gnus-thread-sort-by-date)) (defun jao-fix-protonmail-references (header) (let ((references (mail-header-references header))) @@ -488,22 +449,51 @@ (use-package org-capture :config (add-to-list 'org-capture-templates + '("x" "arXiv" entry (file "notes/physics/arxiv.org") + "* %(jao-gnus-subject)\n\n %i\n\n %(jao-gnus-org-url)" + :immediate-finish t) + t) + (add-to-list 'org-capture-templates '("X" "arXiv" entry (file "notes/physics/arxiv.org") - "* %:subject\n %i" :immediate-finish t) + "* %(jao-gnus-subject)\n\n%(jao-gnus-org-paragraph \"%i\")" + :immediate-finish t) t) (org-capture-upgrade-templates org-capture-templates)) +(defvar jao-gnus-org-url nil) +(defun jao-gnus-org-url () jao-gnus-org-url) +(defun jao-gnus-org-paragraph (x) + (with-temp-buffer + (insert " " (string-trim (or x "")) "\n ") + (goto-char 0) + (fill-paragraph) + (goto-char (point-max)) + (open-rectangle 0 (point)) + (concat (buffer-string) "\n " (or jao-gnus-org-url "")))) +(defvar jao-gnus-subject nil) +(defun jao-gnus-subject () jao-gnus-subject) + (defun jao-gnus-arXiv-capture () (interactive) + (unless (derived-mode-p '(gnus-summary-mode)) (gnus-article-show-summary)) + (setq jao-gnus-subject (gnus-summary-article-subject)) (gnus-summary-select-article-buffer) (gnus-article-goto-part 0) - (forward-paragraph) - (setq-local transient-mark-mode 'lambda) - (set-mark (point)) - (goto-char (point-max)) - (org-capture nil "X")) - -;;; Article + (let ((transient-mark-mode t)) + (set-mark (point)) + (forward-paragraph) + (or (and (save-excursion + (when (re-search-forward "^Link" nil t) + (beginning-of-line) + (setq jao-gnus-org-url (org-eww-url-below-point)))) + (org-capture nil "X")) + (and (save-excursion + (when (re-search-forward "^URL: " nil t) + (setq jao-gnus-org-url (thing-at-point-url-at-point)))) + (org-capture nil "x")))) + (gnus-article-show-summary)) + +;;; article ;;;; config, headers (setq mail-source-delete-incoming t) (setq gnus-gcc-mark-as-read t) @@ -560,8 +550,8 @@ (gnus-article-remove-images))))) (jao-gnus-browse-html))) -;;;; format From: -(require 'shr) +;;;; format from: + (defvar jao-gnus--from-rx (concat "From: \\\"?\\( *" jao-gnus--news-rx "\\)")) @@ -581,12 +571,21 @@ (save-excursion (goto-char (point-min)) (when (or (search-forward-regexp "^Via: h" nil t) - (search-forward-regexp "^URL: h" nil t) + (search-forward-regexp "^URL:[\n ]h" nil t) (and (search-forward-regexp "^Link$" nil t) (not (beginning-of-line)))) - (if external - (jao-browse-with-external-browser) - (browse-url (jao-url-around-point)))))) + (cond (external (jao-browse-with-external-browser)) + ((featurep 'jao-custom-eww) (eww (jao-url-around-point))) + (t (browse-url (jao-url-around-point))))))) + +(defun jao-gnus-from-eww (keep-eww-buffer) + (interactive "P") + (unless keep-eww-buffer (jao-eww-close)) + (jao-afio-goto-mail) + (gnus-article-show-summary)) + +(with-eval-after-load 'eww + (define-key eww-mode-map (kbd "h") #'jao-gnus-from-eww)) (defun jao-gnus-open-enclosure () (interactive) @@ -594,7 +593,7 @@ (gnus-summary-select-article-buffer) (save-excursion (goto-char (point-min)) - (let ((offset (or (and (search-forward-regexp "^Enclosure: " nil t) 2) + (let ((offset (or (and (search-forward-regexp "^Enclosure: ?" nil t) 2) (and (search-forward-regexp "^Enclosure$" nil t) -2)))) (when offset (forward-char offset)) (if-let ((url (jao-url-around-point))) @@ -608,7 +607,37 @@ (eval-after-load "message" '(setq message-draft-headers (remove 'Date message-draft-headers))) -;;; Add-ons +;;; daemon and exit +(setq gnus-interactive-exit t) +(defun jao-quit-gnus () (gnus-group-exit) t) +(add-hook 'kill-emacs-query-functions #'jao-quit-gnus) + +;; daemon config +(setq mail-user-agent 'gnus-user-agent) +(setq gnus-asynchronous t) +(setq gnus-use-article-prefetch nil) +(setq gnus-save-killed-list nil) +(setq gnus-check-new-newsgroups nil) + +(require 'gnus-demon) + +(defun jao-gnus--scan () + (let ((inhibit-message t)) + (gnus-demon-scan-news) + (jao-gnus--notify))) + +(defun jao-gnus-add-demon () + (interactive) + (gnus-demon-add-handler 'jao-gnus--scan 5 1)) + +(jao-gnus-add-demon) +(gnus-demon-init) + +;; this is, in theory, not needed; but at some point in the way to emacs +;; version 31 this idle timers have ceased to work after a sleep/awake cycle +(add-to-list 'jao-sleep-awake-functions #'jao-gnus-add-demon) + +;;; add-ons ;;;; notifications ;;;;; minibuffer (defvar jao-gnus-tracked-groups @@ -617,23 +646,24 @@ (seq-difference '("feeds.trove"))))) `(("nnml:bigml\\.inbox" "B" jao-themes-f00) ("nnml:bigml\\.alba" "A" jao-themes-f00) + ("nnml:bigml\\.ryou" "R" jao-themes-f00) ("nnml:bigml\\.bugs" "b" jao-themes-error) ("nnml:bigml\\.support" "S" default) + ("nnml:bigml\\.[^aibsr]" "W" jao-themes-dimm) ("nnml:jao\\.\\(inbox\\|trove\\)" "I" jao-themes-f01) - ("nnml:bigml\\.[^ibs]" "W" jao-themes-dimm) ("nnml:jao.hacking" "H" jao-themes-dimm) - ("nnml:jao.[^isth]" "J" jao-themes-dimm) + ("nnml:jao.write" "W" jao-themes-warning) + ("nnml:jao.[^ithw]" "J" jao-themes-dimm) (,(format "^nnml:%s" (regexp-opt feeds)) "F" jao-themes-dimm) ("feeds\\.e" "E" jao-themes-dimm) - ("nnml:local" "l" jao-themes-dimm)))) + ("nnml:local" "l" jao-themes-dimm) + ("nnrss:.*" "R" jao-themes-dimm) + ("^\\(gwene\\|gmane\\)\\." "N" jao-themes-dimm)))) (defun jao-gnus--unread-counts () (seq-reduce (lambda (r g) (let ((n (gnus-group-unread (car g)))) - (if (and (numberp n) (> n 0)) - (prog1 (cons (cons (car g) n) r) - (gnus-message 7 "%s in %s" n g)) - r))) + (if (and (numberp n) (> n 0)) (cons (cons (car g) n) r) r))) gnus-newsrc-alist ())) @@ -661,28 +691,19 @@ (jao-minibuffer-add-variable 'jao-gnus--notify-strs -20)) (add-hook 'gnus-started-hook #'jao-gnus--notify) -(add-hook 'gnus-summary-exit-hook #'jao-gnus--notify) +;; (add-hook 'gnus-summary-exit-hook #'jao-gnus--notify) (add-hook 'gnus-after-getting-new-news-hook #'jao-gnus--notify) -;;;;; daemon config -(setq mail-user-agent 'gnus-user-agent) -(setq gnus-asynchronous t) -(setq gnus-use-article-prefetch nil) -(setq gnus-save-killed-list nil) -(setq gnus-check-new-newsgroups nil) - -(require 'gnus-demon) - -(defun jao-gnus--scan () - (let ((inhibit-message t)) - (gnus-demon-scan-news) +;;;;; agenda and other updates on summary exit +(let ((exit-count 0)) + (defun jao-gnus--on-summary-exit () + (when (> (setq exit-count (+ 1 exit-count)) 20) + (setq exit-count 0) + (jao-org-agenda)) (jao-gnus--notify))) -(gnus-demon-add-handler 'jao-gnus--scan 5 1) - -;;;;; agenda updates -(add-hook 'gnus-summary-exit-hook #'jao-org-agenda) - +(add-hook 'gnus-summary-exit-hook #'jao-gnus--on-summary-exit) +(add-hook 'gnus-exit-group-hook #'jao-gnus--notify) ;;;; open mail file in gnus (defun jao-gnus-file-to-group (file &optional maildir newsdir m-server n-server) @@ -724,6 +745,10 @@ (add-hook 'jao-afio-switch-hook #'jao-gnus--on-afio-switch) +(defun jao-gnus-refresh-workspace () + (interactive) + (save-window-excursion (calendar) (jao-org-agenda))) + ;;;; gnus-icalendar (require 'ol-gnus) (use-package gnus-icalendar @@ -753,7 +778,16 @@ (with-eval-after-load "consult-recoll" (add-to-list 'consult-recoll-open-fns '("message/rfc822" . jao-gnus-goto-file)))) -;;; Keyboard shortcuts +;;;; notmuch +(use-package jao-notmuch-gnus + :demand t) + +(jao-load-path "consult-notmuch") + +(use-package consult-notmuch + :bind (:map gnus-group-mode-map ("S" . #'jao-gnus-consult-notmuch))) + +;;; keyboard shortcuts (define-key gnus-article-mode-map "i" 'jao-gnus-show-images) (define-key gnus-summary-mode-map "i" 'jao-gnus-show-images) (define-key gnus-article-mode-map "\M-g" 'jao-gnus-follow-link) @@ -763,4 +797,4 @@ (define-key gnus-summary-mode-map "X" 'jao-gnus-arXiv-capture) (define-key gnus-summary-mode-map "e" 'jao-gnus-open-enclosure) (define-key gnus-summary-mode-map "\C-l" nil) -(define-key gnus-group-mode-map (kbd "A") 'nil) +(define-key gnus-group-mode-map "a" 'jao-gnus-refresh-workspace) diff --git a/custom/jao-custom-notmuch.el b/custom/jao-custom-notmuch.el index 3919897..42d9e12 100644 --- a/custom/jao-custom-notmuch.el +++ b/custom/jao-custom-notmuch.el @@ -588,12 +588,13 @@ ;;; arXiv (use-package org-capture :config - (add-to-list 'org-capture-templates - '("X" "arXiv" entry (file "notes/physics/arxiv.org") - "* %(jao-org-notmuch-last-subject)\n %i" - :immediate-finish t) - t) - (org-capture-upgrade-templates org-capture-templates)) + (when jao-notmuch-enabled + (add-to-list 'org-capture-templates + '("X" "arXiv" entry (file "notes/physics/arxiv.org") + "* %(jao-org-notmuch-last-subject)\n %i" + :immediate-finish t) + t) + (org-capture-upgrade-templates org-capture-templates))) (defun jao-notmuch-arXiv-capture () (interactive) diff --git a/custom/jao-custom-org.el b/custom/jao-custom-org.el index 02e7a03..4d2e622 100644 --- a/custom/jao-custom-org.el +++ b/custom/jao-custom-org.el @@ -167,9 +167,9 @@ '("pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f" "pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f")) -(use-package ox-pandoc - :after org - :ensure t) +;; (use-package ox-pandoc +;; :after org +;; :ensure t) ;;; Babel and literate programming (setq org-src-window-setup 'other-window) ;; current-window |