Announcing Casual CSV
24 Nov 2025 Charles Choi
Like Make, the CSV file format will outlive us all. That said, editing a CSV file is a precarious task, as it can be easy to violate its separator and escape rules. Thankfully, the Emacs ecosystem has got you covered, with the 3rd party ELPA package csv-mode. This mode provides all kinds of conveniences including:
- spreadsheet-like visualizing and editing of fields (field alignment)
- separator auto-detection (comma, tab, space, etc.)
- support for quoted fields
- sorting by fields
- killing and yanking fields
To aid in the discovery and usage of these features, I’m happy to announce Casual CSV, a Transient menu for csv-mode, now available in the Casual v2.11.1 update on MELPA.
One notable feature Casual CSV adds is the ability to select a region of rows to copy to the kill-ring as an Org table. This is also usable in Markdown flavors that support tables.
Closing Thoughts and Caveats
YMMV on how well csv-mode works for you as its performance is tied to the size of CSV file you are working with. If you are trying to edit a CSV file that is hundreds of megabytes in size or greater, you might want to think twice before doing this in Emacs with csv-mode.
As a general rule, I try to avoid editing CSV files in the first place, as I prefer to think of them as files for data exchange. My ideal use-case for csv-mode is really for viewing. That said, if you really need to edit a CSV file, it is best to copy it first. Casual CSV reflects this sensibility by offering a command to duplicate a file.
To get the best results out of csv-mode, I highly recommend turning on field alignment and separator auto-detection. In addition, turning off line-wrapping will aid in both visualization and navigation. The following Elisp configuration shows how to do this.
;; disable line wrap
(add-hook 'csv-mode-hook
(lambda ()
(visual-line-mode -1)
(toggle-truncate-lines 1)))
;; auto detect separator
(add-hook 'csv-mode-hook #'csv-guess-set-separator)
;; turn on field alignment
(add-hook 'csv-mode-hook #'csv-align-mode)