diff options
| author | Kévin Le Gouguec <kevin.legouguec@gmail.com> | 2025-11-09 12:59:49 +0100 |
|---|---|---|
| committer | Kévin Le Gouguec <kevin.legouguec@gmail.com> | 2025-11-09 12:59:49 +0100 |
| commit | a13c310f009e312b12b4a14572113af4fdc9ed09 (patch) | |
| tree | a70224d9b1d82793a85ebe1a697df0e03c17d743 /reviews/emacs | |
| parent | ff6385331bd4930a680afb4e5647a4e53c01adc7 (diff) | |
| download | memory-leaks-a13c310f009e312b12b4a14572113af4fdc9ed09.tar.xz | |
Gush even more about Emacs
Diffstat (limited to 'reviews/emacs')
| -rw-r--r-- | reviews/emacs/gush.org | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/reviews/emacs/gush.org b/reviews/emacs/gush.org new file mode 100644 index 0000000..352615b --- /dev/null +++ b/reviews/emacs/gush.org @@ -0,0 +1,66 @@ +It is hard to put into words how much Emacs encroaches on my life. +There are [[https://en.wikiquote.org/wiki/Emacs][very poetic quotes]] out there, e.g. + +#+attr_html: :cite https://en.wikiquote.org/wiki/Emacs +#+begin_quote +Emacs outshines all other editing software in approximately the same +way that the noonday sun does the stars. It is not just bigger and +brighter; it simply makes everything else vanish. +#+end_quote +— Neal Stephenson, {{{cite(In the Beginning… was the Command Line)}}} + +Perhaps if I put enough miscellaneous trivia into this file, it will +eventually grow into something that can justify this level of +hyperbole. +* Conventions +** =RET= vs =C-j= +:PROPERTIES: +:CUSTOM_ID: convention/electric-indent +:END: +By default, Emacs turns on ~electric-indent-mode~, which, among other +effects, sets down a convention that works across most modes: + +- =RET= is the "DWIM" binding that opens a new line at the "correct" + indentation level; +- =C-j= is the simple binding that literally just inserts a newline. + +My (completely post-hoc) mnemonics for this is that =RET= is either + +- =C-m=: I rarely want to insert an actual /carriage return/; if I do + though, I can quote-insert it with =C-q C-m=, like other control + characters, +- the =<retrun>= function key: it stands to reason that a "function + key" would do something "smart". + +While =C-j= is "literally byte 10, aka the newline character", i.e. a +character that I will indeed write as-is in my files. + +(Pay no mind to ~lisp-interaction-mode~ aka =*scratch*= breaking this +convention by binding =C-j= to ~eval-print-last-sexp~; we wouldn't want +things to become /too/ consistent now would we 😀) +* Third-party packages +** Magit +A bit unfair to lump Magit in "third-parties" given its popularity, +and its fruitful secret life as "tarsius's personal Elisp mad lab". +Some may call it "NIH syndrom", but I personally thank Jonas for +pushing the boundaries of what Emacs can do, from UX (transient, +magit-section) to DevEx (cond-let, llama). +*** blame +- =b= drills down recursively into the current chunk's history. I + used to + 1. blame, + 2. land on an "uninteresting" commit (cleanup, refactoring), + 3. =SPC= to get the revision buffer, + 4. scroll to the relevant hunk, + 5. =RET= on the corresponding removed line, + 6. go to 1, + until I finally found the "interesting" commit; turns out =b= + automates all of this. +*** diff buffers +- =RET= vs =C-j=: I like that they follow what I think of as [[#convention/electric-indent]["the + electric-indent convention"]], i.e. "=RET= does something smart; =C-j= + stays dumb" + - =RET= visits DWIM read-only blobs: + - added or context line? current revision + - removed line? parent revision + - =C-j= visits the current worktree file |
