[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ELPA/elpa-admin] Render README.org as HTML with ox-html

From: Adam Porter
Subject: Re: [ELPA/elpa-admin] Render README.org as HTML with ox-html
Date: Mon, 20 Sep 2021 18:26:27 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> Here `mailcap-extension-to-mime` could fail if `mailcap` is not yet
> loaded.  Also, the problem you describe seems to depend on
> /etc/mime.types rather than the version of Emacs.  Here (a Debian
> machine) I got another problem which is that my /etc/mime.types says:
>     [...]
>     application/vnd.lotus-organizer                 or3 or2 org
>     [...]
> so I got an error from elpaa--section-to-* complaining that it doesn't
> know how to convert `application/vnd.lotus-organizer` :-(
> I think we're going to have to use our own mapping from extensions to
> types :-(

Ah, that makes sense, yes.  (I might have added that Org entry to my
local mime.types and forgotten about it.)

> After fixing this problem, I got another one which was in the part that
> generates the "news" because it calls `elpaa--get-section` but was not
> updated to adjust to the new return value.
> I fixed these and made a few other cosmetic changes.
> You can see the result in the `scratch/prettify-readme.org` branch of
> elpa.git

Thanks, that looks good.

> One thing I noticed in the resulting <pkg>.html file is that the doc is
> not clearly delimited any more (e.g. it tends to use <h2> headers for
> its own top-level entities whereas the surrounding HTML uses <h2> as
> the header that introduces the doc).
> :-(

I think that should be fixed by using the appropriate export option,
like this:

  (cl-defmethod elpaa--section-to-html ((section (head text/x-org)))
    (elpaa--export-org (cdr section) 'html
                       :body-only t
                       :ext-plist (append '(:html-toplevel-hlevel 3)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]