[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#64205: Fix missing border cell when using orgtbl-to-table.el functio
From: |
Robert Pluim |
Subject: |
bug#64205: Fix missing border cell when using orgtbl-to-table.el function |
Date: |
Wed, 21 Jun 2023 14:45:59 +0200 |
>>>>> On Tue, 20 Jun 2023 23:57:35 +0200, Jakub Ječmínek <jecminek.k@gmail.com>
>>>>> said:
Jakub> Previously used buffer-size function is (1- (point-max)) which means
Jakub> that last cell border was omitted.
Jakub> ---
Jakub> lisp/org/org-table.el | 2 +-
Jakub> 1 file changed, 1 insertion(+), 1 deletion(-)
Jakub> diff --git a/lisp/org/org-table.el b/lisp/org/org-table.el
Jakub> index 42f234790c5..9d3507e34b7 100644
Jakub> --- a/lisp/org/org-table.el
Jakub> +++ b/lisp/org/org-table.el
Jakub> @@ -6134,7 +6134,7 @@ supported."
Jakub> (org-table-align)
Jakub> (replace-regexp-in-string
Jakub> "-|" "-+"
Jakub> - (replace-regexp-in-string "|-" "+-" (buffer-substring 1
(buffer-size))))))
Jakub> + (replace-regexp-in-string "|-" "+-" (buffer-substring 1
(point-max))))))
Thatʼs just (buffer-string).
For bonus points, rewrite it to do the replacement in the temp buffer,
and then return (buffer-string), itʼs likely to be much faster (and
will generate less garbage).
Robert
--