emacs-wiki-discuss
[Top][All Lists]
Advanced

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

Re: [emacs-wiki-discuss] Re: error on publish


From: Mark Triggs
Subject: Re: [emacs-wiki-discuss] Re: error on publish
Date: Tue, 13 Sep 2005 21:13:42 +1000
User-agent: No Gnus v0.4

Hi Sebastian,

Sebastian Luque <address@hidden> writes:

> Sebastian Luque <address@hidden> wrote:
>
> [...]
>
>> Can this be related to table.el code?
>
> I can confirm now that the problem occurs only when the page contains
> tables created using table.el, but I still can't pinpoint the source of
> the issue.

I could reproduce the problem by not leaving any space after the
table--it looks like `emacs-wiki-table-markup-fancy-table' expects you
to leave at least one blank line.

I've attached a patch that fixes the problem for me.  Does it work for
you too?

Cheers,

Mark

-- 
Mark Triggs
<address@hidden>

--- orig/emacs-wiki-table.el
+++ mod/emacs-wiki-table.el
@@ -61,6 +61,7 @@
   "Mark up tables using the `table' package."
   (let ((leader (match-string 1))
         (begin (copy-marker (match-beginning 0)))
+        (first-cell (match-end 0))
         table end)
     (goto-char (match-end 0))
     (setq table
@@ -79,8 +80,12 @@
                          (if (> (length leader) 0)
                              "<blockquote>\n"
                            ""))))
-    (delete-region begin (re-search-forward "-+\\+\\s-*[\r\n]+\\s-*$"
-                                            nil t))
+    (delete-region (save-excursion
+                     (goto-char first-cell)
+                     (table-goto-top-left-corner))
+                   (save-excursion
+                     (goto-char first-cell)
+                     (1+ (table-goto-bottom-right-corner))))
     (insert table)
     (setq end (point-marker))
     (goto-char begin)

reply via email to

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