GNU bug report logs - #20343
csv-mode fails if mode line is customized

Previous Next

Package: emacs;

Reported by: Peter Eisentraut <peter <at> eisentraut.org>

Date: Thu, 16 Apr 2015 00:18:02 UTC

Severity: normal

Done: Stefan Monnier <monnier <at> IRO.UMontreal.CA>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Peter Eisentraut <peter <at> eisentraut.org>
To: bug-gnu-emacs <at> gnu.org
Subject: csv-mode fails if mode line is customized
Date: Wed, 15 Apr 2015 20:00:23 -0400
This is about csv-mode.el version 1.2 from elpa.gnu.org.

If the mode line has been customized in a certain way, calling csv-mode
will fail.

Example:

in ~/emacs.d/init.el

(setq-default mode-line-format '("%e"))

Install csv-mode.el.

Then run

emacs test.csv

This will produce a message like

(wrong-type-argument number-or-marker-p ("%e"))


The reason is that in the definition of csv-mode-line-format, the
arguments of the `last' function are flipped:

(defconst csv-mode-line-format
  ;; See bindings.el for details of `mode-line-format' construction.
  (let* ((ml (copy-sequence (default-value 'mode-line-format)))
         (x (or (memq 'mode-line-position ml) (last 3 ml))))  ;; wrong


(I doubt that messing around with the mode line like that is current
practice, but that might be a separate discussion.)




This bug report was last modified 10 years and 43 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.