Adventures in Tech Land, Season 2
2019/12/22, day 10
For reasons that I cannot explain, write-region
kept behaving weirdly since the beginning. The behavior is roughly the following:
dailyIndex
functionindex.html
, it looks like the elisp code buffer is attached to the fileI was actually considering the creation of an insert function to automate the RSS feed creation. I worked on that the last few days and I eventually managed to write something relatively clean, that managed errors and nicely closes the buffer once modified. I have not used it live on the RSS but tonight, as I was creating this file, I got bit by the write-region bug again and got fed-up. I decided to use my hand-made myInsert
function with an empty marker, which would leave point at the top for inserting the template.
I tried, and that worked, and there were no weird side effects, and I'm now happily filling the template with my achievements. I still promissed to find a reproductible way to trigger that behavior so I'm not totally done with write-region
, but I need to move on, and this insertion function, which I had to write because write-region
overwrites existing strings anyway and would not work in an xml file, was a huge help.
On a side note, no spoiler here, but the moral of the Star Wars franchise is that it's not easy to have it both ways: either you have a good story that moves people and is also a good movie, or you have a blockbuster that ties a few loose knots and makes (some) people richer. That's the story behind the first and the last Star Wars movies. If my 7 years old self had been told that 42 years ago, I would not have lost my time waiting to get a life. Funny how turning 50 makes the world look different.