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: Fri, 22 Dec 2017 20:31:09 +0000 Message-ID: References: <87wp1hhx9b.fsf@nicolasgoaziou.fr> <87o9mthw6t.fsf@nicolasgoaziou.fr> <87y3lwjh45.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="089e082882800cc7480560f3b3d3" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52838) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eSTyV-0002U9-2S for emacs-orgmode@gnu.org; Fri, 22 Dec 2017 15:31:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eSTyT-0006cZ-Vg for emacs-orgmode@gnu.org; Fri, 22 Dec 2017 15:31:23 -0500 Received: from mail-yb0-x22f.google.com ([2607:f8b0:4002:c09::22f]:35068) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eSTyT-0006bh-Pa for emacs-orgmode@gnu.org; Fri, 22 Dec 2017 15:31:21 -0500 Received: by mail-yb0-x22f.google.com with SMTP id k2so18392266ybd.2 for ; Fri, 22 Dec 2017 12:31:21 -0800 (PST) In-Reply-To: <87y3lwjh45.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 --089e082882800cc7480560f3b3d3 Content-Type: text/plain; charset="UTF-8" On Thu, Dec 21, 2017 at 9:22 AM Nicolas Goaziou wrote: > (let ((no-thrill (lambda (o c _) (or c (org-element-property :value > o))))) > (org-export-create-backend > :parent 'ascii ;or `hugo', depending on what you mean > :transcoders (mapcar (lambda (type) (cons type no-thrill)) > '(bold code italic strike-through underline > verbatim)))) > > Five locs. Not bad either. > Thank you. That also looks a cleaner way to implement what I want. You're basically describing `ox-ascii' with stripped emphasis markers. > Exactly. That's why I suggested extending ox-ascii from this "raw" backend. At this point, I'm not convinced we need this in Org proper. > That's understood. No problem. The snippet you suggested above serves the purpose very well for now. Thanks! -- Kaushal Modi --089e082882800cc7480560f3b3d3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Thu, Dec 21= , 2017 at 9:22 AM Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
=C2=A0 =C2=A0 (let ((no-thrill (lambda (o c _) (or c (org-element-property = :value o)))))
=C2=A0 =C2=A0 =C2=A0 (org-export-create-backend
=C2=A0 =C2=A0 =C2=A0 =C2=A0:parent 'ascii=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0;or `hugo', depending on what you mean
=C2=A0 =C2=A0 =C2=A0 =C2=A0:transcoders (mapcar (lambda (type) (cons type n= o-thrill))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 '(bold code italic strike-through underline ve= rbatim))))

Five locs. Not bad either.

Thank you. T= hat also looks a cleaner way to implement what I want.

=
You're basically describing `ox-ascii' with stripped emphasis marke= rs.

Exactly. That's why I suggested= extending ox-ascii from this "raw" backend.

At this point, I'm not convinced we need this in Org proper.

That's understood. No problem. The snippet yo= u suggested above serves the purpose very well for now.

Thanks!
--

Kaus= hal Modi

--089e082882800cc7480560f3b3d3--