Here’s a tiny and basic tip. If you want you Emacs to flash at you instead of beeping for an error, add the following to your emacs config file
;; turn on visible bell (setq visible-bell t)
Here’s a tiny and basic tip. If you want you Emacs to flash at you instead of beeping for an error, add the following to your emacs config file
;; turn on visible bell (setq visible-bell t)
I’ve used my own visible bell for years. Others might like it too:
;; The visible bell is usually fine, but still horrid in certain terminals.
;; We can make a nicer version.
(defun my-visible-bell ()
“A friendlier visual bell effect.”
(invert-face ‘mode-line)
(run-with-timer 0.1 nil #’invert-face ‘mode-line))
(define-minor-mode my-visible-bell-mode
“Use `my-visible-bell’ as the `ring-bell-function’.”
:global t
(let ((this ‘my-visible-bell-mode))
(if my-visible-bell-mode
(progn
(put this ‘visible-bell-backup visible-bell)
(put this ‘ring-bell-function-backup ring-bell-function)
(setq visible-bell nil
ring-bell-function #’my-visible-bell))
;; Restore the original values when disabling.
(setq visible-bell (get this ‘visible-bell-backup)
ring-bell-function (get this ‘ring-bell-function-backup)))))
(setq visible-bell t)
(my-visible-bell-mode 1)
LikeLike
A random question – I like how your code blocks are shown on this website: their appearance. Do you write your posts in Org mode? Do you know of a way to make code blocks exported to Latex/PDF, so that they are also in a coloured box like yours are on this website?
LikeLike
I use org2blog to write my posts in emacs. To get syntax highlighting in latex export, I think you can use minted, but I’ve not tried it. See e.g.
http://praveen.kumar.in/2012/03/10/org-mode-latex-and-minted-syntax-highlighting/
LikeLike