There's a similar anecdote Gillian Anderson recently revealed during an interview on the X-Files, saying Chris Carter had an OCD-like habit to write dialog to conform to certain text layout preferences (no widows[1]) in the script, which made for the show's distinctive style of dialog cadence.
A bit weird to observe how the facade cracks when they're talking about it.
Maybe I'm wrong but the whole thing felt very weird to me. Can't put my finger on it.. I want to say immature, but it's probably just unempathetic. I think my brain reached out for "immature" because I saw a lot of it among the "popular" kids at school.
“Chris told me I mean that there was a particular way that we used to speak in the show that it that wasn't a normal rhythm and syntax. It was slightly backwards. which felt like it was almost part of the cryptic aspect of the series.
“And it wasn't until we were working on this, I think, the second feature. I was sitting in a parked vehicle waiting to shoot and our showrunner and creator Chris Carter came up to me who was directing the feature and he said he looked at my sides where my lines were and he said, "Look, no widows." And I said, "What what are you talking about?" He said, "No, no widows on the paragraphs that each character has." the word went all the way to the end with the period. So, you didn't like end halfway through that line. So, it was a perfect So, it was a perfect rectangle.
“So, the dialogue was designed visually. For nine years. [laughter] Wow. So, you're struggling. You're struggling with his OCD.
Forming every paragraph of dialog into perfect rectangles is way more extreme than just avoiding "widows". The usual term for this is "full justification" and typographically when it's done it's typically through word spacing and letter spacing. Full justification in monospace through word choice (which is what the Ares Luna article is about) is bonkers, but I can't see that happening for TV dialog.
I've sometimes heard "orphan" used to represent a single word left alone on its own line at the end of a paragraph, but the terms are often confused and Carter could have used "widow" in that sense.
> I've sometimes heard "orphan" used to represent a single word left alone on its own line at the end of a paragraph, but the terms are often confused and Carter could have used "widow" in that sense.
This is an acceptable use of the term "widow". From the Oxford English Dictionary [0]:
> A short line of text (usually one consisting of one word or part of a word) which falls undesirably at the end of a paragraph, esp. one set at the top of a page or column.
But there are dozens of contradictory meanings for "widow" and "orphan" [1], so the definition that you gave isn't wrong either.
In german typography the name for widow is "Hurenkind" wich translates to "child of a whore". I was pretty surprised to hear that word on a regular basis while working in text for print.
https://de.wikipedia.org/wiki/Hurenkind_und_Schusterjunge
Funny because "fixing an orphan" is hard in real life (assuming they've lost both their parents, you have to find them a foster home) but easy in typesetting (just add an empty line before), whereas "fixing a widow" is easy in real life (just remarry) but hard in typesetting.
I also saw that interview, then out of curiosity I tried to find any evidence of this. There are some fan sites with ostensibly original X-Files scripts out there[1]. Looking through some written by Carter[2], I wonder if this is apocryphal, or if he was messing with her a bit.
Just scroll through and look. In almost every paragraph or dialogue block, the last line ends very close to the right margin. Pretty much the only places that doesn't happen is when there's a single short line of dialogue by itself, meaning it doesn't wrap to a second line.
Looking through scripts on Boggsfiles, it's much more inconsistent, but it does happen, and perhaps more frequently in the later seasons. Here's one, from season 9; take a look at page 10 (page 13 in the PDF) for example, but it really happens throughout.
Hah! I was wondering if it was maybe something he started doing over time and should have looked more at the later seasons I guess. It's comforting that it's not just a fun story.
"No widows" on its own isn't enough to create a distinctive dialog cadence.
"Widows" (alone at the top) and "orphans" (alone at the bottom) are single lines cut off from the rest of a paragraph by a column/page break. The solution is generally just to fiddle with column/page breaks, which is purely typographical.
I'm sure that there's a distinct identity to X-Files dialog; it's just not due to this quirk.
I can totally see a fellow typography geek bragging about this to someone and them being horrified haha.
ETA: I speculate that Carter was avoiding "widows" to be considerate to the actors by not splitting lines across page turns.
I had the same thought, but I think the idea is that it didn't so much create a specific cadence as the cadence was a bit odd because the language needed to fit the visual layout rather than feel natural when spoken.
I'm also reminded of how David Milch supposedly wrote a lot of Deadwood in iambic pentameter. I only learned about this after seeing the show, but I did pick up the "Shakespearean" feel of some of the dialogue. Constraints often force creativity.
ELLSWORTH (CONT'D)
I tell you what -- I may have fucked
~~ life up flatter"n hammered shit,
but I stand before you today
beholden to no human cocksucker
and working a paying fucking gold
claim -- and not the U.S. Government
saying I'm trespassing or the savage
fucking Red Man himself or any of
these other limber-dick cocksuckers
passing themselves off as
prospectors had better try to stop
me.
I can’t hear it, although it certainly has certain rhythm to it (like any good dialogue does). Iambic rhythm however is so typical to English that you can kinda force most dialogue into it? I also believe writers make these rules to brake them the first change they get. Or perhaps I couldn’t find it skimming the pilot script: https://assets.scriptslug.com/live/pdf/scripts/deadwood-101-...
Bugger all - particularly given the boom mic operator and other framing "gaffs" are (as I recall) all part of the "wide screen" 16:9 later release on BluRay etc that were somewhat rushed out the door.
A number of shows of that era were filmed wide (16:9) and post processed / coloured / reframed and broadcast on TV in a box 4:3 aspect ratio
No visible boom mic operators, etc - careful eyes in the initial post production for TV phase saw to that.
Later wide screen releases were rushed with no real post production budget to address these and other issues - that's on the studios wanting a second grab at money, not the original creative teams.
Similar complaints abound for Buffy the Vampire Slayer and (IIRC) The Wire (?) and their wide screen releases.
There's a famous example of this in Malcolm in the Middle where the camera cuts to a different shot and a stand-in for Dewey is visible in the 16:9 release, but was not visible in the original 4:3 broadcast. So in one shot you have Dewey's normal actor, then in the next there is some random kid.
A recent similar example was Mad Men rerelease in 4k where the VFX weren't redone properly after a rescan of the film and you can see the man operating the machine with the pipe that spews sick out of a characters mouth.
I like the idea that arbitrary constraints can actually improve writing. Without a constraint, it's easy to fall back on familiar phrasing, while having to work around something unusual forces you to reconsider each word. I wonder if this applies to programming and other creative work too.
Live is short, required time to market is even shorter. Arbitrary constraints might work if you have nothing better to do, but if you have a goal, or specific ideas you want to train, you'll get more natural constraints.
History is full of half-baked products that were better executed by a competitor later. While I agree that manually balancing the text of manual is probably not the best use of time, it's this obsessive mindset that creates great products. If Super Metroid would have optimized for time-to-market we wouldn't even remember the game.
In programming certain word choices are valuable in this way. It's sad that pairs like true/false, good/bad, first/rest, and left/right are unequal length. But there are nice pairs like old/new, head/tail, fast/slow, same/diff, and right/wrong, which can help with create natural vertical alignment throughout a function.
In Japan they have the abbreviation “NG” (“not good”) that’s often used as the opposite of “OK”. I always liked how, when I worked for a Japanese machine learning company, classifiers would be between “OK” and “NG”. Maybe semantically “okay” and “not good” are not great opposites, but I always liked how having textual alignment makes the contrast immediately obvious
It's not unusual in France to use OK and KO. I never liked it much because it's too easy to confuse and no semantically a good opposite either, but visually it does look very balanced.
I wonder if that was part of the reason that some programming languages use constructs like "if / fi" "do / od" etc.
(Note: After writing the above, I checked with ChatGPT, it claims that the main motivation was to make it unambiguous which which "opening word" a "closing word" belonged to.)
Ah, but I use a normal proportional font in my editor so same and diff have different widths.
That was the fun comment. The serious ones:
1. I'm trading the ability to align statements on consecutive lines for a more pleasant reading experience.
2. Nobody ever complained that my source code is
a = 1
ab = 2
abc = 3
instead of
a = 1
ab = 2
abc = 3
3. No tables or diagrams in comments of course but I think that I could configure my editor (emacs) to use a monospaced font there. I do use a monospaced font for the ``` ``` blocks of md files.
I wonder if at any point during writing, the heroic author of that Super Metroid guide learned that "missiles" are not spent "missles", and decided to own the mistake rather than reword the entire guide.
Judging by the lowercase “m” it’s the 8x16 variation[1] and not the 9x16 one you linked, but otherwise yes, looks like the plain old VGA font? (Incorrectly displayed, as the site points out: the VGA didn’t have square pixels in either of those modes.) The site uses (AVIF) images in place of text, but it’s like 15 minutes to write a program that typesets an ASCII file in a given monospace bitmap font and writes out the result as say a PPM (and I’m sure ImageMagick can do it if you’d rather dig through docs than program), so this doesn’t seem to require any further explanation?
> Funny tidbit: "missile" used to be an adjective, "a missile weapon" = "a weapon than can be sent/thrown".
Related bit of comedy:
> Note also that the correct term for 'a missile to be deployed against "anti-missile missiles"' is not "anti anti-missile missile." It's "anti anti-missile-missile missile." You're always supposed to have one more "missile" than "anti," because otherwise nothing will blow up.
I few years ago I saw a TV interview where some gen-z kid confidently stated: "the dictdionary is supposed to reflect how I talk, not the other was around."
The tricky part is that spoken language and written language are not the same. Even if you are a descriptionist that believes dictionaries should represent how people write, it doesn't necessarily mean that the spelling changes based on how people pronounce it.
And are British, at least in Australia (and the US, I guess?) we pronounce the second "i".
It is always fun when you notice where someone is from based on secondary clues like that -- my favourite is the choice of "a" or "an" where it is ambiguous (for instance, I recently ran across "an HTTP request" where I would've said "a HTTP request").
I thought the rules were clear and it depends on how the word is pronounced, with a vowel or consonant sound.
I have only heard people say H T T P, as specific letters when pronouncing HTTP, and thus the a or an should be based on how one would pronounce the letter "H".
And H would be pronounced as "aitch". Starts with an a -> vowel sound -> should be "an".
But I'm a non native english speaker, so I'm happy to be proven wrong.
They pronounce these words as if the e and the l were reversed, if "truffle" was written in a phonetic manner it would be written "truffel". Since the "l" sound is last and preceded by a schwa, "truffle" (or "missle") obviously cannot be considered phonetic.
> They pronounce these words as if the e and the l were reversed, if "truffle" was written in a phonetic manner it would be written "truffel".
You can just look this up. The usual way to write "truffle" in a phonetic manner is of course /tɹʌfl̩/. You'll note that there is no vowel in the second syllable at all; it consists of just the L. (And that's what the small mark below the L means - "syllabic".) This is the standard phonetic analysis.
You might also notice that the IPA differs from your proposed spelling in several other ways. One, the difference between "ɹ" and "r", has no relevance in a discussion of English. But the difference between "f" and "ff" is more significant, and the difference between "u" (the vowel in GOOSE) and "ʌ" (the vowel in STRUT) is of critical importance.
And this is still just a phonemic transcription. Phonetically, you'd expect the word to be [tʃɹʌfl̩], with the initial consonant matching that of "chill" and not "till".
All of these are conventions of written English. Written "tr" is pronounced as if it were written "chr". Pronounced [tʃɹ] is always spelled "tr" and never spelled "chr". The difference in vowel quality between "moping" and "mopping" is indicated, as you probably already noticed, by the doubling of the consonant written after the vowel, and this is also the reason for the double "f" in "truffle". Why do we write an extra "f" when what we mean is that we're changing the pronunciation of the vowel before it? Not for phonetic reasons.
And what do you know, there's a standard spelling of syllabic L in English too, and that standard spelling is "-le", not "-el". That spelling is phonetic in exactly the same way that using "m" to spell the initial consonant of "mat" is phonetic - it is the established mapping between the orthography and the pronunciation.
Well I know what you mean, it's phonetic in the same way that a silent "ent" and "p" in "comptent" are "phonetic" in French, or the silent "n"s in "pannenkoeken" are in Dutch. In common language though we call that "not phonetic". But that's not what the person you were responding to was talking about, and it also has nothing to do with IPA notation: we were obviously not writing IPA here.
However to come back to IPA and "truffle", Wiktionary (not a definitive source I know, but there is no definitive source whatsoever about anything regarding the English language) does that say "truffle" rymes with /-ʌfəl/ with a schwa right there between the f and the l. The pronunciation of the word itself in Wiktionary is indicated with a syllable break rather than a schwa, which I would absolutely dispute, and indeed it looks like Cambridge dictionary[1] puts a schwa there in addition to the syllable break.
It's also written "truffel" in Dutch for what it's worth.
I suspect LLMs would actually struggle significantly with doing it consistently if given purely as a prompt instruction, but you could always constrict the sampling to force words that create a legitimate chain or fine tune / RL in some signal that would assist with it.
You are right that this is hard from a prompt alone, but for a slightly stranger
reason than the obvious one. The model never sees columns. It sees tokens, and a
token can be one character or nine, so "make this line 80 wide" asks it to run a
hidden tally over pieces it cannot count by looking at them. Any slip early in a
line compounds, and there is no backspace key to reach for once it is committed.
That said, the failure is not total. A model can lean on a learned feel for line
length, pick shorter or longer synonyms to land close to the target, and rewrite
a sentence when it overshoots. It will not be perfect every time, but it lands a
lot more often than pure chance would suggest. The sampling trick you mention is
the real fix: mask each token that would push a line past the limit, and force a
newline the moment the count hits the mark. That converts a fuzzy instruction to
a hard constraint with zero training. Fine tuning helps too, but mostly sharpens
the same internal counter rather than replacing it. This reply is a small proof;
if any line here is off by one, feel free to consider your point demonstrated...
An raw LLM no, but given code execution it can do a good job. I had my Claude Sonnet write a sonnet in this form after 14 rounds of iteration with Python:
"perhaps it would be best to let the browsers do it on screens, and typesetting software for printed materials, since they have access to the font, size, text region boundaries, it comes at the small cost that users don't actually get to read what an author wrote, but increasingly this is an LLM anyways, if its a website or legal contract alike"
And here I at first thought the direction the original post was going was "here's how I got a LLM to do this automatically". Seems like it would not be so difficult. Might still be be a win over their innate dispositions.
> BoVeX gives us a controlled tradeoff between these two states. By changing how much it costs for the text to be semantically wrong, we have a dial that allows us to smoothly interpolate between Lorem Epsom and Donald Knuth.
> At the same time, who among us didn’t nod in recognition at least, having once spent hours massaging a button UI string or a tooltip just to get it to fit under the certain width in a densely packed interface?
I did, and then I got a customer email about how they were using a display-zoom OS accessibility feature and things were truncated on their device. :')
Is that insane? Every game[0][1] I ever helped ship has had fully localized UI. In game development that seems to be the standard way of doing things. And it requires a lot of testing and sometimes comes with workflows to automatically test that all strings fit their intended box.
[0] Before I worked on game development I actually worked in virtual surgery simulation, and there we also had a localized UI with a very large number of supported languages and tooling to detect issues.
[1] Need For Speed (2015), NFS: Payback, NFS: Heat, Lost in Random, Wavetale
Even as a backend dev who dabbles in frontend as a hobby - I get the view looking great on desktop, then a week later I open the site on mobile and am horrified
> This presents a problem for the typical way that academic papers are written, which is to do all the work in a coffee-fueled fugue in the last few days before the deadline, then stay up all night writing the paper and finding citations for the pro-forma “related work” section which you did last but you know that the reviewers will insist upon
I have zero exposure to academia but chuckled because thats often what I do for blog posts :P
AIs these days are pretty good for the 'find prior art and related work' part I find. Of course, you should treat their output like that of an over-eager but somewhat unreliable intern.
The German is more crass: Hurenkind and Schusterjunge, translates to 'child of a whore' and 'shoemaker boy'. The child of a whore does not know where it comes from (who is their father), the short final line - the shoemaker boy is so poor, he does not know where he will end up (the short first line)
Those who lived through the (text-mode) WordPerfect era may remember 'widow and orphan protection' as being one of the features which was advertised for this program, i.e it could be set to either move that orphaned first line of a new paragraph to the next page or move a few extra lines or a whole paragraph to the next page to keep the widow company.
I remember using WordPerfect in that era and never understanding what that feature was. It seemed implausible to me that it was actually protecting human widows and orphans, but I couldn't imagine what it had to do with text layout!
Absolutely! Unfortunately for me, I probably wondered about this 35 years ago and learned the answer 15 years ago. Otherwise, I could be one of today's lucky 10,000 in the xkcd 1053 sense.
this is only tangentially related to the article, but I've always found text justification strange. For me paragraphs with ragged edges are easier to read than justified paragraphs, because the irregular ending point helps me keep track of where I am. And justification can lead to some very odd-looking lines. So I've just never quite understood why it's so common in typesetting
Differences are supposed to convey information. E.g. a paragraph's first line is indented to indicate that this is a start of a paragraph. Differences in line width convey no useful information, so the are suppressed. Same goes for overall text height on a page, although this rule is broken more often.
Typesetters are known to be very specific about small details. E. g. tables are typeset with meticulous alignment rules. It may look superfluous, but it is not. The nature of the craft is that it has to be invisible unless you know where to look.
It's a good illustration what a terrible idea text justification is. It should never even become an acceptable formatting technique as the entire purpose of reading is predictability and varying space length is very much the opposite of predictable. To this day I commit no-text-align-justify CSS lint rule to every repo I'm part of.
I remember doing this by hand. A long time ago. It gave me a nice ADHD fidget-subtask while my brain worked out the higher level organization of what I was writing.
I completely forgot I did that.
My life has 1000's of strange untold stories of absentminded activity. I've done things you people wouldn't believe. Someday I will fall asleep and get so distracted I will forget to wake up. All those moments will be lost in time, like bits on bad tape.
I remember procps top --help did this. I hated the resulting clunky, inconsistent wording enough to add a local patch in my procps build recipe to rewrite it.
Apparently I'm still carrying the patch, so the current version must still do it.
I've definitely been guilty of wording my multi-line doc comments in a way that would ensure they'd flow without awkward right margins. I would have a macro in vim that would call the fmt program to reflow the comment to 79 (later 98) characters, and then would iterate on word choice until the comments looked good. Not exactly right-justified, but no very ragged edge either.
In a very real sense this is exactly what LLM watermarking does. It "chooss the words carefully" in order to get text to "line up," but not with a visible margin... instead with a verifiable word distribution that proves the author knew a secret key.
"Michael Hart's email messages and blog posts had equal line length paragraphs in monospaced font: he chose the wording in such a way that each line had the same number of characters."
My dad told a story of a classmate in high school going through the effort of manually justifying text in a paper he wrote and being rewarded with a plagiarism accusation.
That was done by typing the whole paper twice, with added spaces the second time.
I was in awe when I discovered this, and decided to apply this simple rule to the help text of a small command line tool I was working on: https://git.bitmycode.com/sodimel/n#help
That's the sort of attention to detail that makes me love an app. Apple used to have this. It's why I became one of their users. My hope is that John Ternus understands why this sort of "spinning of wheels" is essential when he takes over. I read that Steve Jobs picked the order of the icons in the Dock himself. Some people know that little things matter.
I’ve been searching all over for a classic example of this that I first found around 1986, but I can’t locate it. It went on for a page or two, hand justified lines of maybe 40 characters, and then at the end of it he started making each line one character shorter, until the essay ended with these, the only words I remember from it:
dumb is
what I
think
this
end
is
!
If somebody can find it, share it here, I’m going to post it on my own website so it is saved for history. The last time I saw it was 5 or 10 years ago, and there was only one or two copies on the internet at that time, and now there seems to be none.
You may be thinking of one of the poems of Christian Morgenstern? He used many tricks of formatting for jokes, famous example that fits with yours is The Funnels
I must admit to occasionally rearranging words or choosing different synonyms to make a column of spaces line up in a monospaced paragraph, so that you could draw a straight line down one column the screen without passing through any letters or punctuation. Or making a diagonal line of spaces, top-left to bottom-right.
I usually only did that when the text already was close to lining up that way, though.
It's a guilty pleasure of mine, spending a few minutes to clean up the aesthetics of docstrings and comments. I justify (heh) it to myself by catching unclear wording on this last cleanup pass -- and not taking it too far, obstrusifying for the aesthetic.
Do things the "waterfall" way and you won't need any backtracking, as every previous line will have been adjusted as you're moving forward, not backwards, to adjust the chosen words.
Agents get a little upset when you ask them to do this and then check their work with a hook. They do not enjoy the process and create some weird looking text!
I used to go to my computer laboratory in high school and at my mom's work to print out GameFAQ walkthroughs in the late 90s. They were excellent. I wrote this to remind myself of simple fun that's been superseded by grander ambitions, and sometimes I think I am wrong for choosing the latter.
Definitely in the pool of people that used to do this extensively. I would occasionally increase/decrease the colum limit by a few characters and try again if the words didn't align.
BITD I used Protext word processor on Atari ST (and later DOS/Windows PC) which automatically justified monospace text. It also had a pretty good dictionary (all in 512KB of RAM) and I remember doing this word dance to get lines to flow better.
Before LLMs, there were Markov chain bots. We used SeeBorg on IRC and over time its dictionary would fill up with whatever everyone said. Most of it was nonsense, but every once in a while it would say something perfectly timed. Almost everything It said making sense or not was hilarious though.
The Super Metroid guide is the kind of thing that AI will render obsolete, which makes me sad.
One of my favorite quotes is from Penn and Teller, "Sometimes magic is just someone spending more time on something than anyone else might reasonably expect". AI has shifted that a bit.
But lots of technology has rendered formerly human-lead things obsolete, and I'm sure we'll find new ways to express creativity.
But he didn't need to do that before either. He did it because he cared (in a weird way, sure). And some people will still care.
Video game text FAQs in general though were a dying genre before gen AI anyhow. Something I bemoan when I try to find one little piece of info and I'm faced with guides that are spread out on dozens of webpages for impressions of ads that I don't even see, or long videos that I have try to scroll through and take a ton of time just to find out if the person even went to the area I'm interested in. I sure miss Ctrl+F on GameFAQs.
Yup that's my point, and maybe the bigger issue isn't if people care or not but rather... can we distinguish between "they cared" and "they spent 30 seconds on a prompt".
I must admit I've indulged in constrained writing when I was a teenager with the same purpose: circumventing spontaneous layout errors in Word when writing a paper for school, feeling a non-negligible amount of anxiety due to the deadline being around the corner. Terrifying.
In a recent interview on Conan O'Brien's podcast, Gillian Anderson said X-Files creator Chris Carter wrote his scripts visually so they didn't have any widows (the last line of a paragraph carried over to the top of the next page):
Chris told me I mean that there was a particular way that we used to speak in the show that it that wasn't a normal rhythm and syntax. It was slightly backwards. which felt like it was almost part of the cryptic aspect of the series.
And it wasn't until we were working on this, I think, the second feature. I was sitting in a parked vehicle waiting to shoot and our showrunner and creator Chris Carter came up to me who was directing the feature and he said he looked at my sides where my lines were and he said, "Look, no widows." And I said, "What what are you talking about?" He said, "No, no widows on the paragraphs that each character has." the word went all the way to the end with the period. So, you didn't like end halfway through that line. So, it was a perfect So, it was a perfect rectangle.
So, the dialogue was designed visually. For nine years. [laughter] Wow. So, you're struggling. You're struggling with his OCD.
One more example of the utopian idea that, because there are so many dedicated nerds out there for any possible thing imaginable, if we gave people more free time there would always be someone who would volunteer to do xyz task if it was needed and if they had a community who supported them.
That's what comes to my mind anytime I see some huge labor of love like that guy rewriting 17k words to fit nicely.
I did something similar in my paper "Meno II: A self-referential Socratic dialogue about memory and computer programming" [1] (published in The Reasoner). Every length-200 block of text is carefully chosen so as to steganographically encode one character of a computer program, and Socrates and Meno decode the program in real time by examining the words they've said.
I didn't do it entirely by hand, but I didn't just one-shot it with AI either (good luck). Instead, I wrote the whole dialogue in a special format specifying alternate words [like|similar to] [this|what I'm [currently doing here|doing right now]]. For each length-200 block, the number of variations grows exponentially in the number of "options" to thus choose from, so it becomes feasible to have a computer systematically choose options so as to hide the desired secrets.
The same method could be used for monospace alignment, though I suspect it would be harder the narrower the page be.
I recently started reading a book sample for "Superintelligence" on Kindle, but stopped reading because all the text was noticeably justified, often with large gaps between words in many sentences. This was very annoying, especially since the option to disable justification was unjustifiably disabled.
Strangely enough, this same book doesn't have the same problem on other platforms.
Almost irrelevant to the story itself, but here's what it feels like to use Emacs these days.
The story talks about monospace fonts and how unappealing they could be for reading prose. It is a fascinating post on itself, but here's what happened - it caught my eye while I was busy, I clicked the link, it opened the page, I kept it hanging around and forgot about it. Then HN page got buried in my browser history. After a while, I found the tab, I read the story and it made me thinking if anyone shared any thoughts on HN. Instead of digging it up from browser history - I ran consult-hn and found the thread - it showed up in an org-mode-derived buffer of hn-reader.el. I was reading through the comments, and I was like: "yah, this probably would be easier and faster to read if I used a different font". I enabled variable-pitch-mode, but it didn't get much better - the default font I set for the face isn't great - I just needed something that existed in both Linux and Mac. I should've picked a better one.
"Let me try a different font", I thought. And how do you change the font family in Emacs? There's probably a way doing it through the UI, but thank you, no thank you - I have a programmable editor. I instinctively opened a scratch buffer and started typing: (set-face-attribute ... And at that point I realized: "Well, this would, a) Change the font everywhere b) What the heck were the parameters for this sucker?".
Of course, why not ask the LLM? I started typing the prompt, right in that buffer. I could've just finish typing and call (gptel-send). But, "what if this becomes a longer chat?". I mean, I still could continue chatting in that buffer, but there are benefits for having specialized gptel buffer, for instance, all my gptel-dedicated buffers get automatically saved. So, instead, I invoked (gptel-inline) - if the answer is short - I'd dismiss the popup and if I have follow-ups, I'll just continue.
LLM told me how to change the font in the current buffer. But I said: "I want to change it for any chosen buffer, since I'd be invoking this from the scratch buffer". At this point I was thinking: "I'm just fooling around, but let's see where it takes me..." It gave me this code snippet.
Since a gptel buffer is just an ordinary buffer, I changed `target-buffer-name` to `HNComments` and evaled it. The font in the buffer immediately changed. "Meh, I don't like this one, I want to try another...", then I changed the font name.
And at that point, I felt so stupid for wasting my time, I typed: "Can you just build me a consult picker, to select a font for a given buffer with a live preview."
And it just did. ~25 LOC. It took me far longer to write about it, in reality, the transition from a fleeting thought, from a mere idea to a concrete implementation took me seconds. Seconds!
And now I have a command that I can either keep in my scratch buffer, or stick into my config. Or literally just discard until next time I need to temporarily change the font in a given buffer.
Note: this is not a post about "how awesome it is to use AI in Emacs", no. It is all about how enormously flexible Emacs is to bend around to deal with any kind of text.
This is why so many of us are so much into Emacs. In a time where pretty much all software around us gets progressively enshittified, there’s this 50 year old Lisp interpreter masquerading as an editor that you can make truly and uniquely yours.
Sometimes I think I'm too detail-oriented. Then I remember that someone once spent weeks manually rewording a game FAQ so the right margin would look pretty in a text file. And I feel better about myself...
1 = https://en.wikipedia.org/wiki/Widows_and_orphans
reply