Tag Archives: Emacs

Emacs display-battery-mode

I have occasionally run across the Emacs display-battery-mode command—it’s in Aaron Hawley’s excellent reference sheet, for example. I never bothered really looking at it because my MacBook Pro already has an battery status icon on the menu bar. Today, out … Continue reading

Posted in General | Tagged | Leave a comment

The Emacs comment-dwim Command

I really like the Emacs comment-dwim command. The dwim—do what I mean—neatly captures the idea of the command. It looks at the context in which it is called and then does the right thing™. Most often, I highlight a region … Continue reading

Posted in General | Tagged | 1 Comment

Solution to the Two Challenges

The other day, I presented two Elisp coding challenges. I specified Elisp because Irreal readers tend to like Emacs related posts. The down side of that is that several of you worried about bignums and other Emacs limitations. That wasn’t … Continue reading

Posted in Programming | Tagged , | 2 Comments

Two Elisp Challenges

I ran across a couple of nice interview questions and an interesting story over at Tanya Khovanova’s Math Blog. The two questions are: Given a list of integers from 1 to n but with one of the integers missing, write … Continue reading

Posted in Programming | Tagged , | 8 Comments

Troubleshooting Emacs Libraries

While trawling around the WikEmacs site today, I came across this page on troubleshooting that explained some commands that I wasn’t familiar with. The first two are helpful if you are trying to search out library problems. For example, if … Continue reading

Posted in General | Tagged | 1 Comment

TPK In Common Lisp

Yesterday I wrote about the Trabb Pardo Knuth algorithm and gave an implementation in Emacs Lisp. Elisp allows an nice implementation but was a bit frustrating because the Elisp interpreter handles overflows internally and never signals an overflow condition. Therefore, … Continue reading

Posted in Programming | Tagged , , | 2 Comments

The Trabb Pardo Knuth Algorithm in Elisp

The latest Programming Praxis Exercise is interesting. Back in 1973, Luis Trabb Pardo and Don Knuth published an algorithm that was meant to assess the power of a programming language. The algorithm was Ask for 11 numbers to be read … Continue reading

Posted in Programming | Tagged , | 4 Comments

Decimalizing Latitude and Longitude

Xah Lee has reintroduced a challenge from last year. Given a string of latitude/longitude is degrees, minutes, seconds, write a function that returns them as signed decimal numbers. That is, “37°26′36.42″N 06°15′14.28″W” → (37.44345 -6.253966666666667) I remember looking at this … Continue reading

Posted in Programming | Tagged , | 2 Comments

A Key Sequence For revert-buffer

The other day I was trawling through Aaron Hawley’s excellent Emacs Reference Sheet and came across the entry for【Ctrl+x Ctrl+v Return】saying “same as previous.” The previous entry was for revert-buffer. My first thought was “How did I not know this?” … Continue reading

Posted in General | Tagged | 6 Comments

The Emacs clean-buffer-list Command

Some time ago, I enabled save-desktop-mode in Emacs and I’ve been really happy with it. I generally never close Emacs but sometimes I need to restart it for one reason or another or an OS upgrade requires me to reboot. … Continue reading

Posted in General | Tagged | 3 Comments