0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-09-29 19:07:52 +00:00

org-table.el: Allow to import files with no .txt, .tsv or .csv

* lisp/org-table.el (org-table-import): Allow to import files
with no .txt, .tsv or .csv extension.

TINYCHANGE
This commit is contained in:
Utkarsh Singh 2021-05-01 10:48:07 +02:00 committed by Bastien Guerry
parent 0a689bf6c5
commit 7c99d15557

View file

@ -929,7 +929,8 @@ 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 (rx "." (or "txt" "tsv" "csv") eos) file)))
(not (string-match-p (rx "." (or "txt" "tsv" "csv") eos) file))
(not (yes-or-no-p "The file's extension is not .txt, .tsv or .csv. Import? ")))
(user-error "Cannot import such file"))
(unless (bolp) (insert "\n"))
(let ((beg (point))