table: Fix regexp

* lisp/org-table.el (org-table-import): Fix missing leading
backslash.  Switch to Rx notation for clarity.
This commit is contained in:
Nicolas Goaziou 2020-09-15 09:50:29 +02:00
parent fbccf09c74
commit 10ed4994f5
1 changed files with 1 additions and 1 deletions

View File

@ -935,7 +935,7 @@ lines. It can have the following values:
- regexp When a regular expression, use it to match the separator."
(interactive "f\nP")
(when (and (called-interactively-p 'any)
(not (string-match-p "\.\\(?:[tc]sv\\|txt\\)$" file)))
(not (string-match-p (rx "." (or "txt" "tsv" "csv") eos) file)))
(user-error "Cannot import such file"))
(unless (bolp) (insert "\n"))
(let ((beg (point))