2023-01-18

emacs

emacs can be run within a terminal or with a graphical interface for xserver. colors and font-rendering may look different, the graphical version of course does not start inside a current terminal, and i prefer emacs on the terminal because it seems simpler and i would not have to set up xserver forwarding through ssh sessions for example

fast startup

start emacs with "emacs --daemon" and open files with "emacsclient -tc" ("t" uses the terminal, "c" creates a new frame). this way emacs is not started anew when you open a file for editing

short name script

these shell scripts can be put, with the executable bit set, into a path listed in $PATH

file name: e

#!/bin/sh

emacsclient -tc

usage

e readme.md

the following is for opening multiple files without displaying them on the current terminal.

file name: ea

#!/bin/sh

for file in $@
do
  emacsclient -e '(find-file "'$file'")'
done

usage

ea readme.md main.c

modes

modes i had issues with

  • paredit: syntax recognition, integrated auto-format, overriding keybindings, does not work so well with non-s-expression based languages, commands seem more clear and ordered in smartparens-mode
  • org-mode: i think it does too much and is therefore too complicated. i find #(link-c-one ("itpn" "syntax" "note")) to be a better note taking format than org-modes asterisk syntax

links