feat(emacs): org-journal

This commit is contained in:
Pavel Korytov 2021-07-14 21:57:02 +03:00
parent 42065f16ee
commit 82d66af51b
2 changed files with 55 additions and 4 deletions

View file

@ -1027,7 +1027,7 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer."
(require 'org-crypt) (require 'org-crypt)
(org-crypt-use-before-save-magic) (org-crypt-use-before-save-magic)
(setq org-tags-exclude-from-inheritance (quote ("crypt"))) (setq org-tags-exclude-from-inheritance (quote ("crypt")))
(setq org-crypt-key nil) (setq org-crypt-key "C1EC867E478472439CC82410DE004F32AFA00205")
(use-package jupyter (use-package jupyter
:straight t :straight t
:init :init
@ -1145,7 +1145,7 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer."
(require 'org-crypt) (require 'org-crypt)
(org-crypt-use-before-save-magic) (org-crypt-use-before-save-magic)
(setq org-tags-exclude-from-inheritance (quote ("crypt"))) (setq org-tags-exclude-from-inheritance (quote ("crypt")))
(setq org-crypt-key nil) (setq org-crypt-key "C1EC867E478472439CC82410DE004F32AFA00205")
(use-package org-contrib (use-package org-contrib
:straight (org-contrib :straight (org-contrib
@ -1307,6 +1307,20 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer."
(setq org-refile-targets (setq org-refile-targets
'(("projects.org" :maxlevel . 2))) '(("projects.org" :maxlevel . 2)))
(use-package org-journal
:straight t
:config
(setq org-journal-dir "~/Documents/org-mode/journal/")
(setq org-journal-file-type 'weekly)
(setq org-journal-file-format "%Y-%m-%d.org")
(setq org-journal-enable-encryption t))
(my-leader-def
:infix "aj"
"j" 'org-journal-new-entry
"o" 'org-journal-open-current-journal-file
"s" 'org-journal-search)
(use-package org-latex-impatient (use-package org-latex-impatient
:straight (:repo "yangsheng6810/org-latex-impatient" :straight (:repo "yangsheng6810/org-latex-impatient"
:branch "master" :branch "master"
@ -2267,7 +2281,7 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer."
:if (not my/slow-ssh) :if (not my/slow-ssh)
:hook (python-mode . (lambda () :hook (python-mode . (lambda ()
(require 'lsp-pyright) (require 'lsp-pyright)
(setq-local lsp-python-ms-python-executable (my/get-pipenv-python)) (setq-local lsp-pyright-python-executable (my/get-pipenv-python))
(lsp)))) (lsp))))
(add-hook 'python-mode-hook #'smartparens-mode) (add-hook 'python-mode-hook #'smartparens-mode)
@ -2550,6 +2564,25 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer."
(when link (when link
(eww link)))) (eww link))))
(use-package tldr
:straight t
:commands (tldr)
:config
(setq tldr-source-zip-url "https://github.com/tldr-pages/tldr/archive/refs/heads/main.zip")
(defun tldr-update-docs ()
(interactive)
(shell-command-to-string (format "curl -L %s --output %s" tldr-source-zip-url tldr-saved-zip-path))
(when (file-exists-p "/tmp/tldr")
(delete-directory "/tmp/tldr" t))
(shell-command-to-string (format "unzip -d /tmp/tldr/ %s" tldr-saved-zip-path) nil nil)
(when (file-exists-p tldr-directory-path)
(delete-directory tldr-directory-path 'recursive 'no-trash))
(shell-command-to-string (format "mv %s %s" "/tmp/tldr/tldr-main" tldr-directory-path))))
(my-leader-def "hT" 'tldr)
(my-leader-def "hM" 'man)
(my-leader-def "ai" #'erc-tls) (my-leader-def "ai" #'erc-tls)
(use-package erc-hl-nicks (use-package erc-hl-nicks

View file

@ -1817,7 +1817,7 @@ Use the built-in org mode.
(require 'org-crypt) (require 'org-crypt)
(org-crypt-use-before-save-magic) (org-crypt-use-before-save-magic)
(setq org-tags-exclude-from-inheritance (quote ("crypt"))) (setq org-tags-exclude-from-inheritance (quote ("crypt")))
(setq org-crypt-key nil) (setq org-crypt-key "C1EC867E478472439CC82410DE004F32AFA00205")
#+end_src #+end_src
*** org-contrib *** org-contrib
=org-contrib= is a package with various additions to Org. I use the following: =org-contrib= is a package with various additions to Org. I use the following:
@ -2131,6 +2131,24 @@ Settings for Org capture mode. The goal here is to have a non-disruptive process
"/Received on/ %:date-timestamp-inactive")))) "/Received on/ %:date-timestamp-inactive"))))
#+end_src #+end_src
*** Org Journal
A plugin for maintaining journal in org mode. I want to have its entries separate from my potential knowledge database.
#+begin_src emacs-lisp
(use-package org-journal
:straight t
:config
(setq org-journal-dir "~/Documents/org-mode/journal/")
(setq org-journal-file-type 'weekly)
(setq org-journal-file-format "%Y-%m-%d.org")
(setq org-journal-enable-encryption t))
(my-leader-def
:infix "aj"
"j" 'org-journal-new-entry
"o" 'org-journal-open-current-journal-file
"s" 'org-journal-search)
#+end_src
** UI ** UI
*** OFF (OFF) Instant equations preview *** OFF (OFF) Instant equations preview
Instant math previews for org mode. Instant math previews for org mode.