Sometimes the best hledger transaction, at least for expenses, is one that never occurs.
For example, our living room floor lamp broke, so it was time to shop for a new one.
As I was thinking about a new floor lamp, I remembered one that I bought about 25 years ago. What sticks in my mind was that the lamp itself cost less than the 3-way bulb that I bought for it at the same time. It was really a good buy for the lamp.
So, what can I find today for a replacement? I checked Wirecutter, a site that I find useful when doing product research. However, I quickly discovered that I was not going to find a new floor lamp as inexpensive as the one I bought 25 years ago. In fact, some of the floor lamps were shockingly expensive, at least for what I wanted to spend. So, I put my purchase on pause.
Later, I noticed a lamp on our back porch. This was a lamp that we almost never use, so it wasn’t doing any good on our back porch. I moved it to the living room, and my wife opined that she thought it looked good there. Problem solved.
Getting back to hledger, the above is a transaction that will never get recorded because, well, it was never a transaction. I didn’t spend any money, so there was nothing to record.
Technically speaking, though, I suppose that I could have made an entry something like the following:
2026-02-10 Move lamp
assets:back porch -1 lamp
assets:living room 1 lamp
The bottom line is, however, that my financial bottom line is better off for finding a no-cost solution.