From: TEC <tecosaur@gmail.com>
To: Bastien <bzg@gnu.org>
Cc: Jens Lechtenboerger <lechten@wi.uni-muenster.de>,
org-mode-email <emacs-orgmode@gnu.org>
Subject: Re: [PATCH] Enhance org-html--build-meta-info
Date: Mon, 14 Dec 2020 14:34:28 +0800 [thread overview]
Message-ID: <871rfs6fl0.fsf@gmail.com> (raw)
In-Reply-To: <87im94ordh.fsf@gnu.org>
Bastien <bzg@gnu.org> writes:
> Let's wait for Jens feedback on this patch, since he took care of
> testing it so far.
Assuming Jens responds as he usually has (relatively promptly), this
sounds good to me :)
> In a nutshell, can you restate what problem is this patch fixing?
There are two things I intend to achieve with this patch:
1. DRY* out the existing code. The existing code is quite repetitive in
structure, and easily lends itself to being extracted to a function.
This is easier to read, and work with IMO.
2. Make use of the DRYer code in (1) to provide a make the meta building
function more versatile, and then add in the ability for user
customisation at low-cost (again, thanks to (1)).
*DRY is an acronym for "Don't Repeat Yourself", in case there's a french
equivalent you're more familiar with.
> Is a new option really necessary here?
Necessary? Not really, I mean the export /works/ without it. I'd argue
that it's desirable though, as it provides an easy way for a user (such
as myself) to add useful meta tags not included by default. For example
I currently make use of this to add information that parsed by a large
number of services/apps to create rich embeds for exported Org files I
link to (see
https://tecosaur.github.io/emacs-config/config.html#extra-header-content,code--2
).
Furthermore, I consider it to be very low cost, since it's basically
just taking advantage of the restructuring already performed for code
QOL reasons.
I expect most users not to have any reason to touch this, but for some
to find it handy.
> Are there backward compatibility considerations we should take care of?
None AFAIK. Barring this errors that Jens raised, and now have hopefully
been addressed, this should function /exactly/ as the current
implementation does, with a minor (beneficial) caveat, mentioned below.
Just with nicer-to-work-with code and a bit more versatility (IMO, of
course).
These are the two changes to be mentioned:
1. The (or {title} "Org Export") bit I added.
I believe the current behaviour when no #+title is given is to have a
blank one (""). I think "Org Export" is preferable, as it's more
informative than ... nothing.
2. Using org-html-encode-plain-text for formatting the content of the
meta tags. From Jens, I take it that the current org-export-data can
cause nested HTML tags, which are invalid in this context. Plain text
should be safer.
>> +(defun org-html--build-meta-entry (label identity &optional content-format &rest content-formatters)
>> + "Construct <meta> tag with LABEL=\"IDENTITY\" and content from CONTENT-FORMAT and CONTENT-FORMATTER."
>
> The first line of this defun is too long. You can try M-x checkdoc
> RET on your elisp files to catch those issues.
>
> Thanks,
I see, I'm guessing I'll just need to add a line break.
I hope that clarifies things!
Timothy
next prev parent reply other threads:[~2020-12-14 6:57 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-17 13:50 [PATCH] Enhance org-html--build-meta-info TEC
2020-09-17 14:21 ` TEC
2020-09-17 15:53 ` Jens Lechtenboerger
2020-09-17 16:14 ` TEC
2020-09-18 8:11 ` Jens Lechtenboerger
2020-09-25 17:48 ` TEC
2020-09-27 15:17 ` Jens Lechtenboerger
2020-09-27 17:39 ` TEC
2020-09-27 18:00 ` Jens Lechtenboerger
2020-09-27 18:35 ` TEC
2020-09-28 8:17 ` Jens Lechtenboerger
2020-12-13 16:12 ` TEC
2020-12-14 6:04 ` Bastien
2020-12-14 6:34 ` TEC [this message]
2020-12-14 7:20 ` Bastien
2020-12-14 7:27 ` TEC
2020-12-14 8:11 ` Bastien
2020-12-14 10:01 ` TEC
2020-12-14 9:49 ` Jens Lechtenboerger
2020-12-15 11:39 ` TEC
2020-12-16 4:13 ` Tom Gillespie
2020-12-16 5:04 ` Timothy E Chapman
2020-12-16 6:45 ` Tom Gillespie
2020-12-16 6:55 ` Jens Lechtenboerger
2020-12-16 7:22 ` TEC
2020-12-16 8:37 ` Jens Lechtenboerger
2020-12-20 5:08 ` TEC
2020-12-20 5:08 ` TEC
2020-12-20 17:59 ` Jens Lechtenboerger
2021-01-02 18:51 ` TEC
2021-01-03 13:26 ` Jens Lechtenboerger
2021-01-03 14:48 ` TEC
2021-01-03 15:41 ` Jens Lechtenboerger
2021-01-03 17:17 ` TEC
2021-01-04 7:11 ` Jens Lechtenboerger
2021-01-10 15:52 ` TEC
2021-01-10 17:02 ` Jens Lechtenboerger
2021-01-10 20:36 ` TEC
2021-01-14 10:36 ` TEC
2021-01-14 15:59 ` Jens Lechtenboerger
2021-01-14 16:02 ` Ready to merge! " TEC
2021-01-21 4:05 ` Kyle Meyer
2021-01-21 5:55 ` TEC
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
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871rfs6fl0.fsf@gmail.com \
--to=tecosaur@gmail.com \
--cc=bzg@gnu.org \
--cc=emacs-orgmode@gnu.org \
--cc=lechten@wi.uni-muenster.de \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).