Consider an Org mode file with a table.el table (which I made by first constructing an Org mode table and then usind `C-c ~' to convert it): --8<---------------cut here---------------start------------->8--- * table.el table +----+----+----+ | a | b | c | +----+----+----+ | 1 | 2 | 3 | +----+----+----+ | 4 | 5 | 6 | +----+----+----+ | 7 | 8 | 9 | +----+----+----+ | 10 | 11 | 12 | +----+----+----+ --8<---------------cut here---------------end--------------->8--- Trying to export to LaTeX produces pretty mangled output. It turns out that when in `org-latex-table', (org-element-property :type table) returns `org', so it thinks it's an Org mode table and calls `org-latex--org-table' to process it, producing output like this: --8<---------------cut here---------------start------------->8--- \sout{----}----\sout{----} \begin{center} \begin{tabular}{lll} a & b & c\\ \end{tabular} \end{center} \sout{----}----\sout{----} \begin{center} \begin{tabular}{rrr} 1 & 2 & 3\\ \end{tabular} \end{center} \sout{----}----\sout{----} ... \begin{center} \begin{tabular}{rrr} 10 & 11 & 12\\ \end{tabular} \end{center} \sout{----}----\sout{----} --8<---------------cut here---------------end--------------->8--- Evaluating `(org-element-at-point)' returns `(paragraph ...)' all along the top line and `(table (.... :type org ....))' when the cursor is at the beginning of the `a b c' line. Emacs : GNU Emacs 28.0.50 (build 3, x86_64-pc-linux-gnu, GTK+ Version 3.24.13, cairo version 1.16.0) of 2020-10-30 Package: Org mode version 9.4 (release_9.4-53-g23f941 @ /home/nick/elisp/org-mode/lisp/) -- Nick
Hi Nick,
Nick Dokos <ndokos@gmail.com> writes:
> Consider an Org mode file with a table.el table (which I made by
> first constructing an Org mode table and then usind `C-c ~' to
> convert it):
Would it be so bad if org-mode decides to stop supporting table.el tables?
I don't see the benefit of supporting both Org tables and tables.el tables,
and it calls for confusion.
What do you and everyone else think?
--
Bastien
* Bastien <bzg@gnu.org> [2020-12-20 20:16]:
> Hi Nick,
>
> Nick Dokos <ndokos@gmail.com> writes:
>
> > Consider an Org mode file with a table.el table (which I made by
> > first constructing an Org mode table and then usind `C-c ~' to
> > convert it):
>
> Would it be so bad if org-mode decides to stop supporting table.el tables?
>
> I don't see the benefit of supporting both Org tables and tables.el tables,
> and it calls for confusion.
>
> What do you and everyone else think?
Clarify confusions in the manual and don't break habits and
established features of Org.
Hi Jean,
Jean Louis <bugs@gnu.support> writes:
> Clarify confusions in the manual and don't break habits and
> established features of Org.
This is not really helpful because it is too general.
Can you make specific suggestions or provide patches for what
needs to be addressed?
Also, your message sounded harsh. If it is intentional, it is
harmful. If it isn't, please make an effort of sending nicer
messages.
Thanks,
--
Bastien
Hi Bastien, Bastien <bzg@gnu.org> writes: > Would it be so bad if org-mode decides to stop supporting table.el tables? > I don't use table.el tables so it's easy for me to say "Get rid of them" - but there may be objections :-) > I don't see the benefit of supporting both Org tables and tables.el tables, > and it calls for confusion. > > What do you and everyone else think? They do exist in a sort of twilight zone: not many people use them AFAICT, but there is ostensible support and the manual says "Org mode recognizes such tables and exports them properly", but the bug I sent shows that that's not correct. So: fix this bug now that it's been pointed out? Close it as "Will not fix" with some guidance on what the user is supposed to do ("don't use table.el tables" is probably the best advice)? Or decide to jettison table.el support altogether? The first and the last involve real work, the middle one not, but it's not particularly tasty. Somebody else will have to make the decision: I'm fine with either of the exreme ways, not so much with the middle option, but since I'm not going to do the work, I am in no position to insist. BTW, I ran into this while looking into this Emacs SE question: https://emacs.stackexchange.com/questions/62335/org-mode-export-table-to-latex-with-word-wrap -- Nick "There are only two hard problems in computer science: cache invalidation, naming things, and off-by-one errors." -Martin Fowler
A few years ago I was trying to format tables in a certain specific way and it was essentially impossible with org tables for reasons that now escape me. However, it was possible to accomplish it using tabels.el tables. I don't think I ended up actually using the tables.el solution, but at the time it would have been the only option. If memory serves I think it had to do with multiline cells or something of that nature. While it would be nice to be able to converge on a single implementation for tables, I suspect that there are still users of tabels.el that would be left out in the cold if that functionality was removed. It would be great if we could find some examples of org files or users that use the tabels.el functionality so we can understand what org tables are missing. Best, Tom
Hello, Nick Dokos <ndokos@gmail.com> writes: > Consider an Org mode file with a table.el table (which I made by > first constructing an Org mode table and then usind `C-c ~' to convert it): > > --8<---------------cut here---------------start------------->8--- > * table.el table > > > +----+----+----+ > | a | b | c | > +----+----+----+ > | 1 | 2 | 3 | > +----+----+----+ > | 4 | 5 | 6 | > +----+----+----+ > | 7 | 8 | 9 | > +----+----+----+ > | 10 | 11 | 12 | > +----+----+----+ > --8<---------------cut here---------------end--------------->8--- [...] > Evaluating `(org-element-at-point)' returns `(paragraph ...)' all along > the top line and `(table (.... :type org ....))' when the cursor is at > the beginning of the `a b c' line. Fixed. Thank you. Regards, -- Nicolas Goaziou
Bastien <bzg@gnu.org> writes: > Hi Nick, > > Nick Dokos <ndokos@gmail.com> writes: > >> Consider an Org mode file with a table.el table (which I made by >> first constructing an Org mode table and then usind `C-c ~' to >> convert it): > > Would it be so bad if org-mode decides to stop supporting table.el tables? > > I don't see the benefit of supporting both Org tables and tables.el tables, > and it calls for confusion. > > What do you and everyone else think? I don't use table.el tables. The only reason I submitted the bug report was because I was trying to investigate this Emacs SE question: https://emacs.stackexchange.com/questions/62335/org-mode-export-table-to-latex-with-word-wrap In the process, I discovered that the LaTeX file was broken and traced it back to org-element. Note that the manual says: "Org mode recognizes such tables and exports them properly." See (info "(org) Cooperation") So there are three roads ahead as I see it: - Fix the bug in org-element and make sure that table.el tables are exported properly. - Do not fix the bug. Instead, tear out table.el support from Org mode code and fix the manual to say so. - Do not fix the bug (and do nothing else). I presume the third choice is distasteful to everybody, but that's going to be the default choice unless somebody volunteers to do either of the other two. Either of the first two choices requires work. From my POV, it does not matter which of the two is done: if somebody volunteers to do either, I am not going to object (and I suspect, almost nobody else will either: if the second course is chosen, there may be some table.el users who would object to losing it, but if so, they should volunteer to fix the bug). My 0.02 kopek. -- Nick "There are only two hard problems in computer science: cache invalidation, naming things, and off-by-one errors." -Martin Fowler
Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
> Hello,
>
> Nick Dokos <ndokos@gmail.com> writes:
>
> [...]
>
>> Evaluating `(org-element-at-point)' returns `(paragraph ...)' all along
>> the top line and `(table (.... :type org ....))' when the cursor is at
>> the beginning of the `a b c' line.
>
> Fixed. Thank you.
>
Thank you!
--
Nick
"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler