* Bug: org-table-clean-line may not return only | and space [9.4.4 (release_9.4.4 @ /home/tbb/code/emacs/emacs/lisp/org/)] [9.4.4 (release_9.4.4 @ /home/tbb/code/emacs/emacs/lisp/org/)] @ 2021-05-23 15:21 Mauro Aranda 2021-05-30 6:07 ` Ihor Radchenko 0 siblings, 1 reply; 4+ messages in thread From: Mauro Aranda @ 2021-05-23 15:21 UTC (permalink / raw) To: emacs-orgmode Starting from emacs -Q: 1. C-x C-f test.org 2. Write something like the following: Here is a table: |Data1|Data2 3. Make sure to leave the last column without the "|" 4. C-o, with point at the table row. 5. I expected to get a clean row: Here is a table: | | | | Data1 | Data2 | but I got: Here is a table: | | Data2 | | Data1 | Data2 | I realize this might be a corner-case, but I'm used to leave the last column without "|", because TAB is smart enough to add it for me. So the "Data2" repetition becomes a little annoying. If I put point at the row | Data1 | Data2 the following: (org-table-clean-line (buffer-substring (line-beginning-position) (line-end-position))) evaluates to a string that has characters other than "|" and space, but org-table-clean-line says it returns a string with only "|" and space. I've tweaked the relevant regexp in org-table-clean-line to "|\\([ \t]*?[^ \t\r\n|][^\r\n|]*\\)|?" and that fixes it for me. Best regards, Mauro. Emacs : GNU Emacs 28.0.50 (build 5, i686-pc-linux-gnu, GTK+ Version 2.24.33, cairo version 1.16.0) of 2021-05-19 Package: Org mode version 9.4.4 (release_9.4.4 @ /home/tbb/code/emacs/emacs/lisp/org/) ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Bug: org-table-clean-line may not return only | and space [9.4.4 (release_9.4.4 @ /home/tbb/code/emacs/emacs/lisp/org/)] [9.4.4 (release_9.4.4 @ /home/tbb/code/emacs/emacs/lisp/org/)] 2021-05-23 15:21 Bug: org-table-clean-line may not return only | and space [9.4.4 (release_9.4.4 @ /home/tbb/code/emacs/emacs/lisp/org/)] [9.4.4 (release_9.4.4 @ /home/tbb/code/emacs/emacs/lisp/org/)] Mauro Aranda @ 2021-05-30 6:07 ` Ihor Radchenko 2022-10-06 8:27 ` Ihor Radchenko 0 siblings, 1 reply; 4+ messages in thread From: Ihor Radchenko @ 2021-05-30 6:07 UTC (permalink / raw) To: Mauro Aranda; +Cc: emacs-orgmode Mauro Aranda <maurooaranda@gmail.com> writes: > 5. I expected to get a clean row: > Here is a table: > | | | > | Data1 | Data2 | > > but I got: > Here is a table: > | | Data2 | > | Data1 | Data2 | Confirmed ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Bug: org-table-clean-line may not return only | and space [9.4.4 (release_9.4.4 @ /home/tbb/code/emacs/emacs/lisp/org/)] [9.4.4 (release_9.4.4 @ /home/tbb/code/emacs/emacs/lisp/org/)] 2021-05-30 6:07 ` Ihor Radchenko @ 2022-10-06 8:27 ` Ihor Radchenko 2022-10-06 10:53 ` Mauro Aranda 0 siblings, 1 reply; 4+ messages in thread From: Ihor Radchenko @ 2022-10-06 8:27 UTC (permalink / raw) To: Mauro Aranda; +Cc: emacs-orgmode Ihor Radchenko <yantar92@gmail.com> writes: > Mauro Aranda <maurooaranda@gmail.com> writes: > >> 5. I expected to get a clean row: >> Here is a table: >> | | | >> | Data1 | Data2 | >> >> but I got: >> Here is a table: >> | | Data2 | >> | Data1 | Data2 | > > Confirmed Fixed on main. https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=f0b7dfb3a018891b2955986b0bdb5bf6fd5beb57 -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92> ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Bug: org-table-clean-line may not return only | and space [9.4.4 (release_9.4.4 @ /home/tbb/code/emacs/emacs/lisp/org/)] [9.4.4 (release_9.4.4 @ /home/tbb/code/emacs/emacs/lisp/org/)] 2022-10-06 8:27 ` Ihor Radchenko @ 2022-10-06 10:53 ` Mauro Aranda 0 siblings, 0 replies; 4+ messages in thread From: Mauro Aranda @ 2022-10-06 10:53 UTC (permalink / raw) To: Ihor Radchenko; +Cc: emacs-orgmode Ihor Radchenko <yantar92@gmail.com> writes: > Ihor Radchenko <yantar92@gmail.com> writes: > >> Mauro Aranda <maurooaranda@gmail.com> writes: >> >>> 5. I expected to get a clean row: >>> Here is a table: >>> | | | >>> | Data1 | Data2 | >>> >>> but I got: >>> Here is a table: >>> | | Data2 | >>> | Data1 | Data2 | >> >> Confirmed > > Fixed on main. > https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=f0b7dfb3a018891b2955986b0bdb5bf6fd5beb57 Thanks! ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-10-06 10:59 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2021-05-23 15:21 Bug: org-table-clean-line may not return only | and space [9.4.4 (release_9.4.4 @ /home/tbb/code/emacs/emacs/lisp/org/)] [9.4.4 (release_9.4.4 @ /home/tbb/code/emacs/emacs/lisp/org/)] Mauro Aranda 2021-05-30 6:07 ` Ihor Radchenko 2022-10-06 8:27 ` Ihor Radchenko 2022-10-06 10:53 ` Mauro Aranda
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.