Bläddra i källkod

Fix bug with table alignment and alignment cookies

Michael Brand writes:

> First, when I open a file with the content
>
> -*- eval: (org-mode) -*-
> #+STARTUP: align
> | <l8>     |
> | 3.14     |
> | 3.1415926535897932384626433832795 |
>
> and answer yes, I get
>
> -*- eval: (org-mode) -*-
> #+STARTUP: align
> | <l8>| <l8>     |
> | 3.14     |
> | 3.1415=> |
>
> but would expect
>
> -*- eval: (org-mode) -*-
> #+STARTUP: align
> | <l8>     |
> | 3.14     |
> | 3.1415=> |
>
> Second, when I delete the last line and save the file, the file content
> will be
>
> -*- eval: (org-mode) -*-
> #+STARTUP: align
> | <l8>| <l8>     |
> | 3.14     |
>
> as I can see e. g. with emacs itself when I close the file and open it
> again declining org-mode with answering no. But the file content should
> be
>
> -*- eval: (org-mode) -*-
> #+STARTUP: align
> | <l8>     |
> | 3.14     |
>
> Can someone please confirm with a more stable and recent emacs version?
Carsten Dominik 15 år sedan
förälder
incheckning
d892aa9642
1 ändrade filer med 1 tillägg och 0 borttagningar
  1. 1 0
      lisp/org-table.el

+ 1 - 0
lisp/org-table.el

@@ -614,6 +614,7 @@ When nil, simply write \"#ERROR\" in corrupted fields.")
 		      (re-search-forward "<[rl]?[0-9]+>" end t)))
     (goto-char beg)
     (setq falign (re-search-forward "<[rl][0-9]*>" end t))
+    (goto-char beg)
     ;; Get the rows
     (setq lines (org-split-string
 		 (buffer-substring beg end) "\n"))