Emacs's NEWS files are useful as a searchable reference, but they can be overwhelming as an entry point. In this file, I'm keeping track of the changes /I/ am excited about. * 29 ** =:core= promotions A couple of ELPA packages have moved to emacs.git, making them available out of the box. *** eglot ("Emacs Polyglot"): LSP client Lets Emacs leverage language servers to boost completion-at-point, eldoc, flymake, imenu, project, xref. *** use-package: init-file management A utility macro for configuring packages that makes init-file management more pleasant (and efficient to boot): - OT1H, brings some amount of structure and order when compared to a fully free-form DYI =.emacs=, - OTOH, allows more leeway on how to organize things, when compared to Custom's rigid auto-generated forms (e.g. using regular code comments, computing option values, sorting options arbitrarily), - takes care of setting up the ~eval-after-load~ wizardry to keep startup snappy. A tedious aspect of porting a ~custom-file~ to ~use-package~ declarations is tracking down what package defines which variables, since not every variable is named after the package it belongs to. I wrote [[file:~/memory-leaks/guides/emacs/use-package.org::*Porting from ~custom-file~][some code to make the process faster]]. ** ~global-text-scale-adjust~ ~text-scale-adjust~ (bound to =C-x C-X= ∀ =X= ∈ =[=+-0]=) only scales the font size in the current buffer; more often than not, one may want to increase the default font size everywhere (e.g. when projecting their screen). To that end, users had to =M-x customize-face RET default= or =M-:= ~(set-face-attribute 'default nil :height …)~; now they can use the new =C-x C-M-X= bindings to invoke ~global-text-scale-adjust~. ** ~split-root-window-{below,right}~ E.g. when you already have a vertical split, and you'd like to spawn a full-height window to the side (instead of splitting either the top or bottom window horizontally and keeping the other full-width). Been missing this in both Emacs and Terminator; glad Emacs now has a solution. Part of the new window keymap on =C-x w=. ** ~rename-visited-file~ Instead of =C-x C-w NEWNAME RET M-! rm OLDNAME RET=. ** "fold hints" for outlines ~outline-minor-mode-use-buttons~ can be set to either - =in-margins=: magit-section-like indicators, - =t=: in-buffer buttons. Initially the latter used arguably "garish" color emoji; with the addition of the =icons.el= library, the way these buttons are displayed can now be controlled with ~icon-preference~, which defaults to more sober SVG images. ** ~imenu~ now bound to =M-g i= Turns out that lots of modes define an imenu. ** ~setopt~ sets variables and runs their Custom setters ** "Pure GTK" Emacs Some brave souls took it upon themselves to drag Emacs kicking and screaming into The Wayland Future™: "pure GTK" means that Emacs will only rely on GTK APIs, instead of a mix of GTK and X. Try it out by giving =--with-pgtk= to =./configure=. One caveat is that GTK input methods… eat modifiers or something? E.g. =S-SPC= degrades to =SPC=. Apparently Emacs users are the only ones to care about that? 🤷 (Note for whoever feels like debugging that: this problem can be reproduced on the X+GTK build by setting ~x-gtk-use-native-input~) ** Honorable mentions These have me excited too, but I have nits to pick with the current incarnation. *** ~pixel-scroll-precision-mode~ Setting that minor mode with ~pixel-scroll-precision-interpolate-page~ makes =PageUp= and =PageDown= much smoother. Would love for =M-v= and =C-v= to use that as well… Heck, would love for all scrolling, jumping and recentering commands to use that. *** Picking completions from the minibuffer =M-= and =M-= in the minibuffer cycle through completion candidates. Would love for these to have non-arrow bindings (e.g. =C-c C-[pn]= with a repeat map?). Unsetting ~minibuffer-completion-auto-choose~ also lets the user choose when to insert candidates in the minibuffer: =C-u M-RET= to just insert, or =M-RET= to insert and immediately exit the minibuffer. *** =C-x 8 e= keymap to search & insert emoji Less hassle than =C-x 8 RET err what was the name again=, especially for composed emoji 😵‍💫 Uses transient 👍 but relies on auto-generated, non-mnemonic =a-z= suffixes to pick gender/color variations 👎 rather than taking advantage of transient prefixes (e.g. =-g= for gender and =-s= for skin tone), which 1. don't add an unecessary step for the common "ungendered Lego" case, 2. can remember a user's preferred values with ~transient-save~. Upstream considers this idea "[[https://yhetil.org/emacs-devel/87ilxfx1ku.fsf@gnus.org/][fraught politically]]" 🤷 Others agree it would be [[https://yhetil.org/emacs-devel/87r1bx9pwo.fsf@bernoul.li/][nice-to-have, though not must-have]]; maybe I'll take a stab at implementing it (making it opt-in, keeping the alphabetical suffixes by default). * 28 ** Transient input methods *** Background Input methods make it easier to type in certain classes of characters. Emacs includes different kinds of methods: - alternative keyboard layouts :: if you are familiar with specific layouts, e.g. Dvorak, French AZERTY, Russian, you can ask Emacs to switch to this layout; - composition :: some methods let you specify characters by typing in short sequences of other symbols: - =french-prefix= provides easy access to diacritics with e.g. ='e= for =é=, =,c= for =ç=; - =TeX= turns TeX macros such as =\alpha=, =\pi=, =\le=, =\ne=, =\wedge= into their corresponding characters, i.e. α, π, ≤, ≠, ∧. Input methods can be toggled with =C-\=; prefix that with =C-u= to select a new method. =C-h I = shows what characters == supports. =C-u C-x == on a character tells you how to input that character with the current input method ("to input: …"). *** What's new The new =C-x \= command enables an input method temporarily, just for the next character, and disables it afterward. As an occasional user of the =TeX= method, I find this useful because I no longer need to choose between 1. enabling =TeX=, typing a sequence, disabling =TeX=, or 2. enabling =TeX=, typing a sequence, keeping =TeX= enabled, getting bitten by it whenever I type in =oh_no= and that turns into =ohₙo=. =C-x \= seems to follow the same rules as =C-\=: - the first time you call it, it prompts for a method, - subsequent calls do not prompt, - add =C-u= to get a prompt back. ** ~same-window-prefix~, ~other-window-prefix~, ~other-frame-prefix~ The rules which govern how Emacs manages windows are beyond my reckoning. I know [[https://protesilaos.com/codelog/2020-01-07-emacs-display-buffer/][it is possible to tame them]] with patience and discipline; still, these new commands appeal to my humble caveman brain. Assuming the command run by key sequence =KEYSEQ= will display its own buffer =BUF=, - =C-x 4 1 KEYSEQ= says "please display =BUF= right here, in this window"; - =C-x 4 4 KEYSEQ= says "please display =BUF= in another window"; - =C-x 5 5 KEYSEQ= says "please display =BUF= in another frame". These new ~other-…-prefix~ commands can be seen as generalizations of specialized shorthands such as =C-x 4 f= or =C-x 5 b=. ** Visibility-cycling with =TAB= in outline.el =TAB= and =S-TAB= now work in Outline mode like they do in Org. Look at e.g. NEWS (=C-h N=) to see them in action. Customize ~outline-minor-mode-cycle~ to enable this in ~outline-minor-mode~. One small, /tiny/ step toward chipping good features out of Org in order to generalize them. ** ~yank-from-kill-ring~ I've always been somewhat ambivalent about Emacs's ~kill-ring~: 1. Everything I ever copied is saved forever! This is a revolutionary feature on par with the undo system 🙌 2. … Surely we can find a more ergonomic UI than =C-y M-y M-y M-y= /dammit/ =C-_ C-_= /ah screw it/ =C-h v kill-ring RET C-s= 🤔 And lo! =M-y= now prompts for the ~kill-ring~ item to yank, with completion. This makes the ~kill-ring~ much more accessible IMO. ** ~repeat-mode~ =C-x o o o=! ** ~completions-group~, ~read-char-by-name-sort~ Some very welcome quality-of-life tweaks to =C-x 8 RET=. ** Gnus *** =#= now toggles the process mark by default No need for =M-#= anymore. ** Vertical icomplete *** Settings - ~completions-detailed~ - ~icomplete-scroll~ - ~icomplete-vertical-mode~ *** Advantages over plain icomplete - annotations - completion candidates are easier to tell apart - =C-n= and =C-p= (=C-.= is awkward on AZERTY) *** Advantages over Ivy and Vertico - regular minibuffer bindings work: - =SPC= completes - =RET= yields current input, disregarding completion candidates - =C-j= yields selected completion candidate - regular icomplete bindings work: - =C-M-i= inserts selected completion candidate ** Dired *** ~dired-kill-when-opening-new-dired-buffer~ With this option, =RET= and =^= no longer make Dired buffers pile up 🎉 Previously, =a= (~dired-find-alternate-file~) could be used instead of =RET=, but one had to write a custom command for =^=. ** Help *** Outline in ~describe-bindings~ ~describe-bindings-outline~ makes =C-h b='s output less overwhelming. *** New commands for ~describe-{function,variable}~: - =c= :: for variables, bring up the *Customize* UI, - =i= :: bring up the relevant *Info* page, - =s= :: jump to the *source* definition. *** ~shortdoc-display-group~ Concise reference docs for specific topics. ** Tabs For a long time I did not bother to check out the new tab bar, since I did not expect to find a way to make tabs work in my rather byzantine buffer management. Then one day I started playing with the =C-x t= prefix on a whim, and I was surprised by how much mileage I got out of forking off to a new tab in order to "tuck away" the current window layout. * 27 ** ~what-cursor-show-names~ I sometimes use =C-u C-x == to (re)discover how the Unicode consortium decided some character should be called; having plain =C-x == give me that information without popping an extra buffer is neat.