From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Adam Porter Newsgroups: gmane.emacs.devel Subject: Re: [ELPA/elpa-admin] Render README.org as HTML with ox-html Date: Mon, 20 Sep 2021 18:26:27 -0500 Message-ID: <87lf3q7rrw.fsf@alphapapa.net> References: <87h7f7zww5.fsf@alphapapa.net> <87zgszy91h.fsf_-_@alphapapa.net> <87a6ku2z8x.fsf@alphapapa.net> <87ilzc65rc.fsf@alphapapa.net> <87o88yuern.fsf@alphapapa.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29932"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Sep 21 01:28:32 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mSSi8-0007cG-5T for ged-emacs-devel@m.gmane-mx.org; Tue, 21 Sep 2021 01:28:32 +0200 Original-Received: from localhost ([::1]:37006 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mSSi6-0006Dv-Hi for ged-emacs-devel@m.gmane-mx.org; Mon, 20 Sep 2021 19:28:30 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51186) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mSSgI-0003yN-JW for emacs-devel@gnu.org; Mon, 20 Sep 2021 19:26:38 -0400 Original-Received: from ciao.gmane.io ([116.202.254.214]:45202) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mSSgH-0003oo-2w for emacs-devel@gnu.org; Mon, 20 Sep 2021 19:26:38 -0400 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1mSSgE-0005JB-RS for emacs-devel@gnu.org; Tue, 21 Sep 2021 01:26:34 +0200 X-Injected-Via-Gmane: http://gmane.org/ Received-SPF: pass client-ip=116.202.254.214; envelope-from=ged-emacs-devel@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.25, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:275174 Archived-At: Stefan Monnier 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 .html file is that the doc is > not clearly delimited any more (e.g. it tends to use

headers for > its own top-level entities whereas the surrounding HTML uses

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) elpaa--org-export-options)))