2017-12-24 Merry Christmas

It’s Christmas time again! Thanks be to God for keeping me and my family alive and well, but even more for taking care of us in sometimes quite astonishing ways. As usual, I wish all of you Merry Christmas. Let these days be devoted less to your everyday activities and more to the awe at the greatness of God who gives meaning to them. I hope that even if you are far away geographically, we will meet someday in the Father’s house.

As the tradition goes, I will offer a decade of Rosary for all of you!

CategoryEnglish, CategoryBlog, CategoryFaith

Comments on this page

2017-12-18 hierarchy.el

A few months ago, Damien Cassou announced his hierarchy.el library. It looks like it went a bit under the radar in the Emacs community – I haven’t heard about it much since. That’s a pity, since it looks quite interesting. It is a generic library of functions to work with tree-like structures. The most interesting thing from my perspective (since I don’t do much Elisp coding nowadays) is the ability to display hierarchies and navigate them interactively. Since I have a need to examine some JSON data from time to time, json-navigator (one of the examples of using the hierarchy library) is especially handy for me.

While it has some rough edges and is a bit more like a proof-of-concept than a polished tool, it is useful nevertheless. Also, it has two entry points: json-navigator-navigate-region (which does what it says on the tin) and json-navigator-navigate-after-point, which is really handy. Since I quite often deal with large-ish CSV files where some of the cells are pretty deep json structures, I like it very much that I don’t have to mark the json myself. (Especially that M-f and its cousins do not respect braces in CSV mode, which is reasonable but annoying in this particular case.)

CategoryEnglish, CategoryBlog, CategoryEmacs

Comments on this page

2017-12-11 Funny places in fill.el

Some time ago, I read parts of fill.el. This turned out to be quite a rewarding experience, in a rather warped sense. Let me quote a few highlights from that file.

(defun fill-single-word-nobreak-p ()
  "Don't break a line after the first or before the last word of a sentence."
  ;; Actually, allow breaking before the last word of a sentence, so long as
  ;; it's not the last word of the paragraph.

This is just plain terrible (though funny, for certain values of “funny”). I’m going to submit a patch which incorporates the comment in the docstring.

Earlier in the file, in the function canonically-space-region (which see – it’s actually interesting and potentially useful!) I found this gem:

;; Nuke tabs; they get screwed up in a fill.
;; This is quick, but loses when a tab follows the end of a sentence.
;; Actually, it is difficult to tell that from "Mr.\tSmith".
;; Blame the typist.

This not the end. Read fill.el for yourself to get more fun. (And it’s even funnier to check who actually committed those lines!)

CategoryEnglish, CategoryBlog, CategoryEmacs, CategoryHumor

Comments on this page