Compare commits
6 Commits
a45a19f904
...
64b5310853
| Author | SHA1 | Date | |
|---|---|---|---|
| 64b5310853 | |||
| b9d991425f | |||
| aaa9e33801 | |||
| b9cf1441dd | |||
| 152c17643a | |||
| fa7c7ca3ed |
384
init.el
384
init.el
@ -125,7 +125,6 @@
|
|||||||
eyebrowse-mode
|
eyebrowse-mode
|
||||||
projectile-mode
|
projectile-mode
|
||||||
yas-global-mode
|
yas-global-mode
|
||||||
semantic-mode
|
|
||||||
global-git-commit-mode))
|
global-git-commit-mode))
|
||||||
(with-demoted-errors "Cannot activate mode: %s"
|
(with-demoted-errors "Cannot activate mode: %s"
|
||||||
(funcall mode +1)))
|
(funcall mode +1)))
|
||||||
@ -920,24 +919,7 @@
|
|||||||
|
|
||||||
(unless (memq #'org-clock-save
|
(unless (memq #'org-clock-save
|
||||||
(mapcar #'timer--function timer-list))
|
(mapcar #'timer--function timer-list))
|
||||||
(run-with-timer 0 3600 #'org-clock-save))
|
(run-with-timer 0 3600 #'org-clock-save))))
|
||||||
|
|
||||||
;; Hack: The default implementation is too slow, because it is
|
|
||||||
;; parsing all properties of an entry by default. Let’s simplify
|
|
||||||
;; this to only parse what we are looking for. This makes tag
|
|
||||||
;; search *much* faster!
|
|
||||||
(with-eval-after-load 'org
|
|
||||||
(defun org-cached-entry-get (pom property)
|
|
||||||
(if (or (eq t org-use-property-inheritance)
|
|
||||||
(and (stringp org-use-property-inheritance)
|
|
||||||
(let ((case-fold-search t))
|
|
||||||
(string-match-p org-use-property-inheritance property)))
|
|
||||||
(and (listp org-use-property-inheritance)
|
|
||||||
(member-ignore-case property org-use-property-inheritance)))
|
|
||||||
;; Caching is not possible, check it directly.
|
|
||||||
(org-entry-get pom property 'inherit)
|
|
||||||
;; This is different in the original implementation
|
|
||||||
(org-entry-get pom property))))))
|
|
||||||
|
|
||||||
;; Drag-and-Drop images into org-mode buffer
|
;; Drag-and-Drop images into org-mode buffer
|
||||||
(use-package org-download
|
(use-package org-download
|
||||||
@ -972,17 +954,17 @@
|
|||||||
org-clock-auto-clock-resolution 'when-no-clock-is-running
|
org-clock-auto-clock-resolution 'when-no-clock-is-running
|
||||||
org-clock-mode-line-total 'auto
|
org-clock-mode-line-total 'auto
|
||||||
org-clock-report-include-clocking-task t
|
org-clock-report-include-clocking-task t
|
||||||
org-clock-in-switch-to-state (lambda (_)
|
org-clock-in-switch-to-state #'(lambda (_)
|
||||||
(when (not
|
(when (not
|
||||||
(and (boundp 'org-capture-mode)
|
(and (boundp 'org-capture-mode)
|
||||||
org-capture-mode))
|
org-capture-mode))
|
||||||
(cond
|
(cond
|
||||||
((member (org-get-todo-state)
|
((member (org-get-todo-state)
|
||||||
(list "TODO" "READ"))
|
(list "TODO" "READ"))
|
||||||
"CONT")
|
"CONT")
|
||||||
((member (org-get-todo-state)
|
((member (org-get-todo-state)
|
||||||
(list "GOTO"))
|
(list "GOTO"))
|
||||||
"ATTN"))))
|
"ATTN"))))
|
||||||
org-clock-persist t
|
org-clock-persist t
|
||||||
org-clock-persist-query-resume nil
|
org-clock-persist-query-resume nil
|
||||||
org-time-stamp-rounding-minutes '(1 1))
|
org-time-stamp-rounding-minutes '(1 1))
|
||||||
@ -1294,60 +1276,6 @@
|
|||||||
(require 'ox-md)
|
(require 'ox-md)
|
||||||
(require 'ox-pandoc)))
|
(require 'ox-pandoc)))
|
||||||
|
|
||||||
(use-package ox-latex
|
|
||||||
:init (setq org-latex-default-class "scrartcl"
|
|
||||||
org-latex-listings t
|
|
||||||
org-latex-compiler "lualatex")
|
|
||||||
:config (progn
|
|
||||||
(add-to-list 'org-latex-classes
|
|
||||||
`("scrartcl"
|
|
||||||
,(concat "\\documentclass[parskip=half,colorlinks]{scrartcl}\n"
|
|
||||||
"[DEFAULT-PACKAGES]"
|
|
||||||
"[PACKAGES]"
|
|
||||||
"
|
|
||||||
\\lstset{
|
|
||||||
basewidth=0.5em,
|
|
||||||
keywordstyle=\\textcolor{blue!80!white},
|
|
||||||
basicstyle=\\ttfamily,
|
|
||||||
commentstyle={\\itshape},
|
|
||||||
frame=tb,
|
|
||||||
showspaces=false,
|
|
||||||
showtabs=false,
|
|
||||||
showstringspaces=false,
|
|
||||||
}
|
|
||||||
"
|
|
||||||
"[EXTRA]\n")
|
|
||||||
("\\section{%s}" . "\\section*{%s}")
|
|
||||||
("\\subsection{%s}" . "\\subsection*{%s}")
|
|
||||||
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
|
|
||||||
("\\paragraph{%s}" . "\\paragraph*{%s}")
|
|
||||||
("\\subparagraph{%s}" . "\\subparagraph*{%s}")))
|
|
||||||
(add-to-list 'org-latex-classes
|
|
||||||
`("beamer"
|
|
||||||
,(concat "\\documentclass[presentation]{beamer}\n"
|
|
||||||
"[DEFAULT-PACKAGES]"
|
|
||||||
"[PACKAGES]"
|
|
||||||
"
|
|
||||||
\\lstset{
|
|
||||||
basewidth=0.5em,
|
|
||||||
keywordstyle=\\textcolor{blue!80!white},
|
|
||||||
basicstyle=\\ttfamily,
|
|
||||||
commentstyle={\\itshape},
|
|
||||||
frame=tb,
|
|
||||||
showspaces=false,
|
|
||||||
showtabs=false,
|
|
||||||
showstringspaces=false,
|
|
||||||
}
|
|
||||||
"
|
|
||||||
"[EXTRA]\n")
|
|
||||||
("\\section{%s}" . "\\section*{%s}")
|
|
||||||
("\\subsection{%s}" . "\\subsection*{%s}")
|
|
||||||
("\\subsubsection{%s}" . "\\subsubsection*{%s}")))
|
|
||||||
(add-to-list 'org-latex-packages-alist
|
|
||||||
'("" "listings"))
|
|
||||||
(add-to-list 'org-latex-packages-alist
|
|
||||||
'("" "xcolor"))))
|
|
||||||
|
|
||||||
(use-package ox-html
|
(use-package ox-html
|
||||||
:init (setq org-html-postamble nil))
|
:init (setq org-html-postamble nil))
|
||||||
|
|
||||||
@ -1387,11 +1315,6 @@
|
|||||||
(("C-c n l" . org-roam-buffer-toggle)
|
(("C-c n l" . org-roam-buffer-toggle)
|
||||||
("C-c n g" . org-roam-graph))))
|
("C-c n g" . org-roam-graph))))
|
||||||
|
|
||||||
(use-package org-ref
|
|
||||||
:config (progn
|
|
||||||
(require 'org-ref-pdf)
|
|
||||||
(require 'org-ref-url-utils)))
|
|
||||||
|
|
||||||
|
|
||||||
;; * General Programming
|
;; * General Programming
|
||||||
|
|
||||||
@ -1402,9 +1325,9 @@
|
|||||||
ediff-show-clashes-only t)
|
ediff-show-clashes-only t)
|
||||||
:config (progn
|
:config (progn
|
||||||
(add-hook 'ediff-keymap-setup-hook
|
(add-hook 'ediff-keymap-setup-hook
|
||||||
'(lambda ()
|
#'(lambda ()
|
||||||
(bind-key "j" #'ediff-next-difference ediff-mode-map)
|
(bind-key "j" #'ediff-next-difference ediff-mode-map)
|
||||||
(bind-key "k" #'ediff-previous-difference ediff-mode-map)))
|
(bind-key "k" #'ediff-previous-difference ediff-mode-map)))
|
||||||
|
|
||||||
(add-hook 'ediff-after-quit-hook-internal 'winner-undo)))
|
(add-hook 'ediff-after-quit-hook-internal 'winner-undo)))
|
||||||
|
|
||||||
@ -1465,30 +1388,6 @@
|
|||||||
:commands (page-break-lines-mode)
|
:commands (page-break-lines-mode)
|
||||||
:diminish page-break-lines-mode)
|
:diminish page-break-lines-mode)
|
||||||
|
|
||||||
(use-package semantic
|
|
||||||
:commands (semantic-mode)
|
|
||||||
:init (progn
|
|
||||||
(setq semantic-default-submodes
|
|
||||||
'(global-semantic-idle-scheduler-mode
|
|
||||||
global-semanticdb-minor-mode))
|
|
||||||
|
|
||||||
;; Disable global key bindings as we are not using them;
|
|
||||||
;; cf. https://emacs.stackexchange.com/questions/32389/how-do-you-disable-all-keybinding-for-a-package
|
|
||||||
(setq semantic-mode-map (make-sparse-keymap)))
|
|
||||||
:config (progn
|
|
||||||
(require 'semantic/ia)
|
|
||||||
(require 'semantic/bovine/el)
|
|
||||||
|
|
||||||
;; recognize `use-package' as include statement; the function seems
|
|
||||||
;; to have to be a byte-compiled function, for otherwise it just
|
|
||||||
;; won’t work … ?
|
|
||||||
(eval `(semantic-elisp-setup-form-parser
|
|
||||||
,(lambda (form start end)
|
|
||||||
(ignore start end)
|
|
||||||
(semantic-tag-new-include (symbol-name (nth 1 form))
|
|
||||||
nil))
|
|
||||||
use-package))))
|
|
||||||
|
|
||||||
(use-package flycheck
|
(use-package flycheck
|
||||||
:ensure t
|
:ensure t
|
||||||
:commands (global-flycheck-mode flycheck-mode)
|
:commands (global-flycheck-mode flycheck-mode)
|
||||||
@ -1597,12 +1496,12 @@
|
|||||||
"User-Agent:"))
|
"User-Agent:"))
|
||||||
|
|
||||||
message-citation-line-function
|
message-citation-line-function
|
||||||
(lambda ()
|
#'(lambda ()
|
||||||
(when message-reply-headers
|
(when message-reply-headers
|
||||||
(insert "ghItlhpu' "
|
(insert "ghItlhpu' "
|
||||||
(mail-header-from message-reply-headers)
|
(mail-header-from message-reply-headers)
|
||||||
":")
|
":")
|
||||||
(newline))))
|
(newline))))
|
||||||
|
|
||||||
;; Gnus Appearence
|
;; Gnus Appearence
|
||||||
|
|
||||||
@ -1891,20 +1790,20 @@
|
|||||||
;; Visit group under point and immediately close it; this updates
|
;; Visit group under point and immediately close it; this updates
|
||||||
;; gnus’ registry as a side-effect
|
;; gnus’ registry as a side-effect
|
||||||
(bind-key "v u"
|
(bind-key "v u"
|
||||||
'(lambda ()
|
#'(lambda ()
|
||||||
(interactive)
|
(interactive)
|
||||||
(save-mark-and-excursion
|
(save-mark-and-excursion
|
||||||
(when (gnus-topic-select-group)
|
(when (gnus-topic-select-group)
|
||||||
(gnus-summary-exit))))
|
(gnus-summary-exit))))
|
||||||
gnus-group-mode-map)
|
gnus-group-mode-map)
|
||||||
|
|
||||||
;; Toggle visibility of News group
|
;; Toggle visibility of News group
|
||||||
(bind-key "v c"
|
(bind-key "v c"
|
||||||
(lambda ()
|
#'(lambda ()
|
||||||
(interactive)
|
(interactive)
|
||||||
(save-mark-and-excursion
|
(save-mark-and-excursion
|
||||||
(gnus-topic-jump-to-topic "News")
|
(gnus-topic-jump-to-topic "News")
|
||||||
(gnus-topic-read-group)))
|
(gnus-topic-read-group)))
|
||||||
gnus-group-mode-map)
|
gnus-group-mode-map)
|
||||||
|
|
||||||
(bind-key "C-<return>" #'db/gnus-summary-open-Link gnus-summary-mode-map)
|
(bind-key "C-<return>" #'db/gnus-summary-open-Link gnus-summary-mode-map)
|
||||||
@ -2106,9 +2005,9 @@
|
|||||||
(ediff-files file2 file1)
|
(ediff-files file2 file1)
|
||||||
(ediff-files file1 file2))
|
(ediff-files file1 file2))
|
||||||
(add-hook 'ediff-after-quit-hook-internal
|
(add-hook 'ediff-after-quit-hook-internal
|
||||||
(lambda ()
|
#'(lambda ()
|
||||||
(setq ediff-after-quit-hook-internal nil)
|
(setq ediff-after-quit-hook-internal nil)
|
||||||
(set-window-configuration wnd))))
|
(set-window-configuration wnd))))
|
||||||
(error "No more than 2 files should be marked"))))
|
(error "No more than 2 files should be marked"))))
|
||||||
|
|
||||||
(defun dired-back-to-top ()
|
(defun dired-back-to-top ()
|
||||||
@ -2380,11 +2279,6 @@ With given ARG, display files in `db/important-document-path’."
|
|||||||
imenu-use-popup-menu nil
|
imenu-use-popup-menu nil
|
||||||
imenu-eager-completion-buffer t))
|
imenu-eager-completion-buffer t))
|
||||||
|
|
||||||
(use-package eyebrowse
|
|
||||||
:ensure t
|
|
||||||
:commands (eyebrowse-mode)
|
|
||||||
:init (setq eyebrowse-keymap-prefix (kbd "C-c w")))
|
|
||||||
|
|
||||||
(use-package goto-last-change
|
(use-package goto-last-change
|
||||||
:commands goto-last-change)
|
:commands goto-last-change)
|
||||||
|
|
||||||
@ -2468,9 +2362,9 @@ With given ARG, display files in `db/important-document-path’."
|
|||||||
(add-hook 'emms-player-started-hook 'emms-show)
|
(add-hook 'emms-player-started-hook 'emms-show)
|
||||||
|
|
||||||
(advice-add 'emms-tag-editor-submit
|
(advice-add 'emms-tag-editor-submit
|
||||||
:after (lambda (&rest r)
|
:after #'(lambda (&rest r)
|
||||||
(ignore r)
|
(ignore r)
|
||||||
(delete-window)))
|
(delete-window)))
|
||||||
|
|
||||||
(unless (eq system-type 'windows-nt)
|
(unless (eq system-type 'windows-nt)
|
||||||
(setq emms-source-file-directory-tree-function
|
(setq emms-source-file-directory-tree-function
|
||||||
@ -2480,9 +2374,9 @@ With given ARG, display files in `db/important-document-path’."
|
|||||||
;; no matter what previous values or customization may say otherwise
|
;; no matter what previous values or customization may say otherwise
|
||||||
;; … so we need to employ a hook to change its value
|
;; … so we need to employ a hook to change its value
|
||||||
(add-hook 'emms-playlist-mode-hook
|
(add-hook 'emms-playlist-mode-hook
|
||||||
(lambda ()
|
#'(lambda ()
|
||||||
(setq emms-playlist-insert-track-function
|
(setq emms-playlist-insert-track-function
|
||||||
#'db/emms-playlist-mode-insert-track)))
|
#'db/emms-playlist-mode-insert-track)))
|
||||||
|
|
||||||
(run-with-timer 0 3600 #'emms-cache-save)))
|
(run-with-timer 0 3600 #'emms-cache-save)))
|
||||||
|
|
||||||
@ -2538,14 +2432,14 @@ With given ARG, display files in `db/important-document-path’."
|
|||||||
:init (setq explicit-shell-file-name "/bin/bash")
|
:init (setq explicit-shell-file-name "/bin/bash")
|
||||||
:config (progn
|
:config (progn
|
||||||
(add-hook 'term-exec-hook ; oremacs.com
|
(add-hook 'term-exec-hook ; oremacs.com
|
||||||
(lambda ()
|
#'(lambda ()
|
||||||
(let* ((buff (current-buffer))
|
(let* ((buff (current-buffer))
|
||||||
(proc (get-buffer-process buff)))
|
(proc (get-buffer-process buff)))
|
||||||
(set-process-sentinel
|
(set-process-sentinel
|
||||||
proc
|
proc
|
||||||
`(lambda (process event)
|
`(lambda (process event)
|
||||||
(if (string= event "finished\n")
|
(if (string= event "finished\n")
|
||||||
(kill-buffer ,buff)))))))
|
(kill-buffer ,buff)))))))
|
||||||
|
|
||||||
;; does not work; C-c is shadowed by some minor modes like semantic,
|
;; does not work; C-c is shadowed by some minor modes like semantic,
|
||||||
;; projectile, and winner
|
;; projectile, and winner
|
||||||
@ -2563,7 +2457,7 @@ With given ARG, display files in `db/important-document-path’."
|
|||||||
(unbind-key "C-x C-j" term-raw-map)
|
(unbind-key "C-x C-j" term-raw-map)
|
||||||
(unbind-key "C-x g" term-raw-map))
|
(unbind-key "C-x g" term-raw-map))
|
||||||
|
|
||||||
(add-hook 'term-mode-hook (lambda () (yas-minor-mode -1)))))
|
(add-hook 'term-mode-hook #'(lambda () (yas-minor-mode -1)))))
|
||||||
|
|
||||||
(use-package ansi-color
|
(use-package ansi-color
|
||||||
:commands (ansi-color-for-comint-mode-on
|
:commands (ansi-color-for-comint-mode-on
|
||||||
@ -2594,9 +2488,9 @@ With given ARG, display files in `db/important-document-path’."
|
|||||||
;; stick to that.
|
;; stick to that.
|
||||||
|
|
||||||
(add-hook 'shell-mode-hook
|
(add-hook 'shell-mode-hook
|
||||||
(lambda ()
|
#'(lambda ()
|
||||||
(setq-local completion-in-region-function
|
(setq-local completion-in-region-function
|
||||||
#'completion--in-region)))))
|
#'completion--in-region)))))
|
||||||
|
|
||||||
(use-package db-eshell
|
(use-package db-eshell
|
||||||
:commands (db/run-or-hide-eshell
|
:commands (db/run-or-hide-eshell
|
||||||
@ -2639,11 +2533,11 @@ With given ARG, display files in `db/important-document-path’."
|
|||||||
|
|
||||||
(if (<= emacs-major-version 27)
|
(if (<= emacs-major-version 27)
|
||||||
(add-hook 'eshell-mode-hook
|
(add-hook 'eshell-mode-hook
|
||||||
(lambda ()
|
#'(lambda ()
|
||||||
(bind-key "C-a" #'eshell-bol eshell-mode-map)
|
(bind-key "C-a" #'eshell-bol eshell-mode-map)
|
||||||
(bind-key "M-r" #'eshell-insert-history eshell-mode-map)
|
(bind-key "M-r" #'eshell-insert-history eshell-mode-map)
|
||||||
(bind-key "M-P" #'eshell-previous-prompt eshell-mode-map)
|
(bind-key "M-P" #'eshell-previous-prompt eshell-mode-map)
|
||||||
(bind-key "M-N" #'eshell-next-prompt eshell-mode-map)))
|
(bind-key "M-N" #'eshell-next-prompt eshell-mode-map)))
|
||||||
;; In Emacs 28.1, eshell's mode maps have been refactored to
|
;; In Emacs 28.1, eshell's mode maps have been refactored to
|
||||||
;; follow standard extensibility. There's thus no need
|
;; follow standard extensibility. There's thus no need
|
||||||
;; anymore to use the special hook construction.
|
;; anymore to use the special hook construction.
|
||||||
@ -2662,8 +2556,8 @@ With given ARG, display files in `db/important-document-path’."
|
|||||||
;; `pcomplete-ignore-case’ is non-nil by default.
|
;; `pcomplete-ignore-case’ is non-nil by default.
|
||||||
(when on-windows
|
(when on-windows
|
||||||
(add-to-list 'eshell-mode-hook
|
(add-to-list 'eshell-mode-hook
|
||||||
(lambda ()
|
#'(lambda ()
|
||||||
(setq pcomplete-ignore-case nil))))
|
(setq pcomplete-ignore-case nil))))
|
||||||
|
|
||||||
;; Sometimes, when completing path names and immediately
|
;; Sometimes, when completing path names and immediately
|
||||||
;; hitting RET, `completion-in-region-mode' still seems to be
|
;; hitting RET, `completion-in-region-mode' still seems to be
|
||||||
@ -2784,7 +2678,7 @@ With given ARG, display files in `db/important-document-path’."
|
|||||||
(ccl ("ccl") :coding-system utf-8-unix))
|
(ccl ("ccl") :coding-system utf-8-unix))
|
||||||
slime-repl-history-remove-duplicates t
|
slime-repl-history-remove-duplicates t
|
||||||
slime-repl-history-trim-whitespaces t)
|
slime-repl-history-trim-whitespaces t)
|
||||||
(add-hook 'lisp-mode-hook '(lambda () (slime-mode +1)) t))
|
(add-hook 'lisp-mode-hook #'(lambda () (slime-mode +1)) t))
|
||||||
:config (progn
|
:config (progn
|
||||||
(make-directory "/tmp/slime-fasls/" t)
|
(make-directory "/tmp/slime-fasls/" t)
|
||||||
(slime-setup '(slime-repl slime-fancy slime-autodoc))
|
(slime-setup '(slime-repl slime-fancy slime-autodoc))
|
||||||
@ -2850,99 +2744,93 @@ With given ARG, display files in `db/important-document-path’."
|
|||||||
(add-hook 'LaTeX-mode-hook #'turn-on-reftex)
|
(add-hook 'LaTeX-mode-hook #'turn-on-reftex)
|
||||||
(add-hook 'latex-mode-hook #'turn-on-reftex)
|
(add-hook 'latex-mode-hook #'turn-on-reftex)
|
||||||
|
|
||||||
(add-hook 'LaTeX-mode-hook '(lambda ()
|
(add-hook 'LaTeX-mode-hook #'(lambda ()
|
||||||
(TeX-PDF-mode 1)
|
(TeX-PDF-mode 1)
|
||||||
(TeX-source-correlate-mode 1)
|
(TeX-source-correlate-mode 1)
|
||||||
(TeX-fold-mode 1)))
|
(TeX-fold-mode 1)))
|
||||||
|
|
||||||
|
|
||||||
(add-to-list 'TeX-view-program-selection
|
(add-to-list 'TeX-view-program-selection
|
||||||
'(output-pdf "Evince"))
|
'(output-pdf "Evince"))
|
||||||
|
|
||||||
;; use pdf-tools when loaded
|
|
||||||
(with-eval-after-load 'pdf-tools
|
|
||||||
(add-to-list 'TeX-view-program-selection '(output-pdf "PDF Tools"))
|
|
||||||
(add-to-list 'TeX-after-compilation-finished-functions
|
|
||||||
#'TeX-revert-document-buffer))
|
|
||||||
|
|
||||||
;; style used for my personal definitions; not clear whether this
|
;; style used for my personal definitions; not clear whether this
|
||||||
;; works as intended
|
;; works as intended
|
||||||
(TeX-add-style-hook
|
(TeX-add-style-hook
|
||||||
"mydefs"
|
"mydefs"
|
||||||
(lambda ()
|
#'(lambda ()
|
||||||
(TeX-run-style-hooks "etex"
|
(TeX-run-style-hooks "etex"
|
||||||
"etoolbox"
|
"etoolbox"
|
||||||
"ifthen"
|
"ifthen"
|
||||||
"amsmath"
|
"amsmath"
|
||||||
"amssymb"
|
"amssymb"
|
||||||
"latexsym"
|
"latexsym"
|
||||||
"mathabx"
|
"mathabx"
|
||||||
"stmaryrd"
|
"stmaryrd"
|
||||||
"verbatim"
|
"verbatim"
|
||||||
"graphicx"
|
"graphicx"
|
||||||
"enumerate"
|
"enumerate"
|
||||||
"array"
|
"array"
|
||||||
"booktabs"
|
"booktabs"
|
||||||
"ulem"
|
"ulem"
|
||||||
"nicefrac"
|
"nicefrac"
|
||||||
"listings"
|
"listings"
|
||||||
"microtype"
|
"microtype"
|
||||||
"tabularx"
|
"tabularx"
|
||||||
"tikz"
|
"tikz"
|
||||||
"csquotes"
|
"csquotes"
|
||||||
"ntheorem"
|
"ntheorem"
|
||||||
"xspace")
|
"xspace")
|
||||||
(LaTeX-add-environments
|
(LaTeX-add-environments
|
||||||
'("Exercise" LaTeX-env-label)
|
'("Exercise" LaTeX-env-label)
|
||||||
'("Theorem" LaTeX-env-label)
|
'("Theorem" LaTeX-env-label)
|
||||||
'("Proposition" LaTeX-env-label)
|
'("Proposition" LaTeX-env-label)
|
||||||
'("Lemma" LaTeX-env-label)
|
'("Lemma" LaTeX-env-label)
|
||||||
'("Corollary" LaTeX-env-label)
|
'("Corollary" LaTeX-env-label)
|
||||||
'("Remark" LaTeX-env-label)
|
'("Remark" LaTeX-env-label)
|
||||||
'("Example" LaTeX-env-label)
|
'("Example" LaTeX-env-label)
|
||||||
'("Definition" LaTeX-env-label)
|
'("Definition" LaTeX-env-label)
|
||||||
'("Proof" LaTeX-env-label))
|
'("Proof" LaTeX-env-label))
|
||||||
|
|
||||||
;; https://tex.stackexchange.com/questions/217799/auctex-11-88-bug-on-latex-env-label-cannot-automatically-insert-label
|
;; https://tex.stackexchange.com/questions/217799/auctex-11-88-bug-on-latex-env-label-cannot-automatically-insert-label
|
||||||
(setf (cadr reftex-insert-label-flags)
|
(setf (cadr reftex-insert-label-flags)
|
||||||
(concat (cadr reftex-insert-label-flags) "TLPDRCE"))
|
(concat (cadr reftex-insert-label-flags) "TLPDRCE"))
|
||||||
|
|
||||||
(dolist (label-spec
|
(dolist (label-spec
|
||||||
'(("Theorem" ?T "thm:" "~\\ref{%s}" t ("Theorem" "Thm.") nil)
|
'(("Theorem" ?T "thm:" "~\\ref{%s}" t ("Theorem" "Thm.") nil)
|
||||||
("Lemma" ?L "lem:" "~\\ref{%s}" t ("Lemma" "Lem.") nil)
|
("Lemma" ?L "lem:" "~\\ref{%s}" t ("Lemma" "Lem.") nil)
|
||||||
("Proposition" ?P "prop:" "~\\ref{%s}" t ("Proposition" "Prop.") nil)
|
("Proposition" ?P "prop:" "~\\ref{%s}" t ("Proposition" "Prop.") nil)
|
||||||
("Satz" ?T "thm:" "~\\ref{%s}" t ("Satz") nil)
|
("Satz" ?T "thm:" "~\\ref{%s}" t ("Satz") nil)
|
||||||
("Definition" ?D "def:" "~\\ref{%s}" t ("Definition" "Def.") nil)
|
("Definition" ?D "def:" "~\\ref{%s}" t ("Definition" "Def.") nil)
|
||||||
("Remark" ?R "rem:" "~\\ref{%s}" t ("Remark" "Rem.") nil)
|
("Remark" ?R "rem:" "~\\ref{%s}" t ("Remark" "Rem.") nil)
|
||||||
("Corollary" ?C "cor:" "~\\ref{%s}" t ("Corollary" "Cor.") nil)
|
("Corollary" ?C "cor:" "~\\ref{%s}" t ("Corollary" "Cor.") nil)
|
||||||
("Example" ?E "expl:" "~\\ref{%s}" t ("Example") nil)))
|
("Example" ?E "expl:" "~\\ref{%s}" t ("Example") nil)))
|
||||||
(add-to-list 'reftex-label-alist label-spec)
|
(add-to-list 'reftex-label-alist label-spec)
|
||||||
(add-to-list 'LaTeX-label-alist (cons (nth 0 label-spec)
|
(add-to-list 'LaTeX-label-alist (cons (nth 0 label-spec)
|
||||||
(nth 2 label-spec))))))
|
(nth 2 label-spec))))))
|
||||||
|
|
||||||
;; Add completion for cleverref’s reference macros; not clear
|
;; Add completion for cleverref’s reference macros; not clear
|
||||||
;; whether this works as intended
|
;; whether this works as intended
|
||||||
(TeX-add-style-hook
|
(TeX-add-style-hook
|
||||||
"cleveref"
|
"cleveref"
|
||||||
(lambda ()
|
#'(lambda ()
|
||||||
(add-to-list 'reftex-ref-style-alist
|
(add-to-list 'reftex-ref-style-alist
|
||||||
'("Cleveref" "cleveref"
|
'("Cleveref" "cleveref"
|
||||||
(("\\cref" ?c) ("\\Cref" ?C)
|
(("\\cref" ?c) ("\\Cref" ?C)
|
||||||
("\\cpageref" ?d) ("\\Cpageref" ?D))))
|
("\\cpageref" ?d) ("\\Cpageref" ?D))))
|
||||||
(reftex-ref-style-activate "Cleveref")
|
(reftex-ref-style-activate "Cleveref")
|
||||||
(TeX-add-symbols
|
(TeX-add-symbols
|
||||||
'("cref" TeX-arg-ref)
|
'("cref" TeX-arg-ref)
|
||||||
'("Cref" TeX-arg-ref)
|
'("Cref" TeX-arg-ref)
|
||||||
'("cpageref" TeX-arg-ref)
|
'("cpageref" TeX-arg-ref)
|
||||||
'("Cpageref" TeX-arg-ref))))
|
'("Cpageref" TeX-arg-ref))))
|
||||||
|
|
||||||
;; Language definitions
|
;; Language definitions
|
||||||
(add-hook 'TeX-language-de-hook
|
(add-hook 'TeX-language-de-hook
|
||||||
(lambda () (ispell-change-dictionary "de_DE")))
|
#'(lambda () (ispell-change-dictionary "de_DE")))
|
||||||
(add-hook 'TeX-language-en-hook
|
(add-hook 'TeX-language-en-hook
|
||||||
(lambda () (ispell-change-dictionary "en_US")))
|
#'(lambda () (ispell-change-dictionary "en_US")))
|
||||||
(add-hook 'TeX-mode-hook
|
(add-hook 'TeX-mode-hook
|
||||||
(lambda () (setq ispell-parser 'tex)))))
|
#'(lambda () (setq ispell-parser 'tex)))))
|
||||||
|
|
||||||
|
|
||||||
;; * Various Mode Configurations
|
;; * Various Mode Configurations
|
||||||
@ -2956,9 +2844,9 @@ With given ARG, display files in `db/important-document-path’."
|
|||||||
:init (progn
|
:init (progn
|
||||||
;; replace perl-mode with cperl-mode
|
;; replace perl-mode with cperl-mode
|
||||||
(mapc
|
(mapc
|
||||||
(lambda (pair)
|
#'(lambda (pair)
|
||||||
(if (eq (cdr pair) 'perl-mode)
|
(if (eq (cdr pair) 'perl-mode)
|
||||||
(setcdr pair 'cperl-mode)))
|
(setcdr pair 'cperl-mode)))
|
||||||
(append auto-mode-alist interpreter-mode-alist))
|
(append auto-mode-alist interpreter-mode-alist))
|
||||||
|
|
||||||
(setq cperl-hairy nil
|
(setq cperl-hairy nil
|
||||||
@ -2999,8 +2887,8 @@ With given ARG, display files in `db/important-document-path’."
|
|||||||
(message "Loaded eproject … done")
|
(message "Loaded eproject … done")
|
||||||
(with-eval-after-load 'message
|
(with-eval-after-load 'message
|
||||||
(add-hook 'message-setup-hook
|
(add-hook 'message-setup-hook
|
||||||
(lambda ()
|
#'(lambda ()
|
||||||
(eproject-mode -1))))))
|
(eproject-mode -1))))))
|
||||||
|
|
||||||
(use-package eww
|
(use-package eww
|
||||||
:init (setq eww-bookmarks-directory
|
:init (setq eww-bookmarks-directory
|
||||||
@ -3011,11 +2899,11 @@ With given ARG, display files in `db/important-document-path’."
|
|||||||
(add-hook 'haskell-mode-hook 'haskell-doc-mode)
|
(add-hook 'haskell-mode-hook 'haskell-doc-mode)
|
||||||
(add-hook 'haskell-mode-hook 'turn-on-haskell-indent)
|
(add-hook 'haskell-mode-hook 'turn-on-haskell-indent)
|
||||||
(add-hook 'haskell-mode-hook
|
(add-hook 'haskell-mode-hook
|
||||||
(lambda ()
|
#'(lambda ()
|
||||||
(company-mode +1)
|
(company-mode 1)
|
||||||
(set (make-local-variable 'company-backends)
|
(set (make-local-variable 'company-backends)
|
||||||
(append '((company-capf company-dabbrev-code))
|
(append '((company-capf company-dabbrev-code))
|
||||||
company-backends))))
|
company-backends))))
|
||||||
(add-hook 'haskell-mode-hook 'flycheck-mode)
|
(add-hook 'haskell-mode-hook 'flycheck-mode)
|
||||||
|
|
||||||
(with-demoted-errors "Non-Fatal Error: %s"
|
(with-demoted-errors "Non-Fatal Error: %s"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user