Marcin Borkowski: Homepage

https://mbork.pl/Homepage

21 posts

Tech 95% · Culture 5%

Subscribe via RSS

  1. Hideshow mode

    Recently I discovered a very cool feature of Emacs. Apparently, it’s been present in Emacs for over 30 years, although the Git log shows that it’s been heavily worked on very recently. Meet Hideshow mode. It’s purpose is simple: it allows to, well, hide or show blocks of code.

    0
  2. Fast spell-checking in Emacs with Jinx

    Emacs has had a spell-checker for a very long time. In fact, I’ve been using ispell-word for at least several years now, as I have mentioned for example here. However, I’ve only used Flyspell mode once, over two decades ago, when I tried it out on a machine with maybe 8MB RAM and a Pentium-class processor clocked at about 100MHz and decided that it’s too slow to be really useful. Well, things have changed a bit since then, haven’t they?

    0
  3. Bank statement analyzer

    Some time ago, a friend of mine asked if I know an app which could allow him to analyze his spending based on bank statements. I did a quick research and I found a few tools like this, but nothing looked good enough for me to safely recommend it to him. Fortunately for him, he asked me that question in the exact moment in my life when (a) I had a lot of free time and (b) I wanted to spend it learning some potentially useful new skills. It didn’t take me long to decide to code such a tool myself.

    0
  4. opening pdfs in pdf-tools

    As I wrote many times, I use pdf-tools as main pdf viewer. I thought that one thing that would be nice is being able to open pdfs in it from outside Emacs. For example, texdoc could use it instead of Evince (which is pretty nice, but it’s not Emacs!).

    0
  5. Disabling minor modes with local variables

    I’ve known about file local variables for a long time. I also knew about the eval keyword, which can be used as a file variable, but instead of binding the given value to the (non-existent) variable eval, Emacs evaluates it. This is often useful, but the usefulness is diminished by the fact that Emacs nags the user whether it is safe to evaluate a form provided that way. (Of course, it is reasonable security-wise, and that’s why I didn’t set enable-local-variables to :all – I still prefer the…

    0
  6. Comments on Scrolling pdfs in other windows

    This is a common-enough need that the Emacs developers have you covered -- you don't need advice for this. From the release notes for Emacs 29: . . .

    0
  7. Scrolling pdfs in other windows

    I have written about pdf-tools quite a few times – it’s a fantastic Emacs package for viewing and annotating pdfs without leaving the comfort of Emacs. It is not ideal, though – or at least, not ideal for me. One feature of Emacs I often use is the scroll-other-window command (bound to C-M-v), and its sibling scroll-other-window-down (C-M-S-v). They are extremely useful for example when reading documentation or watching live Markdown preview, and I wish they worked with the TeX and pdf-tools…

    0
  8. Copying images in Emacs

    A few weeks ago I was on vacation. Of course I brought back quite a few pictures with me. When I got back, I sat to select some of them to make a gallery for my family and friends. I started with copying all pictures from two mobile phones and a camera to my laptop. Then I wanted to copy a few carefully chosen images to one directory. To my surprise, Emacs’ Image mode does not have a command to copy the currently viewed image to another directory.

    0
  9. My impressions with agentic coding

    For the past several months I’ve been experimenting with so-called “agentic coding”, that is, using LLMs to write software. I have to say that I’m quite impressed by the possibilities this opens – and at the same time, pretty annoyed by the limitations…

    0
  10. Ignoring pdfs when auto-reverting files

    I quite like the global Auto Revert mode. It is especially useful when I something else than Emacs sometimes changes my files. (I bet some readers immediately thought about the now-fashionable agentic coding, but plain old git switch is enough!) It has one drawback, however. I hardly ever use TeX nowadays, but when I do, I use pdf-tools. Auto Revert mode doesn’t play nice with pdfs open in Emacs, often trying to revert them before TeX finishes writing to them, which results in ugly flickering.

    0
  11. Comments on Marking today’s files in Dired

    The `dired-mark-if' `macro` also marks special lines (such as those specifying a directory path), so let's exclude such lines: (dired-mark-if (let . . .

    0
  12. Marking today’s files in Dired

    As anyone reading my blog knows, I’m a big fan of Dired. One of its killer features is the set of marking commands, which allow marking files based on their extensions, names (regex-based), contents (also regex-based). There is also a “universal marking command”, dired-mark-sexp, which allows the user to provide an Elisp expression serving as a predicate and marks all files satisfying that predicate. What’s even more, you can use several symbols in that predicate, like size or name (head to the…

    0
  13. describe-personal-keybindings

    Some time ago one Emacs user made themselves a local web app showing various Emacs keybindings – basically, a web-based Emacs cheatsheet. It’s definitely a nice project even if not for me – if I were to create something like that, it would run in Emacs and not in the browser, it would definitely mention transpose-.* commands, and it would never be dark-mode-only;-). But it’s a really cool and nice project nevertheless! That’s not the topic of this post, however. In a Reddit discussion about…

    0
  14. Node.js reporting

    Some time ago I wrote about a new-ish feature of Node where it parses .env files (dotenv-style) itself. Today, I’m going to mention a feature which has been in Node for some quite time, but somehow I’m not sure many people know about it.

    0
  15. How I use my numeric keypad with Emacs Ledger mode

    As the readers of my blog know, I’m a heavy Ledger user. One thing that annoyed me was the fact that I couldn’t use my numeric keypad to enter amounts. The reason was simple – the “comma” key on that keypad inserted a comma in Emacs and not a period.

    0
  16. How to quickly generate the list of all columns in a PostgreSQL table

    It is well-known that select * is an antipattern (except maybe in an SQL REPL). What to do, however, if you have a select * in your codebase and you want to change it to a proper list of column names?

    0
  17. Binding TAB in Dired to something useful

    I’m old enough to remember Norton Commander for DOS. Despite that, I never used Midnight Commander nor Sunrise Commander – Dired is still my go-to file manager these days. In fact, Dired has a feature which seems to be inspired by NC: when there are two Dired windows, the default destination for copying, moving and symlinking is “the other” window. Surprisingly, another feature which would be natural in an orthodox file manager is absent from Dired

    0
  18. Easter 2026

    Christ has risen, rejoice! I have a bit of a rough time right now, but we have Good News – Jesus is greater than our troubles! Like in previous years, rest assured that I will pray a decade of the Rosary for all of you, my dear readers. Hallelujah!

    0
  19. Node.js and .env files

    The more I work with Node.js, the more I appreciate its built-in features. Supply chain attacks are a real thing and the more I can do without pulling in megabytes (or even kilobytes) of dependencies, the better. For example, one of the very common patterns in Node applications are configs in .env files. The traditional way to digest them is to use dotenv, which admittedly has zero dependencies – but nowadays even that is not necessary.

    0
  20. Disabling Eslint in one line with Tide

    When coding in JavaScript, I use Eslint like everybody else. (Let’s set the discussion about Eslint vs. Oxlint for another time.) One problem I have is that sometimes (rarely, but not never) I need to tell Eslint that I broke one of the rules intentionally and I don’t want it to nag me about it.

    0
  21. Selecting a sample of a PostgreSQL table

    Today I have a nice SQL tip about sampling tables in SQL. (I’m writing about PostgreSQL as usual but this applies to other databases, too, since this feature is in the SQL standard.) Imagine you have a large table and you want to get a general feeling about what its contents look like.

    0