bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#64205: Fix missing cell border when using orgtbl-to-table.el functio


From: Jakub Ječmínek
Subject: bug#64205: Fix missing cell border when using orgtbl-to-table.el function
Date: Wed, 21 Jun 2023 17:42:22 +0200

You're right. There are more of these mistakes in the `org-table' file, for example on line 1061, 1126 and 4666.

Jakub

st 21. 6. 2023 v 17:24 odesílatel Robert Pluim <rpluim@gmail.com> napsal:
>>>>> On Wed, 21 Jun 2023 16:08:13 +0200, Jakub Ječmínek <jecminek.k@gmail.com> said:
    Jakub> diff --git a/lisp/org/org-table.el b/lisp/org/org-table.el
    Jakub> index 42f234790c5..6810fd8dc5a 100644
    Jakub> --- a/lisp/org/org-table.el
    Jakub> +++ b/lisp/org/org-table.el
    Jakub> @@ -6132,9 +6132,13 @@ supported."
    Jakub>    (with-temp-buffer
    Jakub>      (insert (orgtbl-to-orgtbl table params))
    Jakub>      (org-table-align)
    Jakub> -    (replace-regexp-in-string
    Jakub> -     "-|" "-+"
    Jakub> -     (replace-regexp-in-string "|-" "+-" (buffer-substring 1 (buffer-size))))))
    Jakub> +    (goto-char (point-min))
    Jakub> +    (while (re-search-forward "-|" nil t)
    Jakub> +      (replace-match "-+"))
    Jakub> +    (goto-char (point-min))
    Jakub> +    (while (re-search-forward "|-" nil t)
    Jakub> +      (replace-match "+-"))
    Jakub> +    (buffer-string)))

Youʼre replacing fixed strings, so you could use `search-forward'
instead of `re-search-forward'.

Robert
--

Attachment: 0001-Fix-orgtbl-to-table.el-function-to-include-last-cell.patch
Description: Binary data


reply via email to

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