12 KiB
Emacs Configuration
This is an ongoing evolution of Emacs configuration files, inspired by a bunch of online resources.
Installation
Download repo and point the emacs init (and early-init.el) file to
this configuration.
Or run one of the following install script commands (using curl, wget or fetch).
sh -c "$(curl -fsSL http://gitea.weseng.de/daniel/emacs/raw/master/scripts/install.sh)"
sh -c "$(wget -O- http://gitea.weseng.de/daniel/emacs/raw/master/scripts/install.sh)"
sh -c "$(fetch -o - http://gitea.weseng.de/daniel/emacs/raw/master/scripts/install.sh)"
Installation path is ~/.config/emacs. See details and other
installed linux packages as requirements inside sripts/install.sh.
Usage
See the emacs command my-help for some key-bindings and further
commands and information.
-
Org Templates
- Article:
?article[TAB]/ YASnippet - org-mode - Article Templates - Article - Letter:
?letter[TAB]/ YASnippet - org-mode - Letter Templates - Letter
- Article:
-
Org Export
-
To Article HTML (extended version)
my-org-article-html-export-to-html/ My - Org Export - Article HTMLmy-org-article-html-export-to-html-notify-async(F5) / My - Org Export - Article HTML async
-
To Article PDF (LaTeX, extended version)
my-org-article-latex-export-to-pdf/ My - Org Export - Article PDFmy-org-article-latex-export-to-pdf-notify-async(F6) / My - Org Export - Article PDF async
-
To Letter (LaTeX)
my-org-letter-latex-export-to-pdf(C-c C-e l t)
-
Packages
General key bindings and functions
C-r(query-replace-regexp) replace textC-x RET f(set-buffer-file-coding-system) e.g. set to =utf-8- (
decode-coding-region) e.g. decode toutf-8(郭富城Aaron Kwok) - (
diff-buffer-with-file) show a diff between buffer (current state) and file (saved state)
PACKAGE_____________________ VERSION______ REPO_______ ace-window 20200606.1259 melpa adaptive-wrap 0.8 elpa-gnu all-the-icons 20211225.506 melpa amx 20210305.118 melpa anaconda-mode 20211122.817 melpa async 20210823.528 melpa avy 20220102.805 melpa awesome-tray 4.2 custom biblio 20210418.406 melpa biblio-core 20210418.406 melpa bibtex-completion 20211019.1306 melpa bind-key 20210210.1609 melpa citeproc 20220101.1527 melpa cl-libify 20181130.230 melpa company 20220103.351 melpa company-anaconda 20200404.1859 melpa company-ledger 20210910.250 melpa company-quickhelp 20211115.1335 melpa company-web 20180402.1155 melpa counsel 20211230.1909 melpa crdt 0.2.7 elpa-gnu ctable 20210128.629 melpa dash 20210826.1149 melpa dashboard 20211221.2005 melpa deft 20210707.1633 melpa delight 1.7 elpa-gnu dialog 0.2 custom diff-hl 20211106.2353 melpa dim 20160818.949 melpa elisp-refs 20211009.1531 melpa emojify 20210108.1111 melpa ess 20211231.1746 melpa ess-R-data-view 20130509.1158 melpa f 20210624.1103 melpa flycheck 20210825.1804 melpa flycheck-ledger 20200304.2204 melpa flycheck-pos-tip 20200516.1600 melpa flyspell-correct 20210724.1042 melpa flyspell-correct-ivy 20210124.1143 melpa focus 20191209.2210 melpa git-commit 20220101.841 melpa git-messenger 20201202.1637 melpa gnuplot 20220102.1637 melpa helpful 20211226.1843 melpa ht 20210119.741 melpa htmlize 20210825.2150 melpa hydra 20220102.803 melpa indent-guide 20210115.400 melpa iscroll 20210128.1938 melpa ivy 20211231.1730 melpa ivy-bibtex 20210927.1205 melpa ivy-rich 20210409.931 melpa js2-mode 20211229.135 melpa key-chord 20201222.2030 melpa langtool 20200529.230 melpa ledger-mode 20211214.1449 melpa lv 20200507.1518 melpa magit 20220126.1645 melpa magit-section 20220101.841 melpa markdown-mode 20211022.55 melpa memoize 20200103.2036 melpa mu4e-maildirs-extension 20201028.921 melpa multiple-cursors 20211112.2223 melpa ob-async 20210428.2052 melpa org 9.5.2 elpa-gnu org-appear 20211202.604 melpa org-brain 20210706.1519 melpa org-cliplink 20201126.1020 melpa org-contrib 0.3 elpa-nongnu org-drill 20210427.2003 melpa org-fancy-priorities 20210830.1657 melpa org-fragtog 20220106.758 melpa orgit 20210620.1943 melpa org-ref 20220101.1941 melpa org-sticky-header 20201223.143 melpa org-superstar 20210915.1934 melpa org-table-sticky-header 20190924.506 melpa ov 20200326.1042 melpa ox-reveal 20220410.1533 melpa ox-tufte 20160926.1607 melpa page-break-lines 20210104.2224 melpa parsebib 20211208.2335 melpa pdf-tools 20220103.308 melpa persist 0.4 elpa-gnu pfuture 20211229.1513 melpa php-mode 20210808.1745 melpa plantuml-mode 20191102.2056 melpa polymode 20211124.913 melpa popup 20211231.1823 melpa popwin 20210215.1849 melpa pos-tip 20191227.1356 melpa powershell 20220103.925 melpa pythonic 20210122.1247 melpa queue 0.2 elpa-gnu rainbow-mode 1.0.5 elpa-gnu restart-emacs 20201127.1425 melpa s 20210616.619 melpa spacemacs-theme 20210924.1220 melpa sphinx-doc 20210213.1250 melpa sql-indent 1.6 elpa-gnu srefactor 20180703.1810 melpa stickyfunc-enhance 20150429.1814 melpa string-inflection 20210918.419 melpa swiper 20210919.1221 melpa systemd 20210209.2052 melpa transient 20220104.1601 melpa treemacs 20220104.1302 melpa treemacs-magit 20211010.1005 melpa use-package 20210207.1926 melpa virtual-auto-fill 20200906.2038 melpa visual-fill-column 20211118.33 melpa vterm 20211226.817 melpa web-completion-data 20160318.848 melpa web-mode 20220104.1504 melpa which-key 20220102.1433 melpa with-editor 20220101.1316 melpa yasnippet 20200604.246 melpa yasnippet-snippets 20210910.1959 melpa
Information
Interlock symlinks and auto-save files. Be aware that symbolic links of the form “.#*” are not auto-save files but interlocks to prevent the simultaneous editing of the same file. See Interlocking in the EmacsManual for details.
Errors
-
failed execution of bibtex2html
-
see bib2htmlxxxxxx.blg for errors, e.g.
- I couldn't open style file acmu.bst
- copy/merge the texmf directory into your home directory.
-
-
when using this in an Org mode buffer:
#+HEADER: :fit yes :imagemagick yes :iminoptions -density 300-
can leads to:
convert: attempt to perform an operation not allowed by the security policy `gs' @ error/delegate.c/ExternalDelegateCommand/378.convert: no images defined `DESY_logo_tikz.png' @ error/convert.c/ConvertImageCommand/3282.
-
edit
/etc/ImageMagick-7/policy.xmland comment out<policy domain="delegate" rights="none" pattern="gs" />
-
TODOs
-
Org / global configuration
-
Page formatting
-
Modify HTML styling
- Printed page layout, white styled figures
-
-
-
Figures
-
Gnuplot
- plot transposed files/tables
-
-
Tables
- Wrap Table in div element. For smartphone scrolling.
-
Table of contents
- \(\LaTeX\); currently headers with no-number property means not included in TOC
- HTML; currently generated list, like lot and lol, are not included in toc but own headers without numbers are.
-
Equation cancel/strike out with color line
- hcancel[color]{}
- Example:
\(\hcancel[red]{f_{X_2}(x_2)}}\) -
Definition:
- Preamble:
#+LATEX_HEADER: \usepackage{cancel}
#+LATEX_HEADER: \newcommand\hcancel[2][black]{\setbox0=\hbox{$#2$}%
#+LATEX_HEADER: \rlap{\raisebox{.45\ht0}{\textcolor{#1}{\rule{\wd0}{1pt}}}}#2}\\ -
hcancel: [\"{\\\\setbox0=\\\\hbox{$#2$}\\\\rlap{\\\\raisebox{.45\\\\ht0}{\\\\textcolor{#1}{\\\\rule{\\\\wd0}{1pt}}}}#2}\",2]MathJax.Ajax.config.path[\"Contrib\"] = \"https://cdn.mathjax.org/mathjax/contrib\"; MathJax.Hub.Register.StartupHook(\"TeX Jax Ready\",function () { MathJax.Hub.Insert(MathJax.InputJax.TeX.Definitions.macros,{ cancel: [\"Extension\",\"cancel\"], bcancel: [\"Extension\",\"cancel\"], xcancel: [\"Extension\",\"cancel\"], cancelto: [\"Extension\",\"cancel\"] }); });
- Preamble: