From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id YHXPABeYgWCrIgEAgWs5BA (envelope-from ) for ; Thu, 22 Apr 2021 17:36:55 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id qMcWOBaYgWBMLwAAB5/wlQ (envelope-from ) for ; Thu, 22 Apr 2021 15:36:54 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 3FCFB1B6E5 for ; Thu, 22 Apr 2021 17:36:54 +0200 (CEST) Received: from localhost ([::1]:33854 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lZbNs-0000lq-Bi for larch@yhetil.org; Thu, 22 Apr 2021 11:36:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41810) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lZbNJ-0000lg-1H for emacs-orgmode@gnu.org; Thu, 22 Apr 2021 11:36:17 -0400 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:45499) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lZbNC-0004CR-TG for emacs-orgmode@gnu.org; Thu, 22 Apr 2021 11:36:16 -0400 X-Originating-IP: 185.131.40.67 Received: from localhost (40-67.ipv4.commingeshautdebit.fr [185.131.40.67]) (Authenticated sender: admin@nicolasgoaziou.fr) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 0D7DE1C0005; Thu, 22 Apr 2021 15:36:04 +0000 (UTC) From: Nicolas Goaziou To: Tim Visher Subject: Re: ox-html Incorrectly (?) Puts HTML Into the `` Tag References: <87fszly7zg.fsf@kyleam.com> <871rb5ft6a.fsf@wi.uni-muenster.de> <CAHa53uwvCriWumjRmr2SWcteWSTgUyQrwXL_ehfTqMYTf7CJmQ@mail.gmail.com> <87y2dcmcuk.fsf@wi.uni-muenster.de> <87pmyo16qr.fsf@web.de> <CAHa53uwwVYa9ndRBY2o3c+0THFi-e9OMFX0R4xw98arvKidDDg@mail.gmail.com> <87h7jy4ebe.fsf@nicolasgoaziou.fr> <CAHa53uxERrGDk=emzqAfQG5JmMsessQfMgoOtFUQTccAi4aYxQ@mail.gmail.com> Mail-Followup-To: Tim Visher <tim.visher@gmail.com>, Jens Lechtenboerger <lechten@wi.uni-muenster.de>, "Dr. Arne Babenhauserheide" <arne_bab@web.de>, Emacs Org Mode mailing list <emacs-orgmode@gnu.org>, Kyle Meyer <kyle@kyleam.com> Date: Thu, 22 Apr 2021 17:36:04 +0200 In-Reply-To: <CAHa53uxERrGDk=emzqAfQG5JmMsessQfMgoOtFUQTccAi4aYxQ@mail.gmail.com> (Tim Visher's message of "Thu, 22 Apr 2021 10:08:55 -0400") Message-ID: <87bla649i3.fsf@nicolasgoaziou.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=217.70.183.197; envelope-from=mail@nicolasgoaziou.fr; helo=relay5-d.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." <emacs-orgmode.gnu.org> List-Unsubscribe: <https://lists.gnu.org/mailman/options/emacs-orgmode>, <mailto:emacs-orgmode-request@gnu.org?subject=unsubscribe> List-Archive: <https://lists.gnu.org/archive/html/emacs-orgmode> List-Post: <mailto:emacs-orgmode@gnu.org> List-Help: <mailto:emacs-orgmode-request@gnu.org?subject=help> List-Subscribe: <https://lists.gnu.org/mailman/listinfo/emacs-orgmode>, <mailto:emacs-orgmode-request@gnu.org?subject=subscribe> Cc: Jens Lechtenboerger <lechten@wi.uni-muenster.de>, "Dr. Arne Babenhauserheide" <arne_bab@web.de>, Emacs Org Mode mailing list <emacs-orgmode@gnu.org>, Kyle Meyer <kyle@kyleam.com> Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" <emacs-orgmode-bounces+larch=yhetil.org@gnu.org> X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1619105814; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=iqgVNeQTHG2cdg1aXAGEdu87PQEeJzBpCqp03Yj7eTE=; b=oQBwRA1K3bqEZmxRkq5qSZPP/hiE2TBdC6ns8XIMiJWY3l8i1FTJ8GBElkU1Um+bUXR4iT XhkrN9PC3SU7uHursT36McY2sWRwvgT8iLbcNhh/j5GaW9GXjundBNAJGpAaTL1a8w4ISn 38cgzQ31dEzeXkM4zVaMWOampHdVIaMRTPd3gPubrvD5RKAew3LnqNLye4GGmg9L9xLMVI UoiJ6+9gyF4BKn7jvXxYBgiXtOunBn8qVLmULpu/ibminSHdp3MYHnJaSLexiRw5/Ng30w mNljpnWptFR7K9wyJMDJxYcAMAOJlaNKAYYv8ZpPEE/Q1xhx2Ta/G0JcEmnhqw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1619105814; a=rsa-sha256; cv=none; b=fCpj3iLYEfK97xNz87CuWdnMpu7nOfGY9Gxso0fEvfIGyKoSFafdapoBfYI62A2ciWJYOs XtCOra2FvLPfIO/aDnJEpxnZoL+3V3inGTSERbNMEOLdsZAkushFSC8E0b2Xk/hSw/JnKo xQJina0Vfrpxv9X+3BxIiTA898tDm6IaHet4CnSMnUoCLCIXs9prObnSVvkrtsLHIkiO8F ObrO2H/a5FCNRYDarWGCXb8J9bNIEtKsrHDmmRf2CkgkQGUTzFUbiNp8EtxyfpCQFKHhUs /8E9DQTSeLrL8uY7Jq11TcM1InroLOh9iK6LG6MFix5d8BASBHzA+psirTHr2Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -1.57 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 3FCFB1B6E5 X-Spam-Score: -1.57 X-Migadu-Scanner: scn0.migadu.com X-TUID: UpYQ8ESqmruW Tim Visher <tim.visher@gmail.com> writes: > Thanks for the tip. What I'm thinking more is somehow getting the heading > pre-output generation, stripping any characters that `org` would consider > special (I'm hoping there's already a function that can at least mark > 'markup' text in a given org string), and _then_ passing it to whatever ox > function is responsible for using the title. That way it's as generic as it > can possibly be. What format has "heading pre-output generation"? Is a string or is it parsed data? The first part of your paragraph sounds like you want to rewrite an Org parser. How do you pass it to ox function responsible for using the title? I.e., who/what is responsible for making the change to the title? Is it the user? You may need to clarify your specifications. > I confess though that I don't follow exactly what you're talking about > defining a temporary export back-end. In `org-html--build-meta-info' from "ox-html.el", replace the following (org-html-plain-text (org-element-interpret-data (plist-get info :title)) info) with (org-export-data-with-backend (plist-get info :title) (org-export-create-backend :transcoders '((bold . (lambda (_ c _) c)) (italic . (lambda (_ c _) c)))) info) Now re-evaluate the function `org-html--build-meta-info' and try exporting a document to HTML with a title containing bold and italic syntax, even nested, e.g. #+title: /Some *bold* text/ > Why would that be necessary or beneficial to the end of teaching org > how to use only the 'plain text' of a heading for the title in N ox > backends? Adding the function `org-export-strip-syntax below to "ox.el" (defun org-export-strip-syntax (data info) (org-export-data-with-backend data (org-export-create-backend :transcoders '((bold . (lambda (_ c _) c)) (italic . (lambda (_ c _) c)))) info)) you can now call it from any export back-end whenever its needs to remove syntax from a piece of code. You can also drop the info argument and add it to "org-element.el". But it depends on what you want to obtain. Also, some syntax is not obvious to strip, as I suggested in my previous message. Regards,