mirror of
https://github.com/SqrtMinusOne/dotfiles.git
synced 2025-12-10 19:23:03 +03:00
feat: org-contacts
This commit is contained in:
parent
7971eb63e5
commit
9612c69ffc
4 changed files with 51 additions and 3 deletions
|
|
@ -2386,8 +2386,8 @@ Returns (<buffer> . <workspace-index>) 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 (<buffer> . <workspace-index>) 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
|
||||
|
|
|
|||
|
|
@ -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))))
|
||||
|
||||
|
|
|
|||
37
Emacs.org
37
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
|
||||
|
|
|
|||
2
Mail.org
2
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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue