From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jonas Bernoulli Subject: Re: Something like #+BIND but for the destination buffer Date: Sat, 14 Jan 2017 22:48:39 +0100 Message-ID: References: <874m1krwk5.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a1147c5ae0b1b51054614ebc4 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39746) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cSWC5-0007O5-Um for emacs-orgmode@gnu.org; Sat, 14 Jan 2017 16:49:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cSWC5-0004zn-3c for emacs-orgmode@gnu.org; Sat, 14 Jan 2017 16:49:02 -0500 Received: from mail-it0-x22b.google.com ([2607:f8b0:4001:c0b::22b]:37704) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cSWC4-0004zZ-VH for emacs-orgmode@gnu.org; Sat, 14 Jan 2017 16:49:01 -0500 Received: by mail-it0-x22b.google.com with SMTP id r185so61473849ita.0 for ; Sat, 14 Jan 2017 13:49:00 -0800 (PST) In-Reply-To: <874m1krwk5.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-orgmode@gnu.org --001a1147c5ae0b1b51054614ebc4 Content-Type: text/plain; charset=UTF-8 On Sat, Dec 31, 2016 at 3:40 PM, Nicolas Goaziou wrote: Besides, using `org-export-filter-final-output-functions' seems easier > than your set up. > This approach works too. The following code produces exactly the same result as what I posted earlier: (defun ox-texinfo+--untabify (string back-end _) (if (eq back-end 'texinfo) (replace-regexp-in-string "^\t+" (lambda (match) (make-string (* (length match) 8) ?\s)) string) string)) (add-to-list 'org-export-filter-final-output-functions 'ox-texinfo+--untabify) --001a1147c5ae0b1b51054614ebc4 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

= On Sat, Dec 31, 2016 at 3:40 PM, Nicolas Goaziou <mail@nicolasgoaziou= .fr> wrote:

Besides, using `org-export-filter-final-output-functions' seems ea= sier
than your set up.

This approach works t= oo. The following code produces exactly the same result as what I posted ea= rlier:

(defun ox-texinfo+--untabify (string back-e= nd _)
=C2=A0 (if (eq back-end 'texinfo)
=C2=A0 =C2= =A0 =C2=A0 (replace-regexp-in-string
=C2=A0 =C2=A0 =C2=A0 =C2=A0&= quot;^\t+"
=C2=A0 =C2=A0 =C2=A0 =C2=A0(lambda (match)
<= div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(make-string (* (length match) 8) ?\s= ))
=C2=A0 =C2=A0 =C2=A0 =C2=A0string)
=C2=A0 =C2=A0 str= ing))

(add-to-list 'org-export-filter-final-ou= tput-functions
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0&#= 39;ox-texinfo+--untabify)=C2=A0
--001a1147c5ae0b1b51054614ebc4--