2020-12-05 20:49:27 +01:00
2023-11-04 19:26:41 +01:00
2023-11-04 20:00:29 +01:00
2022-12-14 14:47:05 +01:00
2022-12-18 19:32:54 +01:00
2023-05-04 16:08:01 +02:00
2023-05-04 16:08:01 +02:00

Table of Contents

  1. Installation
  2. External programs
  3. Usage
  4. Packages
  5. Information
  6. Errors
  7. TODOs

This is an ongoing evolution of Emacs configuration files, inspired by a bunch of online resources.

Installation

Different ways to install:

  1. If emacs-conf is available in a custom pacman repository

    pacman -S emacs-conf
    ln /opt/emacs-conf/init ~/.config/emacs/
    ln /opt/emacs-conf/early-init.el ~/.config/emacs/
    
  2. Download or clone git repo and point the emacs init (and early-init.el) file to this configuration.

  3. (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 inside sripts/install.sh.

External programs

  • ripgrep (optional) used by counsel-rg (package counsel)

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
  • Org Export
    • To Article HTML (extended version)
      • my-org-article-html-export-to-html / My - Org Export - Article HTML
      • my-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 PDF
      • my-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 text
  • C-x RET f (set-buffer-file-coding-system) e.g. set to =utf-8
  • (decode-coding-region) e.g. decode to utf-8 (e.g. 晴天)
  • (diff-buffer-with-file) show a diff between buffer (current state) and file (saved state)

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 couldnt 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.xml and 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\"]
            });
        });
        
Description
Emacs Configuration
Readme 251 MiB
Languages
Emacs Lisp 77.1%
JavaScript 9.4%
Roff 5.1%
Shell 2.6%
C 2.2%
Other 3.3%