I’ve hacked an i3 script which realized one of my long time desires – swap workspaces on dual monitors. For example, I have Firefox on my laptop monitor and Emacs on the external monitor. After pressing some keyboard shortcut, Emacs is placed on the laptop monitor and Firefox is moved to the external monitor.
A few days ago, for no reason (for fun, maybe), I cloned the Github mirror of Emacs and built a latest Emacs. I also removed my old Emacs (I was silly, I blame Melbourne’s weather :D). Many subtle problems occurred since then, for example, executing
org-html-export-as-html often causes the following error:
org-html-fontify-code: Wrong number of arguments: #[(_beg _end) "À " [font-lock-fontify-buffer] 1], 0
Note: This blog is the README of moz-controller, which is the first Emacs plugin I’ve ever written. Github: https://github.com/RenWenshan/emacs-moz-controller.
It’s very common for me to program while read documents in a web browser, and I think it’s annoying to switch between the browser and the text editor constantly.
Here I have a few Elisp functions defined, which allow me to control Firefox to scroll, close tabs and so on.
I wrote two simple elisp commands to make the experience of taking notes while reading PDF in Emacs better.
As a programmer who sits before a computer more than 8 hours a day, standing up and exercising a bit regularly is said to be a good way to extend my lifespan. In this era, I believe even living a little longer could make a tremendous difference (see 《永生的阶梯》 by Cixin Liu, or Technological singularity on Wikipedia).
put windows, which is an GNOME plugin, you can press
Super + Shift + Left/Right to move the current window to the left-hand/right-hand side monitor , where
Super is the
Windows key on most keyboards.
Recently, I started to use helm and found that
M-x helm-world-time could display local time in cities worldwide.
For example, to display Beijing and Melbourne time, you just need to change the variable
(setq display-time-world-list '(("Asia/Shanghai" "China") ("Australia/Melbourne" "Melbourne")))
`An Introduction to Programming in Emacs Lisp’ (Elisp Intro), is an Elisp tutorial that comes with Emacs. Elisp, is short for Emacs Lisp, which is a dialect of the Lisp programming language. It is mainly used for writing extensions for the GNU Emacs editor and it can also be used as a scripting language in a way like Perl or Python.
After reaching a certain level in using Emacs, it is not enough to simply copy and paste others’ code for Emacs configuration, this is the main reason why I read Elisp Intro. I also wanted to gain some knowledge of a Lisp dialect that would be useful in (my) real world.