This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(use-package org-mode | |
:hook (org-mode . eldoc-mode) | |
:config | |
(font-lock-add-keywords | |
'org-mode | |
'(("\\(\\(?:\\\\\\(?:label\\|ref\\|eqref\\)\\)\\){\\(.+?\\)}" | |
(1 font-lock-keyword-face) | |
(2 font-lock-constant-face))))) | |
(use-package reftex |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require 'org-pcomplete) | |
(require 'org-compat) | |
(eval-when-compile (require 'cl-lib)) | |
(defun pcomplete/org-mode/file-option/bibliography () | |
"Complete arguments for the #+BIBLIOGRAPHY file option." | |
(require 'oc) | |
(pcomplete-here (append | |
(mapcar (lambda (bibfile) | |
(propertize bibfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Precompilation freezes emacs, do it in the background when possible. | |
(defun my/org-latex-preview-precompile-idle () | |
(when (featurep 'async) | |
(run-with-idle-timer | |
2 nil #'my/org-latex-preview-precompile-async | |
(current-buffer)))) | |
(defun my/org-latex-preview-precompile-async (&optional org-buf) | |
(when (buffer-live-p org-buf) | |
(with-current-buffer org-buf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun org-latex-preview-check-health (&optional inter) | |
"Inspect the relevent system state and setup. | |
INTER signals whether the function has been called interactively." | |
(interactive (list t)) | |
;; Collect information | |
(let* ((diag `(:interactive ,inter))) | |
(plist-put diag :org-version org-version) | |
;; modified variables | |
(plist-put diag :modified | |
(let ((list)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(use-package repeat | |
:if (version< "28.0" emacs-version) | |
:bind ("H-z" . repeat) | |
:hook (after-init . my/repeat-mode) | |
:config | |
(defun my/repeat-mode () | |
(let ((inhibit-message t) | |
(message-log-max nil)) | |
(repeat-mode))) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; This elisp code uses use-package, a macro to simplify configuration. It will | |
;; install it if it's not available, so please edit the following code as | |
;; appropriate before running it. | |
;; Note that this file does not define any auto-expanding YaSnippets. | |
;; Install use-package | |
(package-install 'use-package) | |
;; AucTeX settings - almost no changes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Code used in the demos at https://karthinks.com/software/avy-can-do-anything | |
;; Tweak as desired. | |
(package-install 'avy) | |
(setq avy-keys '(?q ?e ?r ?y ?u ?o ?p | |
?a ?s ?d ?f ?g ?h ?j | |
?k ?l ?' ?x ?c ?v ?b | |
?n ?, ?/)) | |