summaryrefslogtreecommitdiffhomepage
path: root/org.org
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2021-03-02 05:08:18 +0000
committerjao <jao@gnu.org>2021-03-02 05:08:18 +0000
commit2f73af43db9de972c0ec61bbebc06e1d95079631 (patch)
tree9fbb9d34d433997aa7abe72e7e1213e0dec5ab1f /org.org
parent4d5a02560e5c5aa0da573278b7415071cbd5b5de (diff)
downloadelibs-2f73af43db9de972c0ec61bbebc06e1d95079631.tar.gz
elibs-2f73af43db9de972c0ec61bbebc06e1d95079631.tar.bz2
jao-org-notes in lieu of org-roam
Diffstat (limited to 'org.org')
-rw-r--r--org.org72
1 files changed, 6 insertions, 66 deletions
diff --git a/org.org b/org.org
index 2f6d773..725049d 100644
--- a/org.org
+++ b/org.org
@@ -75,13 +75,8 @@
("a" "Appointment" entry
(file+olp "inbox.org" "Appointments")
"* %^T %?\n %a" :time-prompt t)
- ("w" "Wintermute TODO" entry
- (file+olp "bigml.org" "Wintermute" "Tasks")
- "* TODO %?\n %i%a" :prepend t)
("i" "Inbox note" entry (file+headline "inbox.org" "Notes")
- "* %a\n %i%?(added on: %u)" :prepend t)
- ("x" "Clipboard" entry (file+headline "inbox.org" "Notes")
- "* %?\n %a\n %x\n (added: %u)" :prepend t)))
+ "* %a\n %i%?(added on: %u)" :prepend t)))
;; (org-capture-upgrade-templates org-capture-templates)
#+END_SRC
* MIME and file apps
@@ -213,67 +208,12 @@
("C-c I" . org-download-yank))))
#+end_src
-* Org roam
+* Notes
#+begin_src emacs-lisp
- (use-package org-roam
- :ensure t
- :init
- (defun jao-roam--slug (slug) (replace-regexp-in-string "_" "-" slug))
-
- (defun jao-roam--cat ()
- (let* ((cats (seq-difference (directory-files org-roam-directory)
- '("." ".." "attic")))
- (cat (completing-read "Top level cat: " cats)))
- (cond ((file-exists-p (expand-file-name cat org-roam-directory)) cat)
- ((yes-or-no-p "New category, create?") cat)
- (t (jao-roam--cat)))))
-
- (setq org-roam-capture-templates
- `(("d" "default" plain #'org-roam-capture--get-point
- "%a %i"
- :file-name "%(jao-roam--cat)/%(jao-roam--slug \"${slug}\")"
- :head ,(concat "#+title: ${title}"
- "\n#+created: %T"
- "\n#+roam_tags: %?"
- "\n#+roam_ref: %:url\n\n"))))
-
- :custom ((org-roam-directory (expand-file-name "~/org/notes"))
- (org-roam-encrypt-files nil)
- (org-roam-buffer-position nil)
- (org-roam-buffer-height nil)
- (org-roam-buffer-window-parameters nil)
- (org-roam-link-use-custom-faces t)
- (org-roam-link-auto-replace t)
- (org-roam-tag-sources '(prop vanilla all-directories))
- (org-roam-file-exclude-regexp ".+/code\\|attic/.*")
- (org-roam-verbose nil))
-
- :config
- (defvar org-roam-consult-flags
- '("--null" "--ignore-case" "--type=org" "--line-buffered"
- "--color=always" "--max-columns=250" "--no-heading" "--line-number"))
-
- (defun consult-org-roam ()
- "Search org-roam directory using consult-ripgrep. With live-preview."
- (interactive)
- (let ((consult-ripgrep-command
- (format "rg %s . -e ARG OPTS"
- (mapconcat 'identity org-roam-consult-flags " "))))
- (consult-ripgrep org-roam-directory)))
-
- (major-mode-hydra-define+ org-mode ()
- ("Roam"
- (("i" org-roam-insert "insert")
- ("f" org-roam-find-file "find-file")
- ("o" consult-org-roam "consult")
- ("v" org-roam-buffer-toggle-display "toggle backlinks"))))
-
- (jao-define-attached-buffer (regexp-quote org-roam-buffer) 0.33)
-
- :hook ((after-init . org-roam-mode))
- :bind (("C-c n" . org-roam-capture)
- ("C-c N" . org-roam-find-file))
- :diminish)
+ (use-package jao-org-notes
+ :config (jao-org-notes-setup "n")
+ :bind (("C-c n" . jao-org-notes-consult)
+ ("C-c N" . jao-org-notes-open)))
#+end_src
* Links
#+begin_src emacs-lisp