diff options
author | jao <jao@gnu.org> | 2021-05-16 02:12:12 +0100 |
---|---|---|
committer | jao <jao@gnu.org> | 2021-05-16 02:12:12 +0100 |
commit | cf81ccc6e7a4cb50151d1b2f7a81369ef516a0db (patch) | |
tree | 8ea7b9c6ccfcb250d5697d0dca1ccccbf3bffba5 | |
parent | debec7e4a401b0ae2d12923264db8adfa577f3c2 (diff) | |
download | elibs-cf81ccc6e7a4cb50151d1b2f7a81369ef516a0db.tar.gz elibs-cf81ccc6e7a4cb50151d1b2f7a81369ef516a0db.tar.bz2 |
fix for init loading
-rw-r--r-- | completion.org | 27 | ||||
-rw-r--r-- | email.org | 34 | ||||
-rw-r--r-- | init.org | 5 |
3 files changed, 34 insertions, 32 deletions
diff --git a/completion.org b/completion.org index 29b85a3..b00b8cd 100644 --- a/completion.org +++ b/completion.org @@ -118,33 +118,6 @@ (define-key consult-narrow-map (vconcat consult-narrow-key "?") #'consult-narrow-help)) #+end_src -*** notmuch - #+begin_src emacs-lisp - (use-package consult-notmuch - :ensure t - :init (setq consult-notmuch-authors-width 30) - :config - (add-to-list 'consult-config '(consult-notmuch :preview-key any)) - (add-to-list 'consult-buffer-sources 'consult-notmuch-buffer-source)) - - (defvar jao-consult-notmuch-folders - (seq-mapcat (lambda (base) - (mapcar `(lambda (d) (format "%s/%s" ,base d)) - (jao-list-mailboxes base))) - '("jao" "bigml" "feeds" "trove"))) - - (defun jao-consult-notmuch-folder (&optional tree folder) - (interactive "P") - (let* ((root "~/var/mail/") - (folder (if folder - (file-name-as-directory folder) - (completing-read "Folder: " - jao-consult-notmuch-folders))) - (folder (replace-regexp-in-string "/\\(.\\)" ".\\1" folder)) - (init (read-string "Initial query: ")) - (init (format "folder:/%s/ %s" folder init))) - (if tree (consult-notmuch-tree init) (consult-notmuch init)))) - #+end_src *** recoll #+begin_src emacs-lisp (jao-load-path "consult-recoll") @@ -247,6 +247,13 @@ (setq bbdb-file (expand-file-name "~/.emacs.d/bbdb")) (bbdb-initialize 'message 'pgp 'mail) #+end_src +* mailboxes + #+begin_src emacs-lisp + (defun jao-list-mailboxes (base) + (let ((dir (expand-file-name base "~/var/mail"))) + (seq-difference (directory-files dir) + '("." ".." "sent" "inbox" "trash")))) + #+end_src * gnus *** Directories #+begin_src emacs-lisp @@ -322,6 +329,33 @@ ,(jao-notmuch--q "new" nil "n" '("tag:new")) ,(jao-notmuch--q "draft" nil "d" '("tag:draft")))) #+end_src +*** consult + #+begin_src emacs-lisp + (use-package consult-notmuch + :ensure t + :init (setq consult-notmuch-authors-width 30) + :config + (add-to-list 'consult-config '(consult-notmuch :preview-key any)) + (add-to-list 'consult-buffer-sources 'consult-notmuch-buffer-source)) + + (defvar jao-consult-notmuch-folders + (seq-mapcat (lambda (base) + (mapcar `(lambda (d) (format "%s/%s" ,base d)) + (jao-list-mailboxes base))) + '("jao" "bigml" "feeds" "trove"))) + + (defun jao-consult-notmuch-folder (&optional tree folder) + (interactive "P") + (let* ((root "~/var/mail/") + (folder (if folder + (file-name-as-directory folder) + (completing-read "Folder: " + jao-consult-notmuch-folders))) + (folder (replace-regexp-in-string "/\\(.\\)" ".\\1" folder)) + (init (read-string "Initial query: ")) + (init (format "folder:/%s/ %s" folder init))) + (if tree (consult-notmuch-tree init) (consult-notmuch init)))) + #+end_src *** org mode integration Stolen and adapted from [[https://gist.github.com/fedxa/fac592424473f1b70ea489cc64e08911][Fedor Bezrukov]]. #+begin_src emacs-lisp @@ -1578,11 +1578,6 @@ (if (fboundp 'w3m-view-mode) (w3m-view-source) (View-quit)) (when url (cons url (or title "")))))))) - (defun jao-list-mailboxes (base) - (let ((dir (expand-file-name base "~/var/mail"))) - (seq-difference (directory-files dir) - '("." ".." "sent" "inbox" "trash")))) - (defun jao-rss-subscribe () (interactive) (let* ((url (or (jao-url-around-point) |