如有一味绝境,非历十方生死。

Posts

李白《侠客行》

赵客缦胡缨,吴钩霜雪明。银鞍照白马,飒沓如流星。

十步杀一人,千里不留行。事了拂衣去,深藏身与名。

闲过信陵饮,脱剑膝前横。将炙啖朱亥,持觞劝侯嬴。

三杯吐然诺,五岳倒为轻。眼花耳热后,意气素霓生。

救赵挥金锤,邯郸先震惊。千秋二壮士,烜赫大梁城。

纵死侠骨香,不惭世上英。谁能书阁下,白首太玄经。



Define Emacs Formatter

Steve Purcell has created a package reformatter, which can define commands to format the current Emacs buffer.

The reformatter-define macro expands to code which generates xxx-buffer and xxx-region interactive commands, and a local minor mode called xxx-on-save-mode. The :args and :program expressions will be evaluated at runtime, so they can refer to variables that may have a buffer-local value. A custom variable will be generated for the mode lighter, with the supplied value becoming the default.



苏轼《定风波》

莫听穿林打叶声,何妨吟啸且徐行。竹杖芒鞋轻胜马,谁怕?一蓑烟雨任平生。

料峭春风吹酒醒,微冷,山头斜照却相迎。回首向来萧瑟处,归去,也无风雨也无晴。



Build Emacs On Windows

On Windows, we can build GNU Emacs with MSYS2 and MinGW-w64.

First, install some necessary packages. The packages include the base developer tools, the compiler toolchain, several image libraries, and XML library, the GnuTLS library, zlib for decompressing text, HarfBuzz for use as the shaping engine, libgccjit for native-compilation support, SQLite3 for accessing SQL databases, and the tree-sitter library used by some major modes. You can select only part of the libraries if you don't need them all.



Build Emacs From Source

Windows 11 features built-in support for running Linux GUI applications. Emacs 29 has became a real GTK application, gone with the blurry fonts problem.

Firstly, install essential packages in WSL2 Ubuntu 22.04.

apt-get update
apt-get install build-essential libgtk-3-dev libgnutls28-dev libtiff5-dev libgif-dev libjpeg-dev libpng-dev libxpm-dev libncurses-dev texinfo sqlite3 libsqlite3-dev libjansson4 libjansson-dev autoconf


Math Equation With Org Mode

LaTeX math snippets can be displayed on HTML pages which exported with org-mode. The default is to use the MathJax.

If $a^2=b$ and \( b=2 \), then the solution must be either $$ a=+\sqrt{2} $$ or \[ a=-\sqrt{2} \].

If \(a^2=b\) and \( b=2 \), then the solution must be either \[ a=+\sqrt{2} \] or \[ a=-\sqrt{2} \].



Generate RSS For Blog

I'm not sure how many people still use RSS, but I still want to have a RSS feed for my blog though I don't use RSS myself either.

From what I known, many people recommend using ox-rss.el to generate RSS XML from blog files. The ox-rss.el is a org-export backed derived from the HTML backend and it exports org files to an RSS XML file. But ox-rss.el is not part of org-contrib right now.

Luckily, Python has many modules which can generate and parse RSS feeds (python-feedgen, feedparser, rfeed, etc.). I love Python, it is easy to use. So I decided to use python-feedgen to generate an RSS XML file from HTML files of my blog.



Emacs tokyonight-themes

A clean dark Visual Studio Code theme that celebrates the lights of Downtown Tokyo at night.

Tokyo Night theme was firstly published as a plugin for Visual Studio Code, now it has many other ports.

Rawley make a tokyo-theme.el for GNU Emacs, but it is unmaintained and has not support any popular packages for GNU Emacs we often use.

So I want to make it for myself, here it is. The theme templates were taken from modus-themes, and the color palettes were taken from tokyonight.nvim, these two themes are very popular and awesome with GNU Emacs or Neovim.

This theme has four color palettes, as same sa tokyonight.nvim. I have add support with some popular packages which I often use with GNU Emacs, like Corfu, vertico, orderless, dired, diff-hl, hl-todo, multiple-cursors, symbol-overlay, vundo and so on.



Valar Morghulis. Valar Dohaeris.

Top