From 6b112927de73c43edfd08254217808ebff42772a Mon Sep 17 00:00:00 2001 From: Utkarsh Singh Date: Wed, 28 Apr 2021 10:26:46 +0530 Subject: [PATCH 1/3] org-table.el (org-table-import): add yes-and-no prompt Add a yes and no prompt for files which don't have .txt, .tsv OR .csv as file extensions. --- lisp/org/org-table.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/org/org-table.el b/lisp/org/org-table.el index 0e93fb271f..e0b2be6892 100644 --- a/lisp/org/org-table.el +++ b/lisp/org/org-table.el @@ -938,7 +938,8 @@ org-table-import - 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 "File does not have .txt, .tsv or .csv as extension. Do you still want to continue? "))) (user-error "Cannot import such file")) (unless (bolp) (insert "\n")) (let ((beg (point)) -- 2.31.1