Alan, I finally had the time to fix these old patches. Sorry about the wait. Alan Schmitt writes: > Hello, >> Attached are a couple of changes to ox-koma-letter following a recent >> bug report by James. >> >> 1. Minor fixes around. The way subject-format was handled before was >> ugly. Updated some docstrings etc. > > I'm afraid I'm not competent to talk about the subject handling (the > elisp is beyond my level). I'm fine with the docstring update, with one > nitpick: "e.g." should always be present as a parenthetical sentence: > "..., e.g, ...". Fixed. >> 2. better test of whether values have changed in the buffer. I think >> Alan added this first, but the previous implementation. I think >> it's more robust now, and it hopefully addresses James' problems >> (please test). Basically and x-aux variable is added for all >> variables x in :option-alist with a default value "unset". The >> value can then be tested. > > Isn't "unset" a bit dangerous? Can we detect when we set something to > "unset" (I don't know if it's a valid option for anything)? (By the way, > the previous value of "nil", except for foldmarks, was much worse.) How > about using "ox-koma-unset"? Fixed. >> 3. When studying the KOMA manual to answer James' second question I >> came across the komavar title which is currently not supported. I >> have added support for a separate SUBJECT keyword. The heuristic >> is something like this (i) if title and subject are be truthful to >> the name no matter what, (ii) if only title or subject is said let >> title be subject if org-koma-letter-title-is-subject-maybe is t >> otherwise be truthful to name. > > This sounds good. Once again, I'm not sure I'm competent enough to > criticize the elisp code. > [snip] >> In 3. I would personally like to set >> org-koma-letter-title-is-subject-maybe to nil by defaults, but this >> would break backwards comparability for title keywords. > > I don't mind breaking backward compatibility at this point, if we make > clear how to get back the previous output. TITLE is now title and SUBJECT is now subject by default. These new patches should apply against the master branch. –Rasmus -- I almost cut my hair, it happened just the other day