Category Archives: Programming

Using The Emacs save-restriction Special Form

Emacs has the ability to “narrow” a buffer to a region thereby making the parts of the buffer outside the region invisible. The invisible part of the buffer is completely inaccessible: you can’t move into it, you can’t change it, … Continue reading

Posted in Programming | Tagged , | 2 Comments

Applying and And or In Emacs

Zach Beane has a nice Common Lisp tip about applying and. The problem that the tip addresses is how to apply and to a list of values to test that they are all true. One might think that you could … Continue reading

Posted in Programming | Tagged , | 3 Comments

A Common Lisp Quick Reference

Bert Burgemeister has a very nice Common Lisp Quick Reference available for download. The idea is that you print it out, fold the pages, and staple them to form a little booklet. He’s got copies for A4 and letter size … Continue reading

Posted in Programming | Tagged | 1 Comment

Multiplication Table In Emacs Revisited

Yesterday, I wrote about generating a 10 × 10 multiplication table in Emacs Lisp. The solution I gave involved using the dolist macro with a list of the numbers 1–10 like this (dolist (r ‘(1 2 3 4 5 6 … Continue reading

Posted in Programming | Tagged , | 2 Comments

Multiplication Table In Emacs Lisp

Xah Lee saw my post about Tim Visher’s video on building a multiplication table in Emacs and decided to experiment. Visher’s video was in the context of VimGolf where the goal was to build the table in the minimum number … Continue reading

Posted in Programming | Tagged , | 10 Comments

Replace Digits By Subscripts In Emacs

Xah Lee had an interesting Emacs Lisp problem last week but I was away and unable to join the fun. The problem is to replace any occurrence of a digit in a string by the equivalent subscript. Thus 1 → … Continue reading

Posted in Programming | Tagged | 2 Comments

Eval And Replace In Emacs

I was watching another of Tim Visher’s VimGolf videos in which he builds a multiplication table by the clever use of keyboard macros. What got my attention, however, was his use of the function eval-and-replace that evaluates the sexp preceding … Continue reading

Posted in Programming | Tagged , | 10 Comments

R7RS WG1 Update

Via Grant Rettke over at Wisdom and Wonder I found these slides from a talk at LispNYC by John Cowan on September 13. As readers from my old blog will recall, R7RS will be split into a “small Scheme” and … Continue reading

Posted in Programming | Tagged | Leave a comment

Using Emacs To Convert Notes For Deft

Yesterday I wrote about Vivek Haldar’s Deft patch that allowed him to integrate his previous notes into Deft. Recall that Deft uses the first line of a note as its subject and names the file for a note deft-XXX whereas … Continue reading

Posted in Programming | Tagged | Leave a comment

Inserting Quotation Marks In Emacs Revisited

The other day, I wrote about Inserting Quotation Marks In Emacs Org Mode and I wrote a little bit of elisp to insert \ldquo{}\rdquo in the buffer and then place the point between the two quote commands. I remarked at … Continue reading

Posted in Programming | Tagged , | 4 Comments