add tweaks to use org-agenda

This commit is contained in:
Julin S 2021-09-16 18:20:49 +05:30
parent 39c4c3b609
commit cf2a0ed0c1
3 changed files with 165 additions and 68 deletions

View File

@ -3,26 +3,55 @@
(package-initialize)
;; Activate Evil mode
; https://www.emacswiki.org/emacs/Evil
(require 'evil)
(evil-mode t)
;;; General
;
;; Don't show welcome screen every time
(setq inhibit-startup-screen t)
;
;; Turn off 'bell sounds'
; https://emacs.stackexchange.com/questions/28906/how-to-switch-off-the-sounds
(setq ring-bell-function 'ignore)
;
;; Enable word wrap
(setq-default word-wrap t)
;; Added with Custom
; Proof general: Change colour of highlighting for executed part (light green)
(custom-set-faces
'(proof-locked-face ((t (:extend t :background "#bcffbd")))))
;
;; Scroll buffer without moving cursor
; https://www.emacswiki.org/emacs/Scrolling#h5o-2
(defun gcm-scroll-down ()
(interactive)
(scroll-up 1))
;
(defun gcm-scroll-up ()
(interactive)
(scroll-down 1))
;
; C-Down scroll down without moving cursor
(global-set-key [(control down)] 'gcm-scroll-down)
;
; C-Up scroll up without moving cursor
(global-set-key [(control up)] 'gcm-scroll-up)
;
;; Zooming
; https://stackoverflow.com/questions/5533110/emacs-zoom-in-zoom-out
;
; zoom in with mouse scroll up
(global-set-key [C-mouse-4] 'text-scale-increase)
;
; zoom out with mouse scroll down
(global-set-key [C-mouse-5] 'text-scale-decrease)
;
;; Show emacs startup time
(add-hook 'emacs-startup-hook
(lambda ()
(message (format "Emacs started in %s" (emacs-init-time)))))
;
;; Disable automatic indentation
(setq electric-indent-mode nil)
;
;; Display current column
; https://www.gnu.org/software/emacs/manual/html_node/efaq/Displaying-the-current-line-or-column.html
(setq column-number-mode t)
;
;; Set default encoding as UTF-8
(set-terminal-coding-system 'utf-8)
(set-keyboard-coding-system 'utf-8)
@ -31,44 +60,62 @@
(prefer-coding-system 'utf-8)
; Don't show welcome screen every time
(setq inhibit-startup-screen t)
;;; Evil mode
; https://www.emacswiki.org/emacs/Evil
;
;; Activate evil mode
(require 'evil)
(evil-mode t)
;
;; Vim digraphs
(load-file "~/.config/emacs/digraphs.el")
;; Scroll buffer without moving cursor
; https://www.emacswiki.org/emacs/Scrolling#h5o-2
(defun gcm-scroll-down ()
(interactive)
(scroll-up 1))
(defun gcm-scroll-up ()
(interactive)
(scroll-down 1))
; C-Down scroll down without moving cursor
(global-set-key [(control down)] 'gcm-scroll-down)
; C-Up scroll up without moving cursor
(global-set-key [(control up)] 'gcm-scroll-up)
;;; Org mode
;
;; Enable org mode
(org-mode)
;
;; States
; https://orgmode.org/manual/Workflow-states.html
;
; org-mode needs to be restarted after changing this variable
;
; TODO: To be done
; DONE: Completed
; NODO: Can't be done or not going to be done anymore
;
(setq org-todo-keywords
'((sequence "TODO" "|" "DONE" "NODO")))
;
;; Save clock history across Emacs sessions
; https://orgmode.org/manual/Clocking-Work-Time.html
(setq org-clock-persist 'history)
(org-clock-persistence-insinuate)
;
;; org-agenda
; https://stackoverflow.com/questions/44094125/org-mode-c-c-a-undefined/44096106
(define-key global-map "\C-ca" 'org-agenda)
;
;; Set agenda files for org-agenda
(setq org-agenda-files (quote ("~/today/agenda.org" "~/org.org")))
;; Zooming
; https://stackoverflow.com/questions/5533110/emacs-zoom-in-zoom-out
; zoom in with mouse scroll up
(global-set-key [C-mouse-4] 'text-scale-increase)
; zoom out with mouse scroll down
(global-set-key [C-mouse-5] 'text-scale-decrease)
;;; Added with Custom
; Proof general: Change colour of highlighting for executed part (light green)
(custom-set-faces
'(proof-locked-face ((t (:extend t :background "#bcffbd")))))
;; shortcuts only for proofgeneral mode
;;; Proof-general mode
;
;; Show goal and in vertical splits
(eval-after-load "proof-script"
; Show goal and in vertical splits
'(setq proof-three-window-mode-policy 'hybrid))
;; tab-bar
;;; tab-bar
; https://www.emacswiki.org/emacs/TabBarMode
; https://github.com/noctuid/evil-guide
; https://stackoverflow.com/a/7790759
@ -78,20 +125,6 @@
(evil-ex-define-cmd "tabon[ly]" 'tab-bar-close-other-tabs))
;; Show emacs startup time
(add-hook 'emacs-startup-hook
(lambda ()
(message (format "Emacs started in %s" (emacs-init-time)))))
; Disable automatic indentation
(setq electric-indent-mode nil)
; Vim digraphs
(load-file "~/.config/emacs/digraphs.el")
; (defun get-buffer-contents (buffer)
; (with-current-buffer buffer
; (save-restriction

View File

@ -1,11 +1,18 @@
;; Vim digraphs
; https://mullikine.github.io/posts/adding-new-digraphs-to-vim-and-evil/
;((?) . ?-) ?\x2209) ; ∉
(setq evil-digraphs-table-user '(
; Currency
((?R ?s) . ?\x20a8) ; ₨
((?r ?s) . ?\x20b9) ; ₹ (INR)
; Set theory
;((?) . ?-) ?\x2209) ; ∉
; Super-script characters
((?^ ?0) . ?\x2070) ; ⁰ (duplicate of 0S)
((?^ ?1) . ?\xb9) ; ¹ (duplicate of 1S)
((?^ ?2) . ?\xb2) ; ² (duplicate of 2S)
@ -65,6 +72,9 @@
((?^ ?=) . ?\x207c) ; ⁼
((?^ ?() . ?\x207d) ; ⁽
((?^ ?)) . ?\x207e) ; ⁾
; Sub-script characters
((?_ ?0) . ?\x2080) ; ₀ (duplicate of 0s)
((?_ ?1) . ?\x2081) ; ₁ (duplicate of 1s)
((?_ ?2) . ?\x2082) ; ₂ (duplicate of 2s)
@ -97,6 +107,9 @@
((?_ ?=) . ?\x208c) ; ₌
((?_ ?() . ?\x208d) ; ₍
((?_ ?)) . ?\x208e) ; ₎
; Italic letters (resemble italics syntax in emacs org-mode)
((?/ ?A) . ?\x1d434) ; 𝐴
((?/ ?B) . ?\x1d435) ; 𝐵
((?/ ?C) . ?\x1d436) ; 𝐶
@ -149,15 +162,29 @@
((?/ ?x) . ?\x1d465) ; 𝑥
((?/ ?y) . ?\x1d466) ; 𝑦
((?/ ?z) . ?\x1d467) ; 𝑧
; Number sets
((?N ?N) . ?\x2115) ; : Set of natural numbers
((?R ?R) . ?\x211d) ; : Set of real numbers
((?Z ?Z) . ?\x2124) ; : Set of integers
((?C ?C) . ?\x2102) ; : Set of complex numbers (overriding ~T: Cancel character)
((?Q ?Q) . ?\x211a) ; : Set of rational numbers
((?B ?B) . ?\x1d539) ; 𝔹: Set of Booleans (overriding ¦)
; Constants
((?e ?e) . ?\x212f) ; : Euler's number ≅ 2.71828
((?p ?h) . ?\x2135) ; ℵ : Aleph number (in addition to א (A+))
; Fancy stuff
((?e ?l) . ?\x2113) ;
((?d ?t) . ?\x22c5) ; ⋅ ('small dot')
((?D ?T) . ?\x2022) ; • ('big dot') (overriding ^?: DELETE character)
; Proof theory stuff
((?T ?N) . ?\x2204) ; ∄ (Since ∃ is TE)
((?n ?<) . ?\x219a) ; ↚ (Since ← is <-)
((?n ?>) . ?\x219b) ; ↛ (Since → is ->)
@ -171,15 +198,31 @@
((?m ?p) . ?\x21a6) ; ↦: maps to
((?F ?F) . ?\x27d8) ; ⊥ (like False) (overriding : Form feed)
((?T ?T) . ?\x27d9) ; (like True) (duplicate of -T)
((?d ?t) . ?\x22c5) ; ⋅ ('small dot')
((?D ?T) . ?\x2022) ; • ('big dot') (overriding ^?: DELETE character)
; Basic math stuff
;; Roots of numbers
((?r ?2) . ?\x221a) ; √ (square root) (duplicate of RT)
((?r ?3) . ?\x221b) ; ∛ (cube root)
((?r ?4) . ?\x221c) ; ∜ (fourth root)
;; Lines
((?p ?p) . ?\x27c2) ; ⟂ (perpendicular to)
((?l ?l) . ?\x2016) ; ‖ (parallel to)
;; Integration
((?I ?m) . ?\x23ae) ; ⎮ (Since ⌠ is Iu and ⌡ is Il)
; Quantum theory stuff
((?k ?t) . ?\x27e9) ; ⟩ (ket symbol)
; 'Modifier'-like
((?~ ?~) . ?\x336) ; strikethrough text overlay
; With tilde
((?A ?~) . ?\xc3) ; Ã (duplicate of 'A?')
((?E ?~) . ?\x1ebc) ; Ẽ (duplicate of 'E?')
((?I ?~) . ?\x128) ; Ĩ (duplicate of 'I?')
@ -196,6 +239,13 @@
((?u ?~) . ?\x169) ; ũ (duplicate of 'u?')
((?v ?~) . ?\x1e7d) ; ṽ (duplicate of 'v?')
((?y ?~) . ?\x1ef9) ; ỹ (duplicate of 'y?')
; Unicode phonetic symbols
;; https://en.wikipedia.org/wiki/Phonetic_symbols_in_Unicode
((?4 ?4) . ?\x25b) ; ɛ
((?c ?c) . ?\x254) ; ɔ
((?e ?i) . ?\x1dd) ; ǝ
((?r ?i) . ?\x279) ; ɹ
((?j ?z) . ?\x292) ; ʒ
))

View File

@ -2,6 +2,7 @@
" https://en.wikipedia.org/wiki/Mathematical_operators_and_symbols_in_Unicode
" https://github.com/joom/latex-unicoder.vim/blob/master/autoload/unicoder.vim
"" Currency
digr Rs 8360 " ₨
digr rs 8377 " ₹ (INR)
@ -182,14 +183,17 @@ digr ee 8495 " : Euler's number ≅ 2.71828
digr ph 8501 " ℵ : Aleph number (in addition to א (A+))
"" Fancy letters
"" Fancy stuff
digr el 8467 "
digr dt 8901 " ⋅ ('small dot')
digr DT 8226 " • ('big dot') (overriding ^?: DELETE character)
"" Proof theory stuff
digr TN 8708 " ∄ (Since ∃ is TE)
digr n< 8602 " ↚ (Since ← is <-)
digr n> 8603 " ↛ (Since → is ->)
digr -^ 8593 " ↑ (Since ↓ is -v)
digr pr 8866 " ⊢
digr MO 8872 " ⊨
digr np 8876 " ⊬
@ -201,20 +205,20 @@ digr mp 8614 " ↦: maps to
digr FF 10200 " ⊥ (like False) (overriding : Form feed)
digr TT 10201 " (like True) (duplicate of -T)
digr dt 8901 " ⋅ ('small dot')
digr DT 8226 " • ('big dot') (overriding ^?: DELETE character)
"" Basic math stuff
""" Roots of numbers
digr r2 8730 " √ (square root) (duplicate of RT)
digr r3 8731 " ∛ (cube root)
digr r4 8732 " ∜ (fourth root)
"" Lines
""" Lines
digr pp 10178 " ⟂ (perpendicular to)
digr ll 8214 " ‖ (parallel to)
""" Integration
digr Im 9134 " ⎮ (Since ⌠ is Iu and ⌡ is Il)
"" Quantum theory stuff
digr kt 10217 " ⟩ (ket symbol)
@ -247,6 +251,16 @@ digr v~ 7805 " ṽ (duplicate of 'v?')
digr y~ 7929 " ỹ (duplicate of 'y?')
"" Unicode phonetic symbols
""" https://en.wikipedia.org/wiki/Phonetic_symbols_in_Unicode
digr 44 603 " ɛ
digr cc 596 " ɔ
digr ei 477 " ǝ (overrides ㄟ)
digr ri 633 " ɹ (overrides り)
digr jz 658 " ʒ
" ɜ reversed open e
"" Matrix brackets
"lbrackuend ⎡