diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 7290f92..49531d7 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -2386,8 +2386,8 @@ Returns ( . ) or nil." (use-package org-contrib :straight (org-contrib :type git - :host nil :repo "https://git.sr.ht/~bzg/org-contrib" + :files (:defaults (:exclude "lisp/org-contacts.el")) :build t) :after (org) :config @@ -3369,6 +3369,18 @@ Returns ( . ) or nil." :config (org-roam-bibtex-mode)) +(use-package org-contacts + :straight (:type git + :repo "https://git.sr.ht/~bzg/org-contrib" + :files ("lisp/org-contacts.el") + :build (:not compile)) + :after (notmuch) + :commands (org-contacts) + :config + (require 'cl) + (setq org-contacts-files (list + (concat org-directory "/contacts.org")))) + (defun my/export-org-tables-to-csv () (interactive) (org-table-map-tables diff --git a/.emacs.d/mail.el b/.emacs.d/mail.el index f79bcc4..16535dc 100644 --- a/.emacs.d/mail.el +++ b/.emacs.d/mail.el @@ -16,6 +16,7 @@ (setq send-mail-function #'sendmail-send-it) (setq mml-secure-openpgp-sign-with-sender t) (setq notmuch-mua-user-agent-function 'notmuch-mua-user-agent-full) + (setq notmuch-address-command 'as-is) (add-hook 'notmuch-hello-mode-hook (lambda () (display-line-numbers-mode 0)))) diff --git a/Emacs.org b/Emacs.org index f83b617..8391158 100644 --- a/Emacs.org +++ b/Emacs.org @@ -3450,12 +3450,14 @@ Another way to encrypt org files is to save them with extension =.org.gpg=. That - =ox-extra= - extensions for org export - =ol-notmuch= - integration with notmuch +Excluding =org-contacts= from here because byte compilation breaks it for some reason. + #+begin_src emacs-lisp (use-package org-contrib :straight (org-contrib :type git - :host nil :repo "https://git.sr.ht/~bzg/org-contrib" + :files (:defaults (:exclude "lisp/org-contacts.el")) :build t) :after (org) :config @@ -4007,7 +4009,9 @@ Despite the fact that I don't add =org-trello-files= to =org-agenda-files= I sti ((org-agenda-prefix-format " %i %-12:c [%e] "))))))) #+end_src *** Org Journal -[[https://github.com/bastibe/org-journal][org-journal]] is a plugin for maintaining a journal in org mode. I want to have its entries separate from my knowledge base. +[[https://github.com/bastibe/org-journal][org-journal]] is a plugin for maintaining a journal in org mode. I want(ed) to have its entries separate from my knowledge base. + +For now I've switched to Org Roam Dailies, but keeping it here because I'm not yet settled on my journaling workflow. #+begin_src emacs-lisp (use-package org-journal @@ -4869,6 +4873,35 @@ There are some problems with org roam v2, so I disabled it as of now. I will pro :config (org-roam-bibtex-mode)) #+end_src +*** org-contacts +=org-contacts= is an =org-contrib= package to store contacts in an org file. The package is somewhat outdated, for instance it uses =lexical-let=, so I have to =(require 'cl)=. + +I think it will take some more work to tune the package exactly to my liking, but it seems to perform the original function just fine. + +#+begin_src emacs-lisp +(use-package org-contacts + :straight (:type git + :repo "https://git.sr.ht/~bzg/org-contrib" + :files ("lisp/org-contacts.el") + :build (:not compile)) + :after (notmuch) + :commands (org-contacts) + :config + (require 'cl) + (setq org-contacts-files (list + (concat org-directory "/contacts.org")))) +#+end_src + +An example contact entry can look like this: +#+begin_example +,* Pavel Korytov +:PROPERTIES: +:TYPE: person +:EMAIL: thexcloud@gmail.com +:EMAIL+: pvkorytov@etu.ru +:BIRTHDAY: [1998-08-14] +:END: +#+end_example *** Managing tables I use Org to manage some small tables which I want to process further. So here is a function that saves each table to a CSV file. #+begin_src emacs-lisp diff --git a/Mail.org b/Mail.org index 818dfd3..4011751 100644 --- a/Mail.org +++ b/Mail.org @@ -416,6 +416,8 @@ Finally the proper notmuch settings: (setq send-mail-function #'sendmail-send-it) (setq mml-secure-openpgp-sign-with-sender t) (setq notmuch-mua-user-agent-function 'notmuch-mua-user-agent-full) + ;; Use org-contacts for completion + (setq notmuch-address-command 'as-is) (add-hook 'notmuch-hello-mode-hook (lambda () (display-line-numbers-mode 0)))) #+end_src