Add some old Emacs notes

This commit is contained in:
Daniel - 2019-12-30 13:19:18 +01:00
parent c8735de998
commit f054db47e3
No known key found for this signature in database
GPG Key ID: 1C7071A75BB72D64
1 changed files with 33 additions and 0 deletions

View File

@ -2261,3 +2261,36 @@ From https://gist.github.com/jackrusher/36c80a2fd6a8fe8ddf46bc7e408ae1f9 via [[h
;;
;; C-x C-f /gcssh:compute-instance:/path/to/filename.clj
#+end_src
** Finding the largest Emacs buffer
I found this somewhere, but forget where …
Approach: sort all buffers by size.
#+begin_src emacs-lisp
(mapcar (lambda (x)
(list x (buffer-size x)))
(cl-sort (buffer-list)
(lambda (x y)
(< (buffer-size y) (buffer-size x)))))
#+end_src
** Emacs reencode buffers with other encoding
- Use the function =revert-buffer-with-coding-system= to re-open a buffer in
another encoding.
- Customize the variable =file-coding-system-alist= to control whether certain
files should always be opened with a specific encoding.
** Fonts and Themes
Inspired by https://github.com/kunalb/poet.
- To show all available fonts, use the function ~x-family-fonts~.
- Load custom themes with ~customize-themes~ instead of calling ~load-theme~
directly. However, this does not set ~custom-enabled-themes~ correctly
(Emacs 26.1), so directly customizing ~custom-enabled-themes~ seems to be the
best thing (although one has to know the names of the themes then).