all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Pranshu <pranshusharma366@gmail.com>
To: Lockywolf Laptop <lockywolf@gmail.com>
Cc: Eli Zaretskii <eliz@gnu.org>, 71364@debbugs.gnu.org, rrt@sc3d.org
Subject: bug#71364: Fix Table.el export
Date: Tue, 09 Jul 2024 17:05:08 +1000	[thread overview]
Message-ID: <87ttgznizf.fsf@gmail.com> (raw)
In-Reply-To: <87plrqy39e.fsf@laptop.lockywolf.net> (Lockywolf Laptop's message of "Sat, 06 Jul 2024 22:00:45 +0800")


Hello Vladimir

Lockywolf Laptop <lockywolf@gmail.com> writes:

>>should or should not expect LaTeX markup
>
> How much of LaTeX markup?
> What if you add some mysterious \makeatletter there?
>

My idea was that the default should still be that all latex specific
charecters are escaped by default, and the variable is customized by
those who know what the specific function or markup does.

>
> If I may, I would ask Mr Pranshu to spend a bit more work on this patch,
> and do some straightforward, albeit a little tedious work to make this
> patch more pleasant. May I?
>

Yeah sure, but not rn.  I am kind of busy for 2 weeks, then I will be
able to do it.

> 1. Add a check to table--generate-source-scan-lines, which would
> actually check that the variable _language equals to latex, and bail out
> if it is not. Silently doing export to latex if html output is requested
> is even worse than politely refusing.

Is that really neccasary, because all that the function does it latex
specific. Why not just rename the function to something latex specific,
eg table--generate-source-scan-lines-latex.

> 2. Implement a defcustom table-el-cell-export-function-latex, which would be
> called on each cell.
> 3. Implement a default value for this function, which should basically
> amount to factoring out the code already in
> table--generate-source-scan-lines. This way nothing will break.
> This function maybe called table-el-cell-export-latex-default
> 3. Implement a copy of this function, with support for additional
> escaping tricks needed by Mr Pranshu. It can be called
> table-el-cell-export-latex. I do not think that a special defcustom
> for the regexp is needed, because such export functions can be expected
> to be written by people who need them necessarily in an ad-hoc way, and
> customisations might not be well described by just a regexp.
>
> It is a bit of work, but at least it will add some necessary extension
> points. And org-mode, when exporting to table.el used in org files,
> could override that cell export function to its own benefit.
>
> (By the way, I haven't checked, but probably org-mode already has some
> additional support for exporting table.el? I remember successfully
> exporting org-files with table.el tables into html, which is seemingly
> not supported in table.el itself.)

I haven't really played with the html org export, but as of now table.el
does have an html export.  All org mode does is calles the appropiate
export, so it does no sort checking text inside the table.  For example
you cannot do org itallics, citing, and any of that stuff inside the table.

To change this I think table.el would need a major rewrite that allows
for something like your idea of having a function called to all of the
text inside the table.

Instead of just improving the latex export and leaving the others in the
dust, how about we do what you suggested, but instead of having seperate
functions for each export, we make the exports a list.

All of the table exports basiclly do the same thing:
- Add some header text
- Replace column and row delimeters
- add end text
- optional: escape text



Honestly I think table.el is due for a rewrite, if you have used it
before yk what I mean, on average it's about half a second latency to
type one charecter.  Personally I think that instead of having a
table.el version of every basic command, eg self insert, kill line, it
would be better to add a post command hook and do damage control
depending on the last command.

Kind Regards,
Pranshu





      parent reply	other threads:[~2024-07-09  7:05 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-04 11:22 bug#71364: Fix Table.el export Pranshu
2024-06-06 11:35 ` Eli Zaretskii
2024-06-07  7:00   ` Pranshu
2024-06-07 10:54     ` Eli Zaretskii
2024-06-08  2:10       ` Pranshu
2024-06-08  6:38         ` Eli Zaretskii
2024-06-08  8:15           ` Pranshu
2024-06-08 10:05           ` Reuben Thomas via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-08 10:51             ` Eli Zaretskii
2024-06-08 10:59               ` Reuben Thomas via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-08 11:18                 ` Eli Zaretskii
2024-06-08 11:27                   ` Reuben Thomas via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-09  4:33                   ` Pranshu
2024-06-09  8:15                     ` Eli Zaretskii
2024-06-09  8:33                       ` Pranshu
2024-06-21  8:25                       ` Pranshu
2024-06-22  9:39                         ` Eli Zaretskii
2024-07-06  7:39                           ` Eli Zaretskii
2024-07-06 14:00                             ` Lockywolf Laptop
2024-07-06 22:25                               ` Jeremy Bryant via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-09  7:05                               ` Pranshu [this message]

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=87ttgznizf.fsf@gmail.com \
    --to=pranshusharma366@gmail.com \
    --cc=71364@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=lockywolf@gmail.com \
    --cc=rrt@sc3d.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.