-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdot-emacs-for-phone.el
82 lines (71 loc) · 2.92 KB
/
dot-emacs-for-phone.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
;; How I set it up before this would work:
;;
;; serial:
;; in top-level Termux, run this to install some things:
;; pkg install emacs sqlite curl ripgrep
;; In Emacs with no .emacs file, install 'use-package':
;; M-x package-install RET use-package RET
;; Reopen Emacs using the parts of this .emacs file not about org-roam.
;; Install 'org-roam':
;; M-x package-install RET org-roam RET
(require 'use-package)
(package-initialize)
(menu-bar-mode -1) ;; Whether to show it. (t for true, -1 for nil.)
(add-to-list 'package-archives
'("gnu" . "http://elpa.gnu.org/packages/") t)
(add-to-list 'package-archives
'("melpa" . "http://melpa.org/packages/") t)
(add-to-list 'package-archives
'("melpa-stable" . "http://stable.melpa.org/packages/") t)
(use-package emacsql-sqlite3 :ensure t)
;; org-roam
(require 'org-roam)
(setq org-roam-database-connector 'sqlite3)
(use-package org-roam
:ensure t
:hook
(after-init . org-roam-mode)
:custom
(setq org-roam-db-location (file-truename "~"))
(org-roam-directory (file-truename "~//org-roam/")))
(setq org-roam-v2-ack t) ;; indicates I migrated
(org-roam-db-autosync-mode)
(org-roam-directory "/home/jeff/org-roam")
;; TODO: A lot of global-set-key commands in this file use the wrong syntax,
;; omitting the # symbol. This way works.
;; (So does the lambda expression way, but it's needlessly verbose.)
(global-set-key (kbd "C-c C-l") #'org-insert-link)
(global-set-key (kbd "C-c n l") #'org-store-link)
(setq org-id-link-to-org-use-id t) ;; make stored links refer to IDs
(global-set-key (kbd "C-c n f") #'org-roam-node-find)
(global-set-key (kbd "C-c n i") #'org-roam-node-insert) ;; insert a *link*
(global-set-key (kbd "C-c n d") #'org-roam-db-sync) ;; update the db
(global-set-key (kbd "C-c n b") #'org-roam-buffer-toggle) ;; show backlinks
(setq org-roam-capture-templates
;; These folder names are dumb, but to change them I would need
;; to change every link involving them.
'( ("u" "public" plain "%?"
:if-new (file+head "tech/${slug}.org"
"#+title: ${title}\n")
:unnarrowed t)
("r" "private" plain "%?"
:if-new (file+head "pers/${slug}.org"
"#+title: ${title}\n")
:unnarrowed t)
("o" "ofiscal" plain "%?"
:if-new (file+head "ofiscal/${slug}.org"
"#+title: ${title}\n")
:unnarrowed t)
))
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(package-selected-packages '(org-roam use-package)))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)