If you've heard some rumors of Emacs that it has a very steep learning curve (or that Emacs makes a computer slow), you may be too scared to look at it. It indeed has some learning curve (learning anything does have one), but it isn't very steep. I learned this after getting my hands dirty with Emacs a few years ago.
[Read More]
Send Notifications from Emacs with i3wm and Dunst
Posted on 2021-07-17
(Last modified on 2025-02-26)
| 4 minutes
| 780 words
I barely use notifications, but recently I think it's a valuable way to remind me things like helping me nurture habits, or to notify me of emergencies like a critically low laptop battery.
So I try to integrate notifications to org-mode and Emacs today.
The org-notify package from org-contrib (install it by (package-install 'org-contrib) ) could do this job easily before, so I first test it in the minibuffer with (org-notify "test").
Unfortunately, it errors out:
[Read More]
Generate Call Graphs Using Doxygen in Emacs
Posted on 2020-08-22
| 3 minutes
| 448 words
Doxygen is a nice tool for generating documentations for well-annotated C/C++ projects, the one feature that I like most is generating call graphs and class diagrams, so that I can learn a project quickly by browsing the diagrams from a higher point of view.
I take the following steps to generate call graphs for a project on terminals on Linux:
cd /path/to/a/project/, and generate a template config file by doxygen -s -g doxygen.conf (Omit -s to generate it with detailed comments).
-
Tweak the file by specifying input and output directories, and set HAVE_DOT and CALL_GRAPH to YES.
[Read More]
A Trick to Troubleshoot Emacs Subprocess Creating
Posted on 2020-05-30
(Last modified on 2022-10-15)
| 2 minutes
| 290 words
There are many packages of Emacs that leverage subprocesses to do their jobs, Magit, eglot, elpy, to name a few. And there are times that a subprocess doesn't work as expected, for example, Magit is slow, and you're sure that it's ok when running git commands on shell. So how to spot these problems effectively and quickly?
The problem is that we don't know what's going on exactly, so here I want to share a few Elisp advices to make the subprocess creating visible, and print the exact program and its arguments to the *Message* buffer. Visibility is the key.
[Read More]
ppcompile: An Emacs Package to Help Coding Locally
Posted on 2020-03-07
| 2 minutes
| 338 words
If you are a C/C++ programmer like me, you may experience jumping around different machines to write and compile your code, or you may write code on different machines for different projects, and scp/rsync/ftp the projects around. It works, but it's a bit tedious and takes too much burden on our brains.
For example, say I have two projects that should be compiled on their compiling machines respectively. There are two obvious workflows for writing code for them "simultaneously":
[Read More]