22 KiB
Table of Contents
This is an ongoing evolution of Emacs configuration files, inspired by a bunch of online resources.
Installation
Different ways to install:
-
arch-linux: If
emacs-confis available in acustompacmanrepositorypacman -S emacs-conf ln -s /opt/emacs-conf/init ~/.config/emacs/ ln -s /opt/emacs-conf/early-init.el ~/.config/emacs/ -
debian: If
emacs-confis available in acustomaptrepositoryapt install emacs-conf ln -s /opt/emacs-conf/init ~/.config/emacs/ ln -s /opt/emacs-conf/early-init.el ~/.config/emacs/ -
manual: Download or clone git repo and point the emacs
initandearly-init.elfile to this configuration. -
old: 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 insidesripts/install.sh.
External programs
ripgrep(optional) used bycounsel-rg(packagecounsel)texlive-luatexforluainputenc.styused by org latex exporttexlive-xetexforrealscripts.styforKpRomanused by org latex export
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)
- To Article HTML (extended version)
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(e.g. 晴天) - (
diff-buffer-with-file) show a diff between buffer (current state) and file (saved state)
| PACKAGE_____________________ | VERSION______ | REPO_______ |
| ace-window | 20220911.358 | melpa |
| adaptive-wrap | 0.8 | elpa-gnu |
| all-the-icons | 20230909.2053 | melpa |
| all-the-icons-ivy-rich | 20230420.1234 | melpa |
| amx | 20230413.121 | melpa |
| anaconda-mode | 20230821.2131 | melpa |
| async | 20230528.622 | melpa |
| avy | 20230420.404 | melpa |
| awesome-tray | 4.2 | custom |
| biblio | 20230202.1721 | melpa |
| biblio-core | 20230202.1721 | melpa |
| bibtex-completion | 20230918.953 | melpa |
| bind-key | 20230203.2004 | melpa |
| cfrs | 20220129.1149 | melpa |
| citeproc | 20230228.1414 | melpa |
| cl-libify | 20181130.23 | melpa |
| company | 20231023.1033 | melpa |
| company-anaconda | 20230821.2126 | melpa |
| company-ledger | 20210910.25 | melpa |
| company-quickhelp | 20231026.1714 | melpa |
| company-statistics | 20170210.1933 | melpa |
| company-web | 20220115.2146 | melpa |
| compat | 29.1.4.2 | elpa-gnu |
| counsel | 20231025.2311 | melpa |
| crdt | 0.3.5 | elpa-gnu |
| ctable | 20210128.629 | melpa |
| dash | 20230714.723 | melpa |
| dashboard | 20231031.359 | melpa |
| deft | 20210707.1633 | melpa |
| delight | 1.7 | elpa-gnu |
| dialog | 0.2 | custom |
| diff-hl | 20230807.1516 | melpa |
| dim | 20160818.949 | melpa |
| elisp-refs | 20230920.201 | melpa |
| emacsql | 20230417.1448 | melpa |
| emacsql-sqlite | 20230225.2205 | melpa |
| emacsql-sqlite-builtin | 20230409.1847 | melpa |
| emojify | 20210108.1111 | melpa |
| ess | 20230807.1422 | melpa |
| ess-R-data-view | 20130509.1158 | melpa |
| f | 20230823.1159 | melpa |
| flycheck | 20230813.62 | melpa |
| flycheck-ledger | 20200304.2204 | melpa |
| flycheck-pos-tip | 20200516.16 | melpa |
| flyspell-correct | 20220520.63 | melpa |
| flyspell-correct-ivy | 20220520.63 | melpa |
| focus | 20221016.1846 | melpa |
| git-commit | 20231030.2243 | melpa |
| git-messenger | 20201202.1637 | melpa |
| gnuplot | 20230323.14 | melpa |
| helpful | 20231028.516 | melpa |
| ht | 20230703.558 | melpa |
| htmlize | 20210825.215 | melpa |
| hydra | 20220910.1206 | melpa |
| indent-guide | 20210115.4 | melpa |
| iscroll | 20220612.31 | melpa |
| ivy | 20231025.2311 | melpa |
| ivy-bibtex | 20210927.1205 | melpa |
| ivy-rich | 20230425.1422 | melpa |
| js2-mode | 20230628.238 | melpa |
| key-chord | 20230522.223 | melpa |
| langtool | 20230222.326 | melpa |
| ledger-mode | 20230925.1013 | melpa |
| lv | 20200507.1518 | melpa |
| magit | 20231103.1516 | melpa |
| magit-section | 20231014.1405 | melpa |
| markdown-mode | 20231028.853 | melpa |
| memoize | 20200103.2036 | melpa |
| mu4e-maildirs-extension | melpa | |
| multiple-cursors | 20230728.518 | melpa |
| notmuch | 20231006.2337 | melpa |
| ob-async | 20210428.2052 | melpa |
| olivetti | 20231104.538 | melpa |
| ol-notmuch | 20230511.2048 | melpa |
| org | 9.6.11 | elpa-gnu |
| org-appear | 20220617.2355 | melpa |
| org-brain | 20230217.1908 | melpa |
| org-cliplink | 20201126.102 | melpa |
| org-contrib | 0.4.2 | elpa-nongnu |
| org-drill | 20210427.2003 | melpa |
| org-fancy-priorities | 20210830.1657 | melpa |
| org-fragtog | 20220714.2146 | melpa |
| orgit | 20230917.1001 | melpa |
| org-ref | 20231101.2355 | melpa |
| org-roam | 20230307.1721 | melpa |
| org-roam-bibtex | 20230628.2036 | melpa |
| org-roam-timestamps | 20221104.1544 | melpa |
| org-roam-ui | 20221105.104 | melpa |
| org-sticky-header | 20201223.143 | melpa |
| org-superstar | 20230116.1358 | melpa |
| org-table-sticky-header | 20190924.506 | melpa |
| ov | 20230522.1117 | melpa |
| ox-pandoc | 20230627.643 | melpa |
| ox-reveal | 20221127.814 | melpa |
| ox-tufte | 20231022.2117 | melpa |
| page-break-lines | 20230804.658 | melpa |
| parsebib | 20230228.153 | melpa |
| pdf-tools | 20230611.239 | melpa |
| persist | 0.5 | elpa-gnu |
| pfuture | 20220913.1401 | melpa |
| php-mode | 20230929.123 | melpa |
| pkg-info | 20150517.1143 | melpa |
| plantuml-mode | 20191102.2056 | melpa |
| polymode | 20230317.1218 | melpa |
| popup | 20230819.2306 | melpa |
| popwin | 20210215.1849 | melpa |
| posframe | 20230714.227 | melpa |
| pos-tip | 20230721.834 | melpa |
| powershell | 20220805.1712 | melpa |
| pythonic | 20230821.1733 | melpa |
| queue | 0.2 | elpa-gnu |
| rainbow-mode | 1.0.6 | elpa-gnu |
| restart-emacs | 20201127.1425 | melpa |
| s | 20220902.1511 | melpa |
| seq | 2.24 | elpa-gnu |
| simple-httpd | 20230821.1458 | melpa |
| spacemacs-theme | 20230530.1751 | melpa |
| sphinx-doc | 20210213.125 | melpa |
| sql-indent | 1.7 | elpa-gnu |
| srefactor | 20230504.617 | melpa |
| stickyfunc-enhance | 20150429.1814 | melpa |
| string-inflection | 20220910.1306 | melpa |
| swiper | 20231025.2311 | melpa |
| systemd | 20230201.302 | melpa |
| tablist | 20231019.1126 | melpa |
| transient | 20231103.2312 | melpa |
| treemacs | 20231101.115 | melpa |
| treemacs-magit | 20230830.1936 | melpa |
| use-package | 20230426.2324 | melpa |
| virtual-auto-fill | 20200906.2038 | melpa |
| visual-fill-column | 20230102.183 | melpa |
| vterm | 20230417.424 | melpa |
| web-completion-data | 20160318.848 | melpa |
| web-mode | 20231025.1927 | melpa |
| websocket | 20230809.305 | melpa |
| which-key | 20230905.2128 | melpa |
| with-editor | 20230917.958 | melpa |
| yasnippet | 20230914.14 | melpa |
| yasnippet-snippets | 20230815.82 | 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.
- see bib2htmlxxxxxx.blg for errors, e.g.
- 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" />
- can leads to:
TODOs
- Org / global configuration
- Page formatting
- Modify HTML styling
- Printed page layout, white styled figures
- Modify HTML styling
- Page formatting
- Figures
- Gnuplot
- plot transposed files/tables
- Gnuplot
- 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\"] }); });
-