I plan to use csv-mode. In Excel, csv can be shown like the Picture 2. In emacs, C-c C-a yields Picture 1. Can I fix the width of the columns in csv-mode?

Picture 1 Picture 1

Picture 2

Picture 2

  • You can use Org mode tables to do that. I don't know if csv-mode does that. Also, what is C-c C-a bound to in your case? It is undefined for me, so I'm wondering if there is more than one csv-mode. The one that I have is from elpa.gnu.org/packages/csv-mode.html.
    – NickD
    Nov 24 at 19:56

I found that the following setting solve this issue.

(use-package csv-mode
  (setq csv-align-max-width 7)
  (define-key csv-mode-map (kbd "C-c C-a") 'csv-align-mode))

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.