GNU bug report logs -
#55315
[elpa/csv-mode] [PATCH] CSV separator guessing
Previous Next
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
Message #17 received at 55315 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Mattias Engdegård <mattiase <at> acm.org> writes:
> 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.
Ah, thanks, I misread the docstring of `skip-chars-forward':
(but not at the end of a range; quoting is never needed there)
I somehow misinterpreted that as quoting not being necessary at the end
of the string fed to `skip-chars-forward'.
Updated patch with your proposed fix attached.
[0001-Add-CSV-separator-guessing-functionality.patch (text/x-diff, attachment)]
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.