From: "Jakub Ječmínek" <jecminek.k@gmail.com>
To: 64205@debbugs.gnu.org
Subject: bug#64205: Fix missing border cell when using orgtbl-to-table.el function
Date: Tue, 20 Jun 2023 23:57:35 +0200 [thread overview]
Message-ID: <CAFBiodLywYt7h+rdpVZT00eN80sPftcVEzOfjopX+v_-YUUjYQ@mail.gmail.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 980 bytes --]
Hello,
I would like to take this opportunity to express my deep appreciation for
the valuable work the Emacs community has contributed to the development
and maintenance of this remarkable editor.
I've found a bug in the `orgtbl-to-table.el' function. When using
`orgtbl-to-table.el' during `org-table-export', last border cell ("|") was
omitted in the output.
Steps to reproduce:
(require 'org-table)
(insert "\n" (orgtbl-to-table.el '(("first colum" "second column") hline
("12" "34")) nil))
Previous implementation output:
| first colum | second column |
+--------------+---------------------+
| 12 | 34 < missing border cell
Current output:
| first colum | second column |
+--------------+---------------------+
| 12 | 34 |
In attachment, you'll find the smallest patch you've ever seen.
Thank you for everything you do for my beloved Emacs.
Best, Jakub Ječmínek
[-- Attachment #1.2: Type: text/html, Size: 1401 bytes --]
[-- Attachment #2: 0001-Fix-orgtbl-to-table.el-function-to-include-last-cell.patch --]
[-- Type: application/octet-stream, Size: 987 bytes --]
From 688bd0104f1e63df8f757de825481a69c4620f81 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jakub=20Je=C4=8Dm=C3=ADnek?= <jecminek.k@gmail.com>
Date: Tue, 20 Jun 2023 23:30:49 +0200
Subject: [PATCH] Fix orgtbl-to-table.el function to include last cell border
Previously used buffer-size function is (1- (point-max)) which means
that last cell border was omitted.
---
lisp/org/org-table.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisp/org/org-table.el b/lisp/org/org-table.el
index 42f234790c5..9d3507e34b7 100644
--- a/lisp/org/org-table.el
+++ b/lisp/org/org-table.el
@@ -6134,7 +6134,7 @@ supported."
(org-table-align)
(replace-regexp-in-string
"-|" "-+"
- (replace-regexp-in-string "|-" "+-" (buffer-substring 1 (buffer-size))))))
+ (replace-regexp-in-string "|-" "+-" (buffer-substring 1 (point-max))))))
(defun orgtbl-to-unicode (table params)
"Convert the `orgtbl-mode' TABLE into a table with unicode characters.
--
2.39.1
next reply other threads:[~2023-06-20 21:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-20 21:57 Jakub Ječmínek [this message]
2023-06-21 12:45 ` bug#64205: Fix missing border cell when using orgtbl-to-table.el function Robert Pluim
2023-06-21 14:08 ` bug#64205: Fix missing cell border " Jakub Ječmínek
2023-06-21 15:24 ` Robert Pluim
2023-06-21 15:42 ` Jakub Ječmínek
[not found] ` <CAFBiodLYe+98=dYnvYCqxW0yY1feR8t_OKEH9VLUYXvLRXpEAA@mail.gmail.com>
2023-06-22 14:38 ` Robert Pluim
2023-06-22 15:15 ` Eli Zaretskii
2023-06-22 15:43 ` Robert Pluim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAFBiodLywYt7h+rdpVZT00eN80sPftcVEzOfjopX+v_-YUUjYQ@mail.gmail.com \
--to=jecminek.k@gmail.com \
--cc=64205@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.