update readme

This commit is contained in:
2022-01-11 02:08:02 +01:00
parent 50fd2b06ed
commit 2ffe448212
2 changed files with 288 additions and 456 deletions

View File

@@ -6,24 +6,23 @@ This is an ongoing evolution of Emacs configuration files, inspired by
a bunch of online resources.
* Installation
:PROPERTIES:
:CUSTOM_ID: installation
:END:
Run one of the following install script commands (using curl, wget or fetch).
#+begin_src sh
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)"
#+end_src
:PROPERTIES:
:CUSTOM_ID: installation
:END:
Run one of the following install script commands (using curl, wget or fetch).
#+begin_src sh
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)"
#+end_src
Installation path is =~/.config/emacs=. See details and other
installed linux packages as requirements inside =sripts/install.sh=.
Installation path is =~/.config/emacs=. See details and other
installed linux packages as requirements inside =sripts/install.sh=.
* Packages
:PROPERTIES:
:CUSTOM_ID: packages
:END:
#+caption:
:PROPERTIES:
:CUSTOM_ID: packages
:END:
General key bindings and functions
- =M->= (=end-of-buffer=)
- =M-<= (=begin-of-buffer=)
@@ -44,29 +43,44 @@ General key bindings and functions
- =mouse-8= (=previous-buffer=)
- =mouse-9= (=next-buffer=)
Spelling (flyspell ispell) bindings and functions
- (=flyspell-mode=) toggle spelling
- (=flyspell-buffer=)
- =C-;= (=flyspell-correct-wrapper=)
** Org
:PROPERTIES:
:CUSTOM_ID: org
:END:
#+caption: Org key bindings and functions
| C-c \vert | org-table-create-or-convert-from-region | convert seperator 1. TAB, 2. comma, 3. space |
| C-u C-c \vert | org-table-create-or-convert-from-region | convert using comma (CSV) seperator |
| C-u C-u C-c \vert | org-table-create-or-convert-from-region | convert using TAB |
| C-u N C-c \vert | org-table-create-or-convert-from-region | convert using N spaces |
| C-u REGEX C-c \vert | org-table-create-or-convert-from-region | convert using regex to match seperator |
| C-c C-x \ | org-toggle-pretty-entries | e. g. displays =\pm= as ± |
| | | |
| Org table | | |
| S-right | org-shiftright | move a single cell right |
| S-left | org-shiftleft | move a single cell left |
| C-c SPC | org-table-blank-field | clear cell |
| | | |
| Org src block | | |
| C-c C-v t | org-babel-tangle | create a file with the content of the block, use in header: :tangle filename |
| | | |
| Org export | | |
| f5 | | in org export to html |
| f6 | | in org export to LaTeX |
:PROPERTIES:
:CUSTOM_ID: org
:END:
Org key bindings and functions
- =C-c |= (=org-table-create-or-convert-from-region=) convert seperator 1. TAB, 2. comma, 3. space
- =C-u C-c |= (=org-table-create-or-convert-from-region=) convert using comma (CSV) seperator
- =C-u C-u C-c |= (=org-table-create-or-convert-from-region=) convert using TAB
- =C-u <integer> C-c |= (=org-table-create-or-convert-from-region=) convert using N spaces
- =C-u REGEX C-c |= (=org-table-create-or-convert-from-region=) convert using regex to match seperator
- =C-c C-x \= (=org-toggle-pretty-entries=) e.g. displays =\pm= as ±
Org table
- =S-<right>= (=org-shiftright=) move cell right
- =S-<left>= (=org-shiftleft=) move cell left
- =S-<up>= (=org-shiftup=) move cell up
- =S-<down>= (=org-shiftdown=) move cell down
- (=org-table-blank-field=) clear cell
Org src block
- =C-c C-v t= (=org-babel-tangle=) create a file with the content of the block; use in =header:= =:tangle filename=
Org export
- =<f5>= (=my-org-export-html=)
- =<f6>= (=my-org-export-pdf=)
- =C-<f5>= (=my-org-export-html-async=)
- =C-<f6>= (=my-org-export-pdf-async=)
- =C-c C-e h h= (=org-html-export-to-html=)
- =C-c C-e T t= (=org-tufte-export-to-file=) HTML export with tufte syling
- =C-c C-e h a= (=my-org-article-html-export-to-html=) HTML-article file, see also Article export
- =C-c C-e l l= (=org-latex-export-to-pdf=)
- =C-c C-e l a= (=my-org-article-latex-export-to-pdf=) PDF-article file, see also Article export
- =C-c C-e l t= (=my-org-article-latex-export-to-letter=) PDF-letter file
*Important*
- For *Gnuplot* source blocks: Do not use =%= inside Gnuplot source
@@ -77,220 +91,197 @@ General key bindings and functions
.eps (figure) files.
- =\%= =\%%= can also be used for HTML SVG export
*** HTML export
:PROPERTIES:
:CUSTOM_ID: export-html
:END:
- =C-c C-e h h= (org-html-export-to-html) to export Org document as HTML file, i.e. no spectial settings.
- =C-c C-e T t= (org-tufte-export-to-file) to export Org document as Tufte-HTML file, i.e. with tufte syling.
- =C-c C-e h a= (my-org-article-html-export-to-html) to export Org document as HTML-article file, see also Article export
*** Template for an article export (HTML and LaTeX)
:PROPERTIES:
:CUSTOM_ID: export-article
:END:
Template for an article
#+begin_src org
# -*- ispell-local-dictionary: "english" -*-
,#+LANGUAGE: en
,#+TITLE: My article
,#+SUBTITLE:
,#+AUTHOR: Daniel
,#+EMAIL: name@example.org
,#+DATE: May 12, 2021
,#+KEYWORDS:
,#+DESCRIPTION:
*** LaTeX export
:PROPERTIES:
:CUSTOM_ID: export-latex
:END:
- =C-c C-e l l= (org-latex-export-to-pdf) to export Org document as PDF file, i.e. no spectial settings.
- =C-c C-e l a= (my-org-article-latex-export-to-pdf) to export Org document as PDF-article file, see also Article export.
- =C-c C-e l t= (my-org-article-latex-export-to-letter) to export Org document as PDF-letter file.
,* Abstract :ignore:noexport:
,#+BEGIN_ABSTRACT
,*Abstract*\\
This is the abstract of the article.
,#+END_ABSTRACT
Links
- https://tex.stackexchange.com/questions/167583/include-custom-file-into-header-with-org-mode/201674
- https://orgmode.org/manual/LaTeX-specific-export-settings.html
,* List of contents & figures & tables & listings :ignore:
:PROPERTIES:
:VISIBILITY: folded
:CLEARPAGE: t
:END:
,#+LATEX: \begin{spacing}{1.25}\begingroup\renewcommand*{\addvspace}[1]{}
*** Article export (HTML and LaTeX)
:PROPERTIES:
:CUSTOM_ID: export-article
:END:
- =C-c C-e h a= (my-org-article-html-export-to-html) to export Org document as HTML-article file.
- =C-c C-e l a= (my-org-article-latex-export-to-pdf) to export Org document as PDF-article file.
,#+LATEX: \clearpage
# #+LATEX: \tableofcontents
,#+TOC: headlines
Template for an article
#+begin_src org
# -*- ispell-local-dictionary: "english" -*-
,#+LANGUAGE: en
,#+TITLE: My article
,#+SUBTITLE:
,#+AUTHOR: Daniel
,#+EMAIL: name@example.org
,#+DATE: May 12, 2021
,#+KEYWORDS:
,#+DESCRIPTION:
,#+LATEX: \clearpage
,#+LATEX: \listoffigures
# #+LATEX: \phantomsection\addcontentsline{toc}{section}{Abbildungsverzeichnis}\listoffigures
# #+TOC: figures is not implemented yet in the HTML backend. And not working with LaTeX, see listing
# #+TOC: figures
,* Abstract :ignore:noexport:
,#+BEGIN_ABSTRACT
,*Abstract*\\
This is the abstract of the article.
,#+END_ABSTRACT
# #+LATEX: \listoftables
# #+LATEX: \phantomsection\addcontentsline{toc}{section}{Tabellenverzeichnis}
,#+TOC: tables
,* List of contents & figures & tables & listings :ignore:
:PROPERTIES:
:VISIBILITY: folded
:CLEARPAGE: t
:END:
,#+LATEX: \begin{spacing}{1.25}\begingroup\renewcommand*{\addvspace}[1]{}
# for latex listing is figures
# #+LATEX: \phantomsection\addcontentsline{toc}{section}{Programmausdrucke}
,#+TOC: listings
,#+LATEX: \endgroup\end{spacing}
,#+LATEX: \clearpage
# #+LATEX: \tableofcontents
,#+TOC: headlines
,* List of Symbols :ignore:
:PROPERTIES:
:CUSTOM_ID: list-of-symbols
:UNNUMBERED: t
:END:
,#+LATEX: \clearpage
,#+LATEX: \listoffigures
# #+LATEX: \phantomsection\addcontentsline{toc}{section}{Abbildungsverzeichnis}\listoffigures
# #+TOC: figures is not implemented yet in the HTML backend. And not working with LaTeX, see listing
# #+TOC: figures
,#+LATEX: \pagenumbering{arabic}\setcounter{page}{1}
#+end_src
# #+LATEX: \listoftables
# #+LATEX: \phantomsection\addcontentsline{toc}{section}{Tabellenverzeichnis}
,#+TOC: tables
Examples for an article
#+begin_src org
# -*- ispell-local-dictionary: "german" -*-
,#+LANGUAGE: de
# for latex listing is figures
# #+LATEX: \phantomsection\addcontentsline{toc}{section}{Programmausdrucke}
,#+TOC: listings
,#+LATEX: \endgroup\end{spacing}
,* Header not listed in toc :ignore:
bla bla bla
,* List of Symbols :ignore:
:PROPERTIES:
:CUSTOM_ID: list-of-symbols
:UNNUMBERED: t
:END:
,* Section not exported :noexport:
bla bla bla, this will not be exported
,#+LATEX: \pagenumbering{arabic}\setcounter{page}{1}
#+end_src
,* Header listed unnumbered
:PROPERTIES:
:UNNUMBERED: t
:END:
bla bla bla
Examples for an article
#+begin_src org
# -*- ispell-local-dictionary: "german" -*-
,#+LANGUAGE: de
,* Section will start on a clear page (LaTeX)
:PROPERTIES:
:CLEARPAGE: t
:END:
bla bla bla
,* Header not listed in toc :ignore:
bla bla bla
# For PDF/LaTeX export we do not want to use org-ref ox-bibtex, as its output is
# already defined in the preamble. The output for 'bibliography:references.bib'
# is something like '\bibliography{references}'
# reftex version
# bibliography:references.bib
# ox-bibtex version
# #+BIBLIOGRAPHY: references mbunsrtdin option:-a option:-unicode option:-nobibsource limit:t
,* References-en :ignore:
:PROPERTIES:
:VISIBILITY: folded
:END:
,#+LATEX: \newpage\thispagestyle{plain}
,#+LATEX: \sloppy\printbibliography
,#+LATEX: \begin{comment}
,#+BIBLIOGRAPHY: references acmu option:-a option:-unicode option:-nobibsource limit:t
,#+LATEX: \end{comment}
,* Section not exported :noexport:
bla bla bla, this will not be exported
,* References-de :ignore:
:PROPERTIES:
:VISIBILITY: folded
:END:
,#+LATEX: \newpage\thispagestyle{plain}
,#+LATEX: \sloppy\printbibliography
,#+LATEX: \begin{comment}
,#+BIBLIOGRAPHY: references mbunsrtdin option:-a option:-unicode option:-nobibsource limit:t
,#+LATEX: \end{comment}
,* Header listed unnumbered
:PROPERTIES:
:UNNUMBERED: t
:END:
bla bla bla
,* References-rott :ignore:
:PROPERTIES:
:VISIBILITY: folded
:END:
,#+LATEX: \newpage\thispagestyle{plain}
# all references from the bib
,#+LATEX: \nocite{*}
,#+BIBLIOGRAPHY: references rottbibsty option:-a option:-unicode option:-nobibsource
#+end_src
,* Section will start on a clear page (LaTeX)
:PROPERTIES:
:CLEARPAGE: t
:END:
bla bla bla
*** Template for a letter export (LaTex)
:PROPERTIES:
:CUSTOM_ID: export-letter
:END:
#+begin_src org
# -*- ispell-local-dictionary: "german" -*-
:FORM:
,#+LANGUAGE: de
,#+FROM_ASSOCIATION: XYZ AG
,#+FROM_NAME: Max Mustermann
,#+FROM_STREET: Regenbogenstrasse 7
,#+FROM_PLACE: 12345 Hamburg
,#+FROM_PHONE: 0123456789
,#+FROM_URL: www.beispiel.de
,#+FROM_EMAIL: mail@example.de
# For PDF/LaTeX export we do not want to use org-ref ox-bibtex, as its output is
# already defined in the preamble. The output for 'bibliography:references.bib'
# is something like '\bibliography{references}'
# reftex version
# bibliography:references.bib
# ox-bibtex version
# #+BIBLIOGRAPHY: references mbunsrtdin option:-a option:-unicode option:-nobibsource limit:t
,* References-en :ignore:
:PROPERTIES:
:VISIBILITY: folded
:END:
,#+LATEX: \newpage\thispagestyle{plain}
,#+LATEX: \sloppy\printbibliography
,#+LATEX: \begin{comment}
,#+BIBLIOGRAPHY: references acmu option:-a option:-unicode option:-nobibsource limit:t
,#+LATEX: \end{comment}
,#+TO_ASSOCIATION: Firma AG
,#+TO_NAME: Karl Marx
,#+TO_STREET: Firmstrasse 13
,#+TO_PLACE: Berlin
,* References-de :ignore:
:PROPERTIES:
:VISIBILITY: folded
:END:
,#+LATEX: \newpage\thispagestyle{plain}
,#+LATEX: \sloppy\printbibliography
,#+LATEX: \begin{comment}
,#+BIBLIOGRAPHY: references mbunsrtdin option:-a option:-unicode option:-nobibsource limit:t
,#+LATEX: \end{comment}
,#+PLACE: Hamburg
,#+DATE: \today
# #+DATE: 3. Januar 2020
:END:
,* References-rott :ignore:
:PROPERTIES:
:VISIBILITY: folded
:END:
,#+LATEX: \newpage\thispagestyle{plain}
# all references from the bib
,#+LATEX: \nocite{*}
,#+BIBLIOGRAPHY: references rottbibsty option:-a option:-unicode option:-nobibsource
#+end_src
,#+SUBJECT: Abrechnung
,#+SUBJECT: 2020
,#+SUBJECT_EXTRA: Kontonummer
,#+SUBJECT_EXTRA: März
*** Letter export (LaTex)
:PROPERTIES:
:CUSTOM_ID: export-letter
:END:
#+begin_src org
# -*- ispell-local-dictionary: "german" -*-
:FORM:
,#+LANGUAGE: de
,#+FROM_ASSOCIATION: XYZ AG
,#+FROM_NAME: Max Mustermann
,#+FROM_STREET: Regenbogenstrasse 7
,#+FROM_PLACE: 12345 Hamburg
,#+FROM_PHONE: 0123456789
,#+FROM_URL: www.beispiel.de
,#+FROM_EMAIL: mail@example.de
,#+OPENING: Sehr geehte Frau \toname,
,#+TO_ASSOCIATION: Firma AG
,#+TO_NAME: Karl Marx
,#+TO_STREET: Firmstrasse 13
,#+TO_PLACE: Berlin
hiermit sende ich Ihnen die angeforderten Unterlagen zu und ...
,#+PLACE: Hamburg
,#+DATE: \today
# #+DATE: 3. Januar 2020
:END:
,#+CLOSING: MfG,
,#+SUBJECT: Abrechnung
,#+SUBJECT: 2020
,#+SUBJECT_EXTRA: Kontonummer
,#+SUBJECT_EXTRA: März
,#+OPENING: Sehr geehte Frau \toname,
hiermit sende ich Ihnen die angeforderten Unterlagen zu und ...
,#+CLOSING: MfG,
,#+ATTACHMENT: analage 1
,#+ATTACHMENT: anlage 2
,#+ATTACHMENT: analage 3
,#+ATTACHMENT: analage 6
#+end_src
,#+ATTACHMENT: analage 1
,#+ATTACHMENT: anlage 2
,#+ATTACHMENT: analage 3
,#+ATTACHMENT: analage 6
#+end_src
** Multiple cursors
:PROPERTIES:
:CUSTOM_ID: multiple-cursors
:END:
#+caption: Multiple cursors key bindings and functions
| M-m s m a | mc/mark-all-dwim | try to mark all at point |
| C-v | | jump to next cursor |
| M-v | | jump to previous cursor |
| C-' | | hide/unhide lines without a cursor |
:PROPERTIES:
:CUSTOM_ID: multiple-cursors
:END:
Multiple cursors key bindings and functions
- =M-m s m a= (=mc/mark-all-dwim=) try to mark all at point
- =C-v= jump to next cursor
- =M-v= jump to previous cursor
- =C-'= hide/unhide lines without a cursor
** Other packages
:PROPERTIES:
:CUSTOM_ID: other-packages
:END:
:PROPERTIES:
:CUSTOM_ID: other-packages
:END:
- rainbow-mode.el :: https://elpa.gnu.org/packages/rainbow-mode.html
rainbow-mode is a minor mode for Emacs which displays strings representing
colors with the color they represent as background.
* Information
:PROPERTIES:
:CUSTOM_ID: information
:END:
:PROPERTIES:
:CUSTOM_ID: information
:END:
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 [[https://www.emacswiki.org/info-ref?find=Interlocking][Interlocking]] in the [[https://www.emacswiki.org/emacs/EmacsManual][EmacsManual]] for details.
* Errors
:PROPERTIES:
:CUSTOM_ID: errors
:END:
:PROPERTIES:
:CUSTOM_ID: errors
:END:
- failed execution of bibtex2html
- see bib2htmlxxxxxx.blg for errors, e.g.
- I couldn't open style file acmu.bst
@@ -304,9 +295,9 @@ file. See [[https://www.emacswiki.org/info-ref?find=Interlocking][Interlocking]]
- ~<policy domain="delegate" rights="none" pattern="gs" />~
* TODOs
:PROPERTIES:
:CUSTOM_ID: todos
:END:
:PROPERTIES:
:CUSTOM_ID: todos
:END:
- Org / global configuration
- Page formatting
- Modify HTML styling