Emacs: better use of set (mostly combining)

This commit is contained in:
Marcel Kapfer 2018-02-23 09:52:42 +01:00
parent 8f3185c82b
commit b206903d31
Signed by: mmk2410
GPG key ID: CADE6F0C09F21B09

View file

@ -342,8 +342,11 @@
("\\paragraph{%s}" . "\\paragraph*{%s}") ("\\paragraph{%s}" . "\\paragraph*{%s}")
("\\subparagraph{%s}" . "\\subparagraph*{%s}")))) ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))))
;; latex related option (mainly support for lualatex)
(setq
;; add latex packages and configurations ;; add latex packages and configurations
(setq org-latex-packages-alist org-latex-packages-alist
'( '(
("" "booktabs" t) ("" "booktabs" t)
("" "listings" t) ("" "listings" t)
@ -352,38 +355,30 @@
("utf8" "luainputenc" t) ("utf8" "luainputenc" t)
("" "fontspec" t) ("" "fontspec" t)
("hidelinks" "hyperref" t) ("hidelinks" "hyperref" t)
("" "libertineotf" t)
("scale=0.9" "AnonymousPro" t) ("scale=0.9" "AnonymousPro" t)
"\\setmainfont{Linux Libertine O}" "\\setmainfont{Linux Libertine O}"
"\\setsansfont{Linux Biolinum O}" "\\setsansfont{Linux Biolinum O}"
"\\setmonofont{AnonymousPro}" "\\setmonofont{AnonymousPro}"
"\\addtokomafont{disposition}{\\fontspec{LinBiolinum_RB}}" "\\setdefaultlanguage{german}")
"\\setdefaultlanguage{german}"))
;; enable latex listings ;; enable latex listings
(setq org-latex-listings 'listings) org-latex-listings 'listings
;; latex listings options ;; latex listings options
(setq org-latex-listings-options org-latex-listings-options
'( '(
("frame" "single") ("frame" "single")
("rulesep" "6pt") ("rulesep" "6pt")
("backgroundcolor" "\\color{gray!20}") ("backgroundcolor" "\\color{gray!20}")
("basicstyle" "\\footnotesize\\ttfamily") ("basicstyle" "\\footnotesize\\ttfamily")
("breaklines" "true") ("breaklines" "true")))
))
;; remove unused default packages ;; remove unused default packages
(unless (boundp 'org-latex-default-packages-alist) (unless (boundp 'org-latex-default-packages-alist)
(setq org-latex-default-packages-alist nil)) (setq org-latex-default-packages-alist nil))
(setq org-latex-default-packages-alist (setq
(remove '("AUTO" "inputenc" t) org-latex-default-packages-alist)) org-latex-default-packages-alist (remove '("AUTO" "inputenc" t) org-latex-default-packages-alist)
(setq org-latex-default-packages-alist org-latex-default-packages-alist (remove '("" "fixltx2e" nil) org-latex-default-packages-alist)
(remove '("" "fixltx2e" nil) org-latex-default-packages-alist)) org-latex-default-packages-alist (remove '("" "hyperref" nil) org-latex-default-packages-alist)
(setq org-latex-default-packages-alist org-latex-default-packages-alist (remove '"\\tolerance=1000" org-latex-default-packages-alist))
(remove '("" "hyperref" nil) org-latex-default-packages-alist))
(setq org-latex-default-packages-alist
(remove '"\\tolerance=1000" org-latex-default-packages-alist))
;; syntax highlighting ;; syntax highlighting
(setq org-src-fontify-natively t) (setq org-src-fontify-natively t)
@ -395,9 +390,11 @@
;; Graphically indicate the fill column ;; Graphically indicate the fill column
(use-package fill-column-indicator (use-package fill-column-indicator
:config :config
(setq
;; set rule width to 5px ;; set rule width to 5px
(setq fci-rule-width 5) fci-rule-width 5
(setq fci-rule-color "#5B6268")) ;; set rule color
fci-rule-color "#5B6268"))
;; diff-hl ;; diff-hl
;; Highlight uncommitted changes using VC ;; Highlight uncommitted changes using VC
@ -527,12 +524,10 @@
;; Isearch with an overview. Oh, man! ;; Isearch with an overview. Oh, man!
(use-package swiper (use-package swiper
:config :config
(progn
(ivy-mode 1) (ivy-mode 1)
(setq ivy-use-virtual-buffers t) (setq ivy-use-virtual-buffers t
(setq ivy-display-style 'fancy) ivy-display-style 'fancy
(setq ivy-extra-directories nil) ivy-extra-directories nil)
(define-key read-expression-map (kbd "C-r") 'counsel-expression-history))
:bind :bind
(("C-s" . swiper) (("C-s" . swiper)
("C-r" . swiper))) ("C-r" . swiper)))
@ -562,8 +557,9 @@
(use-package ox-pandoc (use-package ox-pandoc
:mode ("\\.org$" . org-mode) :mode ("\\.org$" . org-mode)
:config :config
(setq org-pandoc-options-for-latex-pdf '((latex-engine . "lualatex"))) ;; use lualatex instead of pdflatex
(setq org-pandoc-options-for-beamer-pdf '((latex-engine . "lualatex")))) (setq org-pandoc-options-for-latex-pdf '((latex-engine . "lualatex"))
org-pandoc-options-for-beamer-pdf '((latex-engine . "lualatex"))))
;; org-trello ;; org-trello
;; Minor mode to synchronize org-mode buffer and trello board ;; Minor mode to synchronize org-mode buffer and trello board
@ -634,11 +630,11 @@
(("\\.html?\\'" . web-mode)) (("\\.html?\\'" . web-mode))
(("\\.css?\\'" . web-mode)) (("\\.css?\\'" . web-mode))
:config :config
(setq web-mode-markup-indent-offset 2) (setq web-mode-markup-indent-offset 2
(setq web-mode-css-indent-offset 2) web-mode-css-indent-offset 2
(setq web-mode-enable-css-colorization t) web-mode-enable-css-colorization t
(setq web-mode-code-indent-offset 2) web-mode-code-indent-offset 2
(setq web-mode-indent-style 2)) web-mode-indent-style 2))
;; dart-mode ;; dart-mode
;; Major mode for editing Dart files ;; Major mode for editing Dart files
@ -721,19 +717,17 @@
;; coffee-mode ;; coffee-mode
;; Major mode for CoffeeScript code ;; Major mode for CoffeeScript code
(use-package coffee-mode (use-package coffee-mode
:config
(setq whitespace-action '(auto-cleanup))
(setq whitespace-style '(trailing space-before-tab indentation empty space-after-tab))
(setq coffee-tab-width 2)
:mode (("\\.coffee\\'" . coffee-mode)) :mode (("\\.coffee\\'" . coffee-mode))
:config (setq whitespace-action '(auto-cleanup)
whitespace-style '(trailing space-before-tab indentation empty space-after-tab)
coffee-tab-width 2)
:hook (coffee-mode-hook whitespace-mode)) :hook (coffee-mode-hook whitespace-mode))
;; python ;; python
;; Python's flying circus support for Emacs ;; Python's flying circus support for Emacs
(use-package python (use-package python
:config
(setq flycheck-python-pylint-executable "pylint3"))
:mode (("\\.py\\'" . python-mode)) :mode (("\\.py\\'" . python-mode))
:config (setq flycheck-python-pylint-executable "pylint3"))
;; sr-speedbar ;; sr-speedbar
;; Same frame speedbar ;; Same frame speedbar
@ -753,40 +747,37 @@
mu4e-update-interval 300) mu4e-update-interval 300)
;; faster reindexing ;; faster reindexing
(setq (setq mu4e-maildir-index-cleanup nil
mu4e-maildir-index-cleanup nil
mu4e-index-lazy-check t) mu4e-index-lazy-check t)
;; smtpmail settings ;; smtpmail settings
(setq message-send-mail-function 'smtpmail-send-it (setq message-send-mail-function 'smtpmail-send-it
send-mail-function 'smtpmail-send-it) send-mail-function 'smtpmail-send-it)
;; don't save sent messages to "Sent" folder ;; general mu4e options
(setq mu4e-sent-messages-behavior 'delete) (setq
;; use mu4e as default emacs mailer ;; use mu4e as default emacs mailer
(setq mail-user-agent 'mu4e-user-agent) mail-user-agent 'mu4e-user-agent
;; don't keep message buffers around ;; don't keep message buffers around
(setq message-kill-buffer-on-exit t) message-kill-buffer-on-exit t
;; don't save sent messages to "Sent" folder
mu4e-sent-messages-behavior 'delete
;; complete date format ;; complete date format
(setq mu4e-headers-date-format "%Y-%m-%d %H:%M") mu4e-headers-date-format "%Y-%m-%d %H:%M"
;; show full addresses ;; show full addresses
(setq mu4e-view-show-addresses 't) mu4e-view-show-addresses 't
;; attachment directory ;; attachment directory
(setq mu4e-attachment-dir "/tmp") mu4e-attachment-dir "/tmp"
;; maildir
(setq mu4e-maildir "~/.mail")
;; don't reply to myself ;; don't reply to myself
(setq mu4e-compose-dont-reply-to-self t) mu4e-compose-dont-reply-to-self t
;; maildir
mu4e-maildir "~/.mail"
;; use correct account context when sending mail based from headers
message-sendmail-envelope-from 'header)
;; list of email addresses ;; list of email addresses
(setq mu4e-user-mail-address-list '("marcel.kapfer@uni-ulm.de" (setq mu4e-user-mail-address-list
'("marcel.kapfer@uni-ulm.de"
"marcel@marcel-kapfer.de" "marcel@marcel-kapfer.de"
"tex@mmk2410.org" "tex@mmk2410.org"
"me@mmk2410.org" "me@mmk2410.org"
@ -798,7 +789,8 @@
"opensource@mmk2410.org")) "opensource@mmk2410.org"))
;; customize mu4e list view ;; customize mu4e list view
(setq mu4e-headers-fields '((:human-date . 20) (setq mu4e-headers-fields
'((:human-date . 20)
(:flags . 6) (:flags . 6)
(:mailing-list . 10) (:mailing-list . 10)
(:from-or-to . 22) (:from-or-to . 22)
@ -812,12 +804,6 @@
(select-frame (make-frame)) (select-frame (make-frame))
(mu4e)) (mu4e))
;; spell checking
(add-hook 'mu4e-compose-mode-hook 'flyspell-mode)
;; use correct account context when sending mail based from headers
(setq message-sendmail-envelope-from 'header)
;; set citation line ;; set citation line
(setq message-citation-line-format "%f on %Y-%m-%d %H:%M %Z:\n") (setq message-citation-line-format "%f on %Y-%m-%d %H:%M %Z:\n")
(setq message-citation-line-function 'message-insert-citation-line) (setq message-citation-line-function 'message-insert-citation-line)
@ -881,11 +867,11 @@
;; custom shortcuts ;; custom shortcuts
(setq mu4e-maildir-shortcuts (setq mu4e-maildir-shortcuts
'(("/university/inbox" . ?u) '(("/university/inbox" . ?u)
("/university/fin.fin" . ?f) ("/university/fin/fin" . ?f)
("/university/fin.intern" . ?i) ("/university/fin/intern" . ?i)
("/mailbox/inbox" . ?m) ("/mailbox/inbox" . ?m)
("/mailbox/debian.devel-changes" . ?c) ("/mailbox/debian/devel-changes" . ?c)
("/mailbox/debian.user" . ?d))) ("/mailbox/debian/user" . ?d)))
;; always add myself as BCC ;; always add myself as BCC
(add-hook 'mu4e-compose-mode-hook (add-hook 'mu4e-compose-mode-hook
@ -967,9 +953,12 @@
TeX-source-correlate-start-server t TeX-source-correlate-start-server t
;; use pdf-tools with synctex ;; use pdf-tools with synctex
TeX-view-program-selection '((output-pdf "PDF Tools")) TeX-view-program-selection '((output-pdf "PDF Tools"))
TeX-source-correlate-start-server t TeX-source-correlate-start-server t)
)
(setq-default TeX-master nil (setq-default
;; set to nil, so AUCTeX always asks for the master file
TeX-master nil
;; use a decent, modern TeX engine
TeX-engine 'luatex)) TeX-engine 'luatex))
;; LaTeX with AUCTeX ;; LaTeX with AUCTeX