diff options
author | noa | 2024-09-17 10:14:44 +0800 |
---|---|---|
committer | noa | 2024-09-17 10:14:44 +0800 |
commit | 8d5514c5919bcda5461f8e7dfd9d8f925a9669c0 (patch) | |
tree | 55f9f646b3b3d5fd4d8055150cce03dda5c31c56 /emacs | |
parent | 7ab0fb4af78c2f2da0fc6de8c6b9b25c68ab3aa8 (diff) |
Remove org mode configuration
Diffstat (limited to 'emacs')
-rw-r--r-- | emacs/init.el | 109 |
1 files changed, 1 insertions, 108 deletions
diff --git a/emacs/init.el b/emacs/init.el index 80dca77..5678ede 100644 --- a/emacs/init.el +++ b/emacs/init.el @@ -243,114 +243,9 @@ (global-set-key (kbd "S-<down-mouse-1>") #'mouse-set-mark) (global-set-key (kbd "C-S-<down-mouse-1>") #'mouse-drag-region-rectangle) -;;; Writing prose -;; The majority of the work i do in emacs is writing documents, so it's nice to know that the words coming out of my fingers are the ones i expect them to be. - -;;; Org mode - -;; I thought it would be a good idea to have the ability to set headings in my notes as things i wanted to recall later, as i store most of the things i think about in an org file. I still do think that, but the package isn't in melpa right now and i'm lazy and i'm not in education, so i haven't got around to it yet. - -(setopt org-modules '(org-habit org-id org-mouse ol-doi ol-bibtex ol-docview ol-info ol-rmail ol-eww)) - -;; When creating links between org documents, it's better to create and use unique ids rather than search for a headline, because that headline could change. - -(setopt org-id-link-to-org-use-id 'create-if-interactive) - -;; If we enable this, emphasis markers will be hidden for a more word processor feel. This has the downside of meaning you have to delete a hidden character to get rid of bold or italic text. I don't have much of a problem with seeing the emphasis markers so i'm willing to put up with any aesthetic shortcomings for a better user experience. The package org-appear solves this by hiding them, but showing them when the point is over them, but i don't think having a whole package just for that is worth it. - -(setopt org-hide-emphasis-markers nil) - -(setopt org-startup-folded t) -(setopt org-startup-with-inline-images t) -(setopt org-image-actual-width '(300)) -(setopt org-tags-column 0) -(setopt org-catch-invisible-edits 'show-and-error) -(setopt org-insert-heading-respect-content t) -(setopt org-ellipsis "↴") ;; ↩ ⤦ -(setopt org-extend-today-until 4) -(setopt org-adapt-indentation nil) -(setopt org-log-done 'time) -(setopt org-return-follows-link t) -(setopt org-agenda-files '("~/Documents/notes/notes.org")) -(setopt org-capture-bookmark nil) -(setopt org-capture-templates - '(("j" "Journal" entry (file "~/Documents/notes/notes.org") "* %T %?\n" :empty-lines 1))) - -(setopt org-agenda-block-separator nil) -(setopt org-agenda-include-deadlines t) -;; Always start the weekly agenda for a week from today -(setopt org-agenda-start-on-weekday nil) -;; Show week of agenda by default -(setopt org-agenda-span 'week) -(setopt org-agenda-prefix-format '((agenda . " %i %?-12t% s") - (todo . " %i ") - (tags . " %i ") - (search . " %i "))) - -;; The default agenda time grid has thick lines which i don't think add anything to the output. Similarly, the arrow pointing to the current time has a long line which helps me to find it more easily, but by getting rid of the excess of colour and making it bold, i never struggle to find it anyway. - -(setopt org-agenda-time-grid '((daily today require-timed) - (800 1000 1200 1400 1600 1800 2000) - " " " ")) -(setopt org-agenda-current-time-string "◀ you are here") -(setopt org-support-shift-select 'always) - -;; Show calendar agenda and todos in the same buffer - -(setopt org-agenda-custom-commands - '(("n" "Todo list and agenda" - ((alltodo "") - (agenda ""))))) - -;; Make org html export more pleasant by default -(setopt org-export-with-smart-quotes t) -(setopt org-export-with-entities nil) -(setopt org-export-headline-levels 5) -(setopt org-export-with-toc nil) -(setopt org-export-with-section-numbers nil) -(setopt org-html-doctype "html5") -(setopt org-html-html5-fancy t) -(setopt org-html-container-element "section") -(setopt org-html-divs '((preamble "header" "preamble") - (content "main" "content") - (postamble "footer" "postamble"))) -(setopt org-export-with-sub-superscripts t) -(setopt org-html-head-include-default-style nil - org-html-head-include-scripts nil - org-html-validation-link "") - -;; It's a controversial opinion, but i want hard line breaks to only appear because i want a hard line break in the finished document. This is not quite so respectful of the content/presentation distinction, but it makes some things work in a much more pleasant way for me. - -(setopt org-export-preserve-breaks t) - -;; This doesn't work with code blocks at the moment. - -(setopt org-html-indent nil) - -(global-set-key (kbd "C-c c") #'org-capture) -(global-set-key (kbd "<menu>") #'noa/org-capture) -(defun noa/org-capture () - "Capture a simple note without the dispatcher." - (interactive) - (org-capture nil "j")) -(defun noa/org-agenda () - "Directly open the agenda with todo list." - (interactive) - (org-agenda nil "n")) -(global-set-key (kbd "C-c a") #'noa/org-agenda) -(global-set-key (kbd "C-c l") #'org-store-link) - -;; Current org mode top level heading -(defun noa/get-current-org-heading () - (interactive) - (message (car (org-get-outline-path t)))) - -;; Nicer org-mode tables - +;; Nicer tables (package-ensure 'valign) (add-hook 'markdown-mode-hook #'valign-mode) -(add-hook 'org-mode-hook #'valign-mode) - (setopt valign-fancy-bar t) (setopt valign-max-table-size 0) @@ -797,8 +692,6 @@ The misspelled word is taken from OVERLAY. WORD is the corrected word." (global-set-key [remap yank-pop] #'consult-yank-pop) (global-set-key [remap goto-line] #'consult-goto-line) (global-set-key [remap imenu] #'consult-imenu) -(with-eval-after-load 'org - (bind-key [remap imenu] #'consult-org-heading #'org-mode-map)) (global-set-key [remap info] #'consult-info) |