I use ranger to manage files from my shell, because it gives me vim-style navigation1 and search features that help me navigate my file system very quickly.

I use LibreOffice for all my spreadsheet needs because, well, Numbers.app is not available on Linux.

I use pandoc for a variety of reasons, including converting blog posts into PDFs.

When we put those three together, however, my laptop fan started blowing at top speed and wouldn’t stop. My laptop froze—or at least went very very slowly—and I had to reboot a few times and explore a little in order to discover the problem.

The Problem

  1. ranger can create previews of files as you navigate through the file system.
  2. ranger uses pandoc to create previews of certain kinds of files, rendering the text from some kinds of non-text files. This makes it possible to preview a PDF, for example, by extracting the text instead of rendering a 1/4-size image of the file that only very young eyes could possibly read.
  3. pandoc (at least version 2.18, which I have installed) becomes stuck when it tries to process an Open Document Spreadsheet (*.ods). According to the project’s lead maintainer, pandoc doesn’t support that format so whatever happens, happens.
  4. When I navigate to a directory in ranger and that directory contains Open Document Spreadsheet files… pandoc tries very hard to render the spreadsheet, leaks memory, spins forever at top speed, and begins eating CPUs.

Users of pandoc should not expect this problem to be resolved any time soon. Garbage in, garbage out, it seems. And yes: a binary file is garbage to a Markdown parser.

The Solution

Install a version of ranger that doesn’t try to render previews for Open Document Spreadsheet files. Sadly, ranger doesn’t release new versions very often, which makes this slightly more complicated than installing the latest version from your Linux distribution’s package manager.

It appears that ranger fixed the problem in commit 9da2b4c79323a3f34da8d54198364d549a29ff00. I built ranger from source with the latest version of the main branch of the project as of 2023-04-20. This version worked for me. Building from source didn’t seem intimidating to me and it just worked the first time.

I hope you have a similarly smooth experience fixing the problem.


  1. I would prefer kakoune-style navigation, but I can settle for vim.↩︎