From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kaushal Modi Subject: Re: Canonical way to strip off all markup from an element in Org exporter backend? Date: Wed, 20 Dec 2017 22:41:34 +0000 Message-ID: References: <87wp1hhx9b.fsf@nicolasgoaziou.fr> <87o9mthw6t.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="94eb2c129d1cbd0f140560cd4940" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54407) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eRn3b-0004oE-5w for emacs-orgmode@gnu.org; Wed, 20 Dec 2017 17:41:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eRn3a-0000tL-BX for emacs-orgmode@gnu.org; Wed, 20 Dec 2017 17:41:47 -0500 Received: from mail-yw0-x233.google.com ([2607:f8b0:4002:c05::233]:46472) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eRn3a-0000sk-5Q for emacs-orgmode@gnu.org; Wed, 20 Dec 2017 17:41:46 -0500 Received: by mail-yw0-x233.google.com with SMTP id l23so1278870ywb.13 for ; Wed, 20 Dec 2017 14:41:46 -0800 (PST) In-Reply-To: <87o9mthw6t.fsf@nicolasgoaziou.fr> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Nicolas Goaziou Cc: emacs-org list --94eb2c129d1cbd0f140560cd4940 Content-Type: text/plain; charset="UTF-8" On Wed, Dec 20, 2017 at 5:27 PM Nicolas Goaziou wrote: > You must be kidding. It must be around 8 locs. See for example > `org-export-toc-entry-backend'. > Thank you! That function is educational. I'll play more with that idea. It will be a lot more verbose than the 3 line solution I have right now.. but I am intrigued enough to still try that out to see how it turns out. I fail to see how it could be generally useful. > It can be used wherever just the element content is needed without formatting properties, like in my case where the element title is needed to be extracted without any formatting. > What are you doing with entities, footnotes, latex-snippets...? > I haven't yet invested any time into serious development of this "base class" backend. The idea of this exporter is to give formatting-free output (like when you select plain text option in an email client).. so at whim, entities will be translated to the correct unicode chars, footnotes behavior could be the same as ox-ascii, and latex-snippets can stay in the raw ascii form. If there is an interest to move this forward, I can come up with a "raw" backend spec, and we can discuss on the details. -- Kaushal Modi --94eb2c129d1cbd0f140560cd4940 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Wed, Dec 20= , 2017 at 5:27 PM Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
You must be kidding. It must be around 8 locs. See for example
`org-export-toc-entry-backend'.

Tha= nk you! That function is educational. I'll play more with that idea. It= will be a lot more verbose than the 3 line solution I have right now.. but= I am intrigued enough to still try that out to see how it turns out.

I fail to see how it could be generally useful.

It can be used wherever just the element content is needed without= formatting properties, like in my case where the element title is needed t= o be extracted without any formatting.
=C2=A0
What are you doing with entities, footnotes, latex-snippets...?

I haven't yet invested any time into serious d= evelopment of this "base class" backend. The idea of this exporte= r is to give formatting-free output (like when you select plain text option= in an email client).. so at whim, entities will be translated to the corre= ct unicode chars, footnotes behavior could be the same as ox-ascii, and lat= ex-snippets can stay in the raw ascii form.

If the= re is an interest to move this forward, I can come up with a "raw"= ; backend spec, and we can discuss on the details.
--

Kaushal Modi

--94eb2c129d1cbd0f140560cd4940--