Fix indentation

master
Jacopo De Simoi 4 years ago
parent 605cf94338
commit a6a7b71611
  1. 117
      global.org

@ -3,7 +3,9 @@
#+email: jacopods@math.utoronto.ca #+email: jacopods@math.utoronto.ca
#+options: *:t ::t #+options: *:t ::t
* TODO Make indentation uniform * COMMENT About indentation in this file
This file will be indented with ~org-adapt-indentation~ set to t
* TODO Look at tangling at * TODO Look at tangling at
[http://thewanderingcoder.com/2015/02/literate-emacs-configuration/] [http://thewanderingcoder.com/2015/02/literate-emacs-configuration/]
@ -29,12 +31,14 @@
way complicated; I can do everything by hand as soon as it is neatly way complicated; I can do everything by hand as soon as it is neatly
~org~-anized. In the end we use a few, but I plan to phase them out and ~org~-anized. In the end we use a few, but I plan to phase them out and
replace them with git submodules replace them with git submodules
* Files and dirs * Files and dirs
Move ~Customize~ to a separate file Move ~Customize~ to a separate file
#+begin_src emacs-lisp #+begin_src emacs-lisp
(setq custom-file "~/.emacs.d/custom.el") (setq custom-file "~/.emacs.d/custom.el")
(load custom-file 'noerror) (load custom-file 'noerror)
#+end_src #+end_src
Add relevant dirs to load path [This is somewhat undesirable; I should Add relevant dirs to load path [This is somewhat undesirable; I should
uniformize the path-loading business at some point…] uniformize the path-loading business at some point…]
#+begin_src emacs-lisp #+begin_src emacs-lisp
@ -49,6 +53,7 @@
"highlight-parentheses.el"))) "highlight-parentheses.el")))
#+end_src #+end_src
Put autosave files (ie #foo#) and backup files (ie foo~) in ~/.emacs.d/. Put autosave files (ie #foo#) and backup files (ie foo~) in ~/.emacs.d/.
create the autosave dir if necessary, since emacs won't. create the autosave dir if necessary, since emacs won't.
#+begin_src emacs-lisp #+begin_src emacs-lisp
@ -63,10 +68,11 @@
(load-theme 'lunarized t) (load-theme 'lunarized t)
#+end_src #+end_src
Use patched terminus font (this overrides the settings in Customize, but I
never could it to work otherwise). See the special treatment later on for Use patched terminus font (this overrides the settings in Customize,
dealing with bold weight. To avoid flickering one should also set the font but I never could it work otherwise). See the special treatment
in .Xresources later on for dealing with bold weight. To avoid flickering one
should also set the font in .Xresources
#+begin_src emacs-lisp #+begin_src emacs-lisp
(set-face-font 'default "-xos4-hackminus-medium-r-normal--20-200-72-72-c-100-ISO10646-1") (set-face-font 'default "-xos4-hackminus-medium-r-normal--20-200-72-72-c-100-ISO10646-1")
(set-face-font 'fixed-pitch "-xos4-hackminus-medium-r-normal--20-200-72-72-c-100-ISO10646-1") (set-face-font 'fixed-pitch "-xos4-hackminus-medium-r-normal--20-200-72-72-c-100-ISO10646-1")
@ -411,25 +417,25 @@
Additionally, unbind the ~C-x o~ binding to force me using ~ace-window~ Additionally, unbind the ~C-x o~ binding to force me using ~ace-window~
Finally, unbind the ~C-SPC~ to mark the point, as I am using LR-shift Finally, unbind the ~C-SPC~ to mark the point, as I am using LR-shift
Note that I will use ~C-SPC~ as a hydra below to deal with parenthesis Note that I will use ~C-SPC~ as a hydra below to deal with parenthesis
#+begin_src emacs-lisp #+begin_src emacs-lisp
(dolist (ch '("C-c C-x" "C-x C-r" "C-z" "C-x f" "C-x C-f" "<M-f4>" "C-M-u" "C-M-d" "C-x o" "C-SPC")) (dolist (ch '("C-c C-x" "C-x C-r" "C-z" "C-x f" "C-x C-f" "<M-f4>" "C-M-u" "C-M-d" "C-x o" "C-SPC"))
(global-unset-key (kbd ch))) (global-unset-key (kbd ch)))
#+end_src #+end_src
Change {up,down}-list Change {up,down}-list
#+begin_src emacs-lisp #+begin_src emacs-lisp
(global-set-key (kbd "C-M-i") 'down-list) ;; -i stands for /in/ (global-set-key (kbd "C-M-i") 'down-list) ;; -i stands for /in/
(global-set-key (kbd "C-M-o") 'up-list) ;; -o stands for /out/ (global-set-key (kbd "C-M-o") 'up-list) ;; -o stands for /out/
#+end_src #+end_src
Add some opinionated bindings Add some opinionated bindings
#+begin_src emacs-lisp #+begin_src emacs-lisp
(global-set-key-alist (global-set-key-alist
'(("C-M-d" . kill-sexp) '(("C-M-d" . kill-sexp)
("C-M-<backspace>" . backward-kill-sexp) ("C-M-<backspace>" . backward-kill-sexp)
("C-x k" . kill-this-buffer) ("C-x k" . kill-this-buffer)
("C-S-v" . scroll-down-command) ("C-S-v" . scroll-down-command)
("C-M-u" . universal-argument))) ("C-M-u" . universal-argument)))
#+end_src #+end_src
** Disable commands ** Disable commands
Enable narrow commands Enable narrow commands
#+begin_src emacs-lisp #+begin_src emacs-lisp
@ -482,9 +488,9 @@
#+end_src #+end_src
*** TODO find out if there are better options out there *** TODO find out if there are better options out there
** Load hydra ** Load hydra
#+begin_src emacs-lisp #+begin_src emacs-lisp
(require 'hydra) (require 'hydra)
#+end_src #+end_src
** Abbrevs ** Abbrevs
Set up abbrevs Set up abbrevs
@ -512,8 +518,8 @@
** Fringe treatment ** Fringe treatment
*** TODO try linum-relative *** TODO try linum-relative
#+begin_src emacs-lisp #+begin_src emacs-lisp
; (require 'linum-relative) ; (require 'linum-relative)
; (linum-relative-mode 1) ; (linum-relative-mode 1)
#+end_src #+end_src
Add line numbers globally Add line numbers globally
#+begin_src emacs-lisp #+begin_src emacs-lisp
@ -521,8 +527,8 @@
#+end_src #+end_src
Highlight also the linum in the fringe Highlight also the linum in the fringe
#+begin_src emacs-lisp #+begin_src emacs-lisp
; (require 'hlinum) ; (require 'hlinum)
; (hlinum-activate) ; (hlinum-activate)
#+end_src #+end_src
Add marker for current line in the margin (see Add marker for current line in the margin (see
[https://github.com/kyanagi/fringe-current-line] and [https://github.com/kyanagi/fringe-current-line] and
@ -580,11 +586,11 @@
** Use local proxy ** Use local proxy
I need this to route bibretrieve requests through my local proxy, I need this to route bibretrieve requests through my local proxy,
that in turn routes requests to ~mathscinet~ through the University network that in turn routes requests to ~mathscinet~ through the University network
#+begin_src emacs-lisp #+begin_src emacs-lisp
;; Use system proxy ;; Use system proxy
(setq url-proxy-services '(("http" . "127.0.0.1:8118") (setq url-proxy-services '(("http" . "127.0.0.1:8118")
("https" . "127.0.0.1:8118"))) ("https" . "127.0.0.1:8118")))
#+end_src #+end_src
** Indicator ** Indicator
Change cursor color to reflect different layers on the keyboard Change cursor color to reflect different layers on the keyboard
This is the handler This is the handler
@ -845,7 +851,7 @@
;(require 'helm-org) ;(require 'helm-org)
;(add-to-list 'helm-completing-read-handlers-alist '(org-capture . helm-org-completing-read-tags)) ;(add-to-list 'helm-completing-read-handlers-alist '(org-capture . helm-org-completing-read-tags))
; (add-to-list 'helm-completing-read-handlers-alist '(org-set-tags-command . helm-org-completing-read-tags)) ; (add-to-list 'helm-completing-read-handlers-alist '(org-set-tags-command . helm-org-completing-read-tags))
; (add-to-list 'helm-completing-read-handlers-alist '(org-set-tags ; (add-to-list 'helm-completing-read-handlers-alist '(org-set-tags
; . helm-org-completing-read-tags)) ; . helm-org-completing-read-tags))
#+end_src #+end_src
@ -1289,7 +1295,7 @@
(define-key org-agenda-mode-map (kbd "Z") 'org-revert-all-orgzly-buffers) (define-key org-agenda-mode-map (kbd "Z") 'org-revert-all-orgzly-buffers)
#+end_src #+end_src
*** Hydras for timestamps *** Hydras for timestamps
#+begin_src emacs-lisp #+begin_src emacs-lisp
(defun hydra-timestamp/hl-paren-force-fix () (defun hydra-timestamp/hl-paren-force-fix ()
;;; This is needed b/c hl-parent caches the point position and ;;; This is needed b/c hl-parent caches the point position and
;;; refuses to update if the point did not move ;;; refuses to update if the point did not move
@ -1319,7 +1325,7 @@
("s" (progn ("s" (progn
(org-timestamp-down-day 7) (org-timestamp-down-day 7)
(hydra-timestamp/hl-paren-force-fix)) "-1W"))) (hydra-timestamp/hl-paren-force-fix)) "-1W")))
#+end_src #+end_src
*** Hydras for refiling *** Hydras for refiling
This bit evolved from [[https://www.mollermara.com/blog/Fast-refiling-in-org-mode-with-hydras/][this post]]; see more at [[https://gist.github.com/mm--/60e0790bcbf8447160cc87a66dc949ab ][this gist]]. This bit evolved from [[https://www.mollermara.com/blog/Fast-refiling-in-org-mode-with-hydras/][this post]]; see more at [[https://gist.github.com/mm--/60e0790bcbf8447160cc87a66dc949ab ][this gist]].
#+begin_src emacs-lisp #+begin_src emacs-lisp
@ -1330,15 +1336,15 @@
(org-refile arg nil (list headline file nil pos))) (org-refile arg nil (list headline file nil pos)))
(switch-to-buffer (current-buffer))) (switch-to-buffer (current-buffer)))
#+end_src #+end_src
#+begin_src emacs-lisp #+begin_src emacs-lisp
(defhydra wilder/hydra-org-refile (:foreign-keys run) (defhydra wilder/hydra-org-refile (:foreign-keys run)
"Refile" "Refile"
("g" (wilder/refile "hack.org" "emacs") "Refile to Hack-emacs") ("g" (wilder/refile "hack.org" "emacs") "Refile to Hack-emacs")
("q" nil "cancel")) ("q" nil "cancel"))
(define-key org-mode-map (kbd "C-x \\") 'wilder/hydra-org-refile/body) (define-key org-mode-map (kbd "C-x \\") 'wilder/hydra-org-refile/body)
#+end_src #+end_src
*** Hydras for moving headlines around *** Hydras for moving headlines around
#+begin_src emacs-lisp #+begin_src emacs-lisp
(defhydra wilder/hydra-org-move () (defhydra wilder/hydra-org-move ()
"Move subtree" "Move subtree"
("f" org-backward-heading-same-level "move up" :column "Movement") ("f" org-backward-heading-same-level "move up" :column "Movement")
@ -1350,7 +1356,7 @@
("e" org-move-subtree-down "bubble down") ("e" org-move-subtree-down "bubble down")
("q" nil "cancel")) ("q" nil "cancel"))
(define-key org-mode-map (kbd "C-x SPC") 'wilder/hydra-org-move/body) (define-key org-mode-map (kbd "C-x SPC") 'wilder/hydra-org-move/body)
#+end_src #+end_src
*** Capture *** Capture
Set default keybinding Set default keybinding
@ -1383,15 +1389,15 @@
"* TODO Attend %(format-zoom-meeting)\n%a" :immediate-finish t))) "* TODO Attend %(format-zoom-meeting)\n%a" :immediate-finish t)))
#+end_src #+end_src
*** LaTeX export *** LaTeX export
#+begin_src emacs-lisp #+begin_src emacs-lisp
; (add-to-list 'org-latex-classes ; (add-to-list 'org-latex-classes
; '("amsart" "\\documentclass[11pt]{amsart}" ; '("amsart" "\\documentclass[11pt]{amsart}"
; ("\\section{%s}" . "\\section*{%s}") ; ("\\section{%s}" . "\\section*{%s}")
; ("\\subsection{%s}" . "\\subsection*{%s}") ; ("\\subsection{%s}" . "\\subsection*{%s}")
; ("\\subsubsection{%s}" . "\\subsubsection*{%s}") ; ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
; ("\\paragraph{%s}" . "\\paragraph*{%s}") ; ("\\paragraph{%s}" . "\\paragraph*{%s}")
; ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))) ; ("\\subparagraph{%s}" . "\\subparagraph*{%s}")))
#+end_src #+end_src
*** Source blocks *** Source blocks
Add template for a source block in a few selected languages; for Add template for a source block in a few selected languages; for
now I have now I have
@ -1415,13 +1421,13 @@
(setq org-src-fontify-natively t) (setq org-src-fontify-natively t)
#+end_src #+end_src
This makes scheme src blocks work This makes scheme src blocks work
#+begin_src emacs-lisp #+begin_src emacs-lisp
(org-babel-do-load-languages (org-babel-do-load-languages
'org-babel-load-languages 'org-babel-load-languages
'((python . t) '((python . t)
(scheme . t) (scheme . t)
(emacs-lisp . t))) (emacs-lisp . t)))
#+end_src #+end_src
Patch ~ob-scheme.el~ while waiting for upstream Patch ~ob-scheme.el~ while waiting for upstream
#+begin_src emacs-lisp #+begin_src emacs-lisp
(defun org-babel-scheme-execute-with-geiser (code output impl repl) (defun org-babel-scheme-execute-with-geiser (code output impl repl)
@ -1614,7 +1620,7 @@
(dolist (file files) (dolist (file files)
(with-current-buffer (find-file-noselect file) (with-current-buffer (find-file-noselect file)
(org-babel-tangle) (org-babel-tangle)
; (unless nokill (kill-buffer)) ; (unless nokill (kill-buffer))
))) )))
#+end_src #+end_src
*** Export file *** Export file
@ -1641,16 +1647,16 @@
*** ox-export *** ox-export
Load ox-hugo Load ox-hugo
#+begin_src emacs-lisp #+begin_src emacs-lisp
(with-eval-after-load 'ox (with-eval-after-load 'ox
(require 'ox-hugo)) (require 'ox-hugo))
#+end_src #+end_src
*** ~org-roam~ setup *** ~org-roam~ setup
#+begin_src emacs-lisp #+begin_src emacs-lisp
(setq org-roam-directory (file-truename "~/org-roam")) (setq org-roam-directory (file-truename "~/org-roam"))
(org-roam-db-autosync-mode) (org-roam-db-autosync-mode)
(global-set-key (kbd "C-c n f") 'org-roam-node-find) (global-set-key (kbd "C-c n f") 'org-roam-node-find)
#+end_src #+end_src
** elisp ** elisp
*** Paredit *** Paredit
#+begin_src emacs-lisp #+begin_src emacs-lisp
@ -1708,14 +1714,14 @@
(add-to-list 'auto-mode-alist '("\\.qml\\'" . qml-mode)) (add-to-list 'auto-mode-alist '("\\.qml\\'" . qml-mode))
#+end_src #+end_src
** Python ** Python
Silent offset warning Silent offset warning
#+begin_src emacs-lisp #+begin_src emacs-lisp
(setq python-indent-guess-indent-offset-verbose nil) (setq python-indent-guess-indent-offset-verbose nil)
#+end_src #+end_src
** C and C++ ** C and C++
*** Hooks *** Hooks
#+begin_src emacs-lisp #+begin_src emacs-lisp
;; (require 'doxymacs) ;; (require 'doxymacs)
(add-hook 'c-mode-hook (add-hook 'c-mode-hook
(lambda () (lambda ()
@ -1840,7 +1846,7 @@ Silent offset warning
#+end_src #+end_src
Add unicode quotes to the quote-list Add unicode quotes to the quote-list
#+begin_src emacs-lisp #+begin_src emacs-lisp
; (defvar font-latex-quote-list '(("``" "''") ("“" "”") ("<<" ">>" french) ("«" "»" french)) ; ; (defvar font-latex-quote-list '(("``" "''") ("“" "”") ("<<" ">>" french) ("«" "»" french)) ;
#+end_src #+end_src
Redefine fold ellipsis Redefine fold ellipsis
#+begin_src emacs-lisp #+begin_src emacs-lisp
@ -2125,7 +2131,7 @@ Silent offset warning
with font selection. The function below patches the annoying with font selection. The function below patches the annoying
behavior, by defaulting to the default behavior if the prefix behavior, by defaulting to the default behavior if the prefix
argument is 0 argument is 0
#+begin_src emacs-lisp #+begin_src emacs-lisp
(defun wilder/TeX-font (replace what) (defun wilder/TeX-font (replace what)
"Insert template for font change command. "Insert template for font change command.
If REPLACE is not nil, replace current font. WHAT determines the font If REPLACE is not nil, replace current font. WHAT determines the font
@ -2179,7 +2185,7 @@ Silent offset warning
(save-excursion (save-excursion
(insert after)))))) (insert after))))))
(advice-add 'TeX-font :override #'wilder/TeX-font) (advice-add 'TeX-font :override #'wilder/TeX-font)
#+end_src #+end_src
*** The hook *** The hook
#+begin_src emacs-lisp #+begin_src emacs-lisp
(add-hook 'LaTeX-mode-hook (add-hook 'LaTeX-mode-hook
@ -2265,7 +2271,7 @@ Silent offset warning
I prefer to keep one server for each KDE activity, so I prefer to keep one server for each KDE activity, so
set the server name to be the name of the current activity set the server name to be the name of the current activity
#+begin_src emacs-lisp #+begin_src emacs-lisp
; (setq server-name (kde-current-activity-name)) ; (setq server-name (kde-current-activity-name))
#+end_src #+end_src
*** Journal *** Journal
Setup ~org-journal~ Setup ~org-journal~
@ -2376,6 +2382,7 @@ Silent offset warning
:append) :append)
#+end_src #+end_src
*** magit-todos *** magit-todos
#+begin_src emacs-lisp #+begin_src emacs-lisp
(require 'magit-todos) (require 'magit-todos)
#+end_src #+end_src
@ -2623,7 +2630,7 @@ Silent offset warning
#+end_src #+end_src
* Moving to colemak * Moving to colemak
Set up all possible combinations of modifiers Set up all possible combinations of modifiers
#+begin_src emacs-lisp #+begin_src emacs-lisp
(defun concat-recursive (b &optional a) (defun concat-recursive (b &optional a)
(if b (if b
@ -2703,7 +2710,7 @@ Set up all possible combinations of modifiers
(reset-key-translation-map)) (reset-key-translation-map))
;; (untarmak-modifiers) ;; (untarmak-modifiers)
(tarmak-avy) (tarmak-avy)
#+end_src #+end_src
* Finale * Finale
@ -2724,5 +2731,5 @@ Set up all possible combinations of modifiers
#+end_src #+end_src
** Start server ** Start server
#+begin_src emacs-lisp #+begin_src emacs-lisp
; (server-start) ; (server-start)
#+end_src #+end_src

Loading…
Cancel
Save