summary refs log tree commit diff
path: root/emacs
diff options
context:
space:
mode:
Diffstat (limited to 'emacs')
-rw-r--r--emacs/init.el100
1 files changed, 63 insertions, 37 deletions
diff --git a/emacs/init.el b/emacs/init.el
index 4f2cddf..71e8359 100644
--- a/emacs/init.el
+++ b/emacs/init.el
@@ -769,6 +769,7 @@ With prefix argument TIME, also add the current time."
     (kill-new (file-name-nondirectory (buffer-file-name)))))
 
 (use-package org
+  :defer t
   :init
   ;; Repurpose underline syntax for cloze deletion face
   (defface my-cloze '((t . (:box t))) "Cloze face for Inline-Anki")
@@ -780,74 +781,99 @@ With prefix argument TIME, also add the current time."
                            ("+" (:strike-through t))))
 
   :custom
-  (org-agenda-files '("~/Documents/Notes.org"))
+  (org-agenda-files '("~/Documents/Notes.org" "~/Documents/Notes/"))
   (org-replace-disputed-keys t)
   (org-support-shift-select 'always) ;; Still refuses to fix on timestamps :/
   (org-log-done 'time)
   (org-pretty-entities t)
-  (org-hide-emphasis-markers t)
-  (org-startup-with-inline-images t))
+  (org-startup-with-inline-images t)
+  (org-image-actual-width '(300))
+  (org-ellipsis " [+]")
+  (org-insert-heading-respect-content t)
+  (org-fontify-done-headline nil)
+  (org-fontify-todo-headline nil)
+  (org-fontify-whole-heading-line t)
+  (org-src-fontify-natively t)
+  (org-src-tab-acts-natively t)
+  (org-edit-src-content-indentation 0)
+  (org-use-sub-superscripts '{})
+
+  :hook ((org-mode . font-lock-mode))
 
-(use-package org-node
-  :ensure t
+  )
+
+(add-hook 'text-mode-hook (lambda ()
+                            (setq-local line-spacing 0.1)))
+
+(use-package oc
   :after org
+  :custom
+  (org-cite-global-bibliography '("~/Documents/Library/References.bib"))
+  (org-cite-export-processors '((beamer csl)
+                                (latex csl)
+                                (t csl))))
+(use-package oc-csl
+  :after oc
+  :custom
+  (org-cite-csl-styles-dir "~/Documents/Library/CSL/Styles")
+  (org-cite-csl-locales-dir "~/Documents/Library/CSL/Locales"))
+
 
+;; Not working how i want
+(use-package org-capture
+  :bind ("C-c c" . org-capture)
   :custom
-  (org-node-prefer-with-heading t)
-  (org-node-creation-fn #'noa/org-node-new-node)
+  (org-capture-templates
+        '(("d" "Today's diary" entry
+           (file+headline "~/Documents/Notes.org" "Diary")
+           "** %u\n%?"))))
 
-  :config
-  (org-node-cache-mode)
-  (org-node-backlink-mode)
-  (defvar noa/org-notes-file "~/Documents/Notes.org")
-  (defun noa/org-node-new-node ()
-    "Create a node in my notes file.
-Meant to be called indirectly as `org-node-creation-fn', so that some
-necessary variables are set."
-    (if (or (null org-node-proposed-title)
-            (null org-node-proposed-id))
-        (message "noa/org-node-new-node is meant to be called indirectly")
-      (when (not (file-exists-p noa/org-notes-file))
-        (user-error "Node file not found: %s" noa/org-notes-file))
-      (find-file noa/org-notes-file)
-      (goto-char (point-max))
-      (insert "* " org-node-proposed-title
-              "\n:PROPERTIES:"
-              "\n:ID:       " org-node-proposed-id
-              "\n:END:"
-              "\n")
-      (goto-char (point-max))
-      (push (current-buffer) org-node--not-yet-saved)
-      (run-hooks 'org-node-creation-hook)))
-
-  :bind (("<menu>" . org-node-find)
-         ("M-s M-f" . org-node-find)
-         ("M-s M-i" . org-node-insert-link)
-         ("M-s M-g" . org-node-grep))
-  )
+;; See https://llazarek.github.io/blog/2018/07/organization-with-org-mode.html
+;; for configuring the org agenda
 
 (use-package inline-anki
+  :defer t
   :after org
   :load-path "~/.config/emacs/site-lisp/inline-anki"
   :config
   (add-to-list 'org-structure-template-alist '("f" . "flashcard")))
 
+(use-package org-similarity
+  :disabled t
+  :load-path "~/.config/emacs/site-lisp/org-similarity"
+  :custom
+  (org-similarity-directory "~/Documents/Notes")
+  (org-similarity-file-extension-pattern "*.md"))
+
 (use-package ctrlj
   :load-path "~/Documents/Projects/2024-10-08 Ctrlj"
   :init (global-unset-key (kbd "C-j"))
   :bind* (("<f2>" . ctrlj/open-note)
          ("C-j C-j" . ctrlj/open-note)
-         ("C-j C-n" . ctrlj/new-note)
+;;         ("C-j C-n" . ctrlj/new-note)
          ("C-j C-l" . ctrlj/insert-link-to-note)
          ("C-j C-d" . ctrlj/open-todays-diary)
          ("C-j C-a" . ctrlj/view-agenda)
          ("C-j C-o" . ctrlj/jump-to-other-related-note)))
 
+;; Experimental website generator
+(use-package ox-hugo
+  :disabled t
+  :ensure t
+  :after ox)
+
 (defun noa/consult-rg-notes ()
   (interactive)
   (consult-ripgrep "~/Documents/Notes"))
 (global-set-key (kbd "C-j C-s") #'noa/consult-rg-notes)
 
+(use-package gnuplot
+  :disabled t
+  :ensure t)
+(use-package gnuplot-mode
+  :disabled t
+  :ensure t)
+
 ;; so i can search for synonyms without using the internet
 (use-package wordnut
   :if (executable-find "wordnet")