Emacs
Recurring errors
troubleshootingEmacs creates .#blah
files
These are meant to be a protection against simultaneous editing. Can be disabled with the following line on the user init scripts:
(setq create-lockfiles nil)
Useful commands
examplesLoad config from .org file
(require 'ob-tangle) ; Load module
(org-babel-load-file "~/.emacs-config.org") ; Load file
Why is emacs slow?
troubleshootingExplain-pause-mode
On GH
On r/emacs
https://www.reddit.com/r/emacs/comments/gmh8bs/beta_testers_ann_lets_make_emacs_better/
Installation function (after defining it, run (install-explain-pause-mode)
)
(defun install-explain-pause-mode()
(let ((url "https://raw.githubusercontent.com/lastquestion/explain-pause-mode/master/explain-pause-mode.el"))
(with-current-buffer (url-retrieve-synchronously url)
(package-install-from-buffer))))
Snippets
examplesToasts on emacs
(defun my-toast-message (msg)
(let ((orig (selected-frame))
(f (make-frame `((parent-frame . ,(selected-frame))
(undecorated . t)
(no-accept-focus . t)
(cursor-type . nil)
(foreground-color . "white")
(background-color . "CornflowerBlue")
(height . 4)
(width . 35)
(left . (- 0))))))
(with-selected-frame f
(switch-to-buffer "*toast*")
(setq mode-line-format nil)
(erase-buffer)
(insert "\n\n " msg))
(select-frame orig)
(run-with-timer 5 nil 'delete-frame f)))
(my-toast-message "hey this is a message")
Might not work correctly with multiple windows (such as with emacsclient's)
Customization
Improved org-insert-link
postwebexamplesURL
Shows succint code to wrap org-insert-link and add new features
Additional features
Use URLs when in clipboard
Use the region when selected
Automatically fetch titles
Fallback to org-insert-link
Mail handling in emacs
Using emacs with Notmuch
On r/emacs
Integration with