GNU bug report logs - #55315
[elpa/csv-mode] [PATCH] CSV separator guessing

Previous Next

Package: emacs;

Reported by: Simen Heggestøyl <simenheg <at> runbox.com>

Date: Sun, 8 May 2022 14:13:02 UTC

Severity: normal

Tags: patch

Done: Simen Heggestøyl <simenheg <at> runbox.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Mattias Engdegård <mattiase <at> acm.org>
To: Simen Heggestøyl <simenheg <at> runbox.com>
Cc: 55315 <at> debbugs.gnu.org
Subject: bug#55315: [elpa/csv-mode] [PATCH] CSV separator guessing
Date: Mon, 9 May 2022 11:37:41 +0200
8 maj 2022 kl. 21.31 skrev Simen Heggestøyl <simenheg <at> runbox.com>:

> Am I right in thinking that the use of
> `regexp-quote' in the `csv-set-separator' case gives the right result?

Yes, I think so. `csv-set-separator` should probably escape the character in `csv--skip-chars`, however:

  (setq-local csv--skip-chars (format "^\n%c" sep))

should be

  (setq-local csv--skip-chars (format "^\n\\%c" sep))

I'm not sure if a separator can be chosen that needs escaping here but better be safe; who knows how the code will be used.





This bug report was last modified 3 years and 14 days ago.

Previous Next


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