Emacs from Scratch #5 - Org Mode Basics

- Add README org mode file with configuration in src blocks
- Add org mode packages and configuration
- Fix some typos
- Whitespace changes
This commit is contained in:
Sravan Balaji
2021-04-28 11:50:53 -04:00
parent fea4563252
commit da6527073a
2 changed files with 405 additions and 9 deletions

65
init.el
View File

@@ -1,6 +1,6 @@
(setq inhibit-startup-message t) ; Disable startup message
(scroll-bar-mode -1) ; Diable visible scrollbar
(scroll-bar-mode -1) ; Disable visible scrollbar
(tool-bar-mode -1) ; Disable the toolbar
(tooltip-mode -1) ; Disable tooltips
(set-fringe-mode 10) ; Give some breathing room
@@ -19,12 +19,10 @@
(require 'package)
(setq package-archives
'(
("melpa" . "https://melpa.org/packages/")
; ("melpa-stable" . "https://stable.melpa.org/packages/")
("org" . "https://orgmode.org/elpa/")
("elpa" . "https://elpa.gnu.org/packages/")
)
'(("melpa" . "https://melpa.org/packages/")
("org" . "https://orgmode.org/elpa/")
("elpa" . "https://elpa.gnu.org/packages/")
)
)
(package-initialize)
@@ -65,7 +63,7 @@
:ensure t
:init (doom-modeline-mode 1)
:custom (doom-modeline-height 15)
)
)
;; ;; Doom Themes
;; (use-package doom-themes
@@ -98,7 +96,7 @@
'(jdee-db-spec-breakpoint-face-colors (cons "#1E2029" "#565761"))
'(objed-cursor-color "#ff5555")
'(package-selected-packages
'(autothemer forge evil-magit magit counsel-projectile projectile hydra evil-collection evil general helpful counsel ivy-rich which-key rainbow-delimiters doom-modeline use-package ivy command-log-mode))
'(visual-fill-column org-bullets autothemer forge evil-magit magit counsel-projectile projectile hydra evil-collection evil general helpful counsel ivy-rich which-key rainbow-delimiters doom-modeline use-package ivy command-log-mode))
'(pdf-view-midnight-colors (cons "#f8f8f2" "#282a36"))
'(rustic-ansi-faces
["#282a36" "#ff5555" "#50fa7b" "#f1fa8c" "#61bfff" "#ff79c6" "#8be9fd" "#f8f8f2"])
@@ -272,3 +270,52 @@
;; OPTIONAL: This will add GitHub integration to magit, but requires some token setup
;; (use-package forge)
(defun sb/org-mode-setup ()
(org-indent-mode)
;; (variable-pitch-mode 1)
(auto-fill-mode 0)
(visual-line-mode 1)
(setq evil-auto-indent nil)
)
;; Replace list hyphen with dot
(font-lock-add-keywords 'org-mode
'(("^ *\\([-]\\) "
(0 (prog1 () (compose-region (match-beginning 1) (match-end 1) ""))))))
;; ;; Set faces for heading levels
;; (dolist (face '((org-level-1 . 1.2)
;; (org-level-2 . 1.1)
;; (org-level-3 . 1.05)
;; (org-level-4 . 1.0)
;; (org-level-5 . 1.1)
;; (org-level-6 . 1.1)
;; (org-level-7 . 1.1)
;; (org-level-8 . 1.1)))
;; (set-face-attribute (car face) nil :font "Cantarell" :weight 'regular :height (cdr face)))
(use-package org
:hook (org-mode . sb/org-mode-setup)
:config
(setq org-ellipsis "")
(sb/org-font-setup)
)
(use-package org-bullets
:after org
:hook (org-mode . org-bullets-mode)
:custom
(org-bullets-bullet-list '("" "" "" "" "" "" ""))
)
;; ;; Add visual fill (padding)
;; (defun sb/org-mode-visual-fill ()
;; (setq visual-fill-column-width 100
;; visual-fill-column-center-text t)
;; (visual-fill-column-mode 1)
;; )
;; (use-package visual-fill-column
;; :hook (org-mode . sb/org-mode-visual-fill)
;; )