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

Fix deleting region in a table

* lisp/org.el (org-self-insert-command): Fix deleting region in
  a table.

Reported-by: Nick Helm <nick@tenpoint.co.nz>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-08/msg00346.html>
This commit is contained in:
Nicolas Goaziou 2017-08-17 18:16:22 +02:00
parent 731f59f965
commit 91c68865c6

View file

@ -20122,6 +20122,8 @@ overwritten, and the table is not marked as requiring realignment."
(call-interactively 'org-self-insert-command))))) (call-interactively 'org-self-insert-command)))))
((and ((and
(org-at-table-p) (org-at-table-p)
(eq N 1)
(not (org-region-active-p))
(progn (progn
;; Check if we blank the field, and if that triggers align. ;; Check if we blank the field, and if that triggers align.
(and (featurep 'org-table) org-table-auto-blank-field (and (featurep 'org-table) org-table-auto-blank-field
@ -20135,7 +20137,6 @@ overwritten, and the table is not marked as requiring realignment."
;; width. ;; width.
(org-table-blank-field))) (org-table-blank-field)))
t) t)
(eq N 1)
(looking-at "[^|\n]* \\( \\)|")) (looking-at "[^|\n]* \\( \\)|"))
;; There is room for insertion without re-aligning the table. ;; There is room for insertion without re-aligning the table.
(delete-region (match-beginning 1) (match-end 1)) (delete-region (match-beginning 1) (match-end 1))