summaryrefslogtreecommitdiffstats
path: root/.emacs.d/lisp/bandali-org.el
diff options
context:
space:
mode:
authorAmin Bandali <bandali@kelar.org>2024-03-31 21:40:41 -0400
committerAmin Bandali <bandali@kelar.org>2024-03-31 21:51:30 -0400
commit90f051d46a1d9cfbae5d9c2984a96a621ae4a82a (patch)
tree30be03a58a2527f25ebb6f195c3c9fee5e1fe91a /.emacs.d/lisp/bandali-org.el
parent2fb78b99b55b612fc758397fdd421ae1de8a51ef (diff)
downloadconfigs-90f051d46a1d9cfbae5d9c2984a96a621ae4a82a.tar.gz
configs-90f051d46a1d9cfbae5d9c2984a96a621ae4a82a.tar.xz
configs-90f051d46a1d9cfbae5d9c2984a96a621ae4a82a.zip
Merge .emacs.d/lisp/bandali-*.el into .emacs.d/init.el
Somewhat major overhaul. Worth mentioning are the b/keymap-* wrappers added around the newly introduced keymap-* functions in GNU Emacs 29. Also dropped some mostly unused configs like exwm and org.
Diffstat (limited to '.emacs.d/lisp/bandali-org.el')
-rw-r--r--.emacs.d/lisp/bandali-org.el125
1 files changed, 0 insertions, 125 deletions
diff --git a/.emacs.d/lisp/bandali-org.el b/.emacs.d/lisp/bandali-org.el
deleted file mode 100644
index bdaff4e..0000000
--- a/.emacs.d/lisp/bandali-org.el
+++ /dev/null
@@ -1,125 +0,0 @@
-;;; bandali-org.el --- bandali's Org setup -*- lexical-binding: t; -*-
-
-;; Copyright (C) 2018-2022 Amin Bandali
-
-;; Author: Amin Bandali <bandali@gnu.org>
-;; Keywords: calendar, data, docs, hypermedia, outlines
-
-;; This program is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation, either version 3 of the License, or
-;; (at your option) any later version.
-
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with this program. If not, see <https://www.gnu.org/licenses/>.
-
-;;; Commentary:
-
-;; My set up for Org (org-mode) and all things Org.
-
-;;; Code:
-
-;; (setq org--inhibit-version-check t)
-
-(with-eval-after-load 'org
- (setq
- org-src-tab-acts-natively t
- org-src-preserve-indentation nil
- org-edit-src-content-indentation 0
- org-id-locations-file (b/var "org/id-locations.el")
- org-link-email-description-format "Email %c: %s" ; %.30s
- org-highlight-latex-and-related '(entities)
- org-use-speed-commands t
- org-startup-folded 'content
- org-catch-invisible-edits 'show-and-error
- org-log-done 'time
- org-pretty-entities t
- org-agenda-files '("~/usr/org/todos/personal.org"
- "~/usr/org/todos/habits.org"
- "~/src/git/masters-thesis/todo.org")
- org-agenda-start-on-weekday 0
- org-agenda-time-leading-zero t
- org-habit-graph-column 44
- org-latex-packages-alist '(("" "listings") ("" "color")))
- (add-to-list 'org-structure-template-alist '("L" . "src emacs-lisp") t)
- (add-to-list 'org-modules 'org-habit)
- (custom-set-faces
- '(org-latex-and-related ((t (:foreground "#b294bb")))))
- ;; local key bindings
- (define-key org-mode-map (kbd "M-L") #'org-insert-last-stored-link)
- (define-key org-mode-map (kbd "M-O") #'org-toggle-link-display)
- ;; hooks
- ;; `org-indent-mode' doesn't seem to play nice with
- ;; `display-fill-column-indicator'.
- ;; (add-hook 'org-mode-hook #'org-indent-mode)
- (add-hook 'org-mode-hook #'auto-fill-mode)
- (add-hook 'org-mode-hook #'flyspell-mode)
-
- ;; additional export backends
- (require 'ox-md)
-
- ;; asynchronous tangle, using emacs-async to asynchronously tangle an
- ;; org file. closely inspired by
- ;; https://github.com/dieggsy/dotfiles/tree/cc10edf7701958eff1cd94d4081da544d882a28c/emacs.d#dotfiles
- (defvar b/show-async-tangle-results nil
- "Keep *emacs* async buffers around for later inspection.")
-
- (defvar b/show-async-tangle-time nil
- "Show the time spent tangling the file.")
-
- (defun b/async-babel-tangle ()
- "Tangle org file asynchronously."
- (interactive)
- (let* ((file-tangle-start-time (current-time))
- (file (buffer-file-name))
- (file-nodir (file-name-nondirectory file))
- ;; (async-quiet-switch "-q")
- ;; (file-noext (file-name-sans-extension file))
- )
- (async-start
- `(lambda ()
- (require 'org)
- (org-babel-tangle-file ,file))
- (unless b/show-async-tangle-results
- `(lambda (result)
- (if result
- (message "Tangled %s%s"
- ,file-nodir
- (if b/show-async-tangle-time
- (format " (%.3fs)"
- (float-time (time-subtract (current-time)
- ',file-tangle-start-time)))
- ""))
- (message "Tangling %s failed" ,file-nodir)))))))
- (add-to-list
- 'safe-local-variable-values
- '(eval add-hook 'after-save-hook #'b/async-babel-tangle 'append 'local)))
-;; global key bindings
-(global-set-key (kbd "C-c a o a") #'org-agenda)
-
-(with-eval-after-load 'ox-latex
- (setq
- org-latex-listings 'listings
- ;; org-latex-prefer-user-labels t
- )
- (add-to-list 'org-latex-classes
- '("IEEEtran" "\\documentclass[11pt]{IEEEtran}"
- ("\\section{%s}" . "\\section*{%s}")
- ("\\subsection{%s}" . "\\subsection*{%s}")
- ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
- ("\\paragraph{%s}" . "\\paragraph*{%s}")
- ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
- t)
- (require 'ox-beamer))
-
-(with-eval-after-load 'ox-extra
- (declare-function ox-extras-activate "ox-extra" (extras))
- (ox-extras-activate '(latex-header-blocks ignore-headlines)))
-
-(provide 'bandali-org)
-;;; bandali-org.el ends here