emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] orgtbl-mode and markdown


From: Vegard Vesterheim
Subject: [O] orgtbl-mode and markdown
Date: Tue, 18 Dec 2012 09:33:12 +0100
User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/23.3 (gnu/linux)

I had problems editing tables (using the minor mode orgtbl-mode) in
markdown files. 

To reproduce: 
 - visit an empty buffer in markdown mode
 - M-x orgtbl-mode
 - create a new table (C-c |)
 - try to edit a cell
 - observe that the edited text is misplaced at the end of the line

The following patch against 709bf92950fb3e9dd7425e01eb53eedad43c7262
seems to fix the problem

diff --git a/lisp/org-table.el b/lisp/org-table.el
index acad0bb..188a825 100644
--- a/lisp/org-table.el
+++ b/lisp/org-table.el
@@ -4233,10 +4233,10 @@ overwritten, and the table is not marked as requiring 
realignment."
            t)
           (eq N 1)
           (looking-at "[^|\n]*  +|"))
-      (let (org-table-may-need-update)
-       (goto-char (1- (match-end 0)))
-       (backward-delete-char 1)
-       (goto-char (match-beginning 0))
+      (let ((org-table-may-need-update) (mb (match-beginning 0)) (me 
(match-end 0)))
+       (goto-char (1- me))
+       (delete-backward-char 1)
+       (goto-char mb)
        (self-insert-command N))
     (setq org-table-may-need-update t)
     (let* (orgtbl-mode



reply via email to

[Prev in Thread] Current Thread [Next in Thread]