From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kaushal Modi Subject: Re: #+BEGIN_LaTeX deprecated Date: Tue, 9 Feb 2016 19:07:03 -0500 Message-ID: References: <87wpqdn726.fsf@free.fr> <87bn7pcuu1.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c2f682b60b56052b5f36ef Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52839) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aTIJF-0001gU-68 for emacs-orgmode@gnu.org; Tue, 09 Feb 2016 19:07:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aTIJE-0001Zk-2F for emacs-orgmode@gnu.org; Tue, 09 Feb 2016 19:07:05 -0500 Received: from mail-ob0-x230.google.com ([2607:f8b0:4003:c01::230]:35032) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aTIJD-0001ZG-UO for emacs-orgmode@gnu.org; Tue, 09 Feb 2016 19:07:04 -0500 Received: by mail-ob0-x230.google.com with SMTP id xk3so5232585obc.2 for ; Tue, 09 Feb 2016 16:07:03 -0800 (PST) In-Reply-To: <87bn7pcuu1.fsf@gmail.com> 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Myles English Cc: emacs-org list , Julien Cubizolles --001a11c2f682b60b56052b5f36ef Content-Type: text/plain; charset=UTF-8 Check out this announcement email about the syntax change: https://lists.gnu.org/archive/html/emacs-orgmode/2015-12/msg00525.html It has a snippet to convert the old syntax files to new syntax. -- Kaushal Modi On Feb 9, 2016 6:45 PM, "Myles English" wrote: > Hello Julien, > > Julien Cubizolles writes: > > > The #+BEGIN_LaTeX... #+END_LaTeX has been deprecated in favor of > > #+BEGIN_EXPORT latex ... #+END_EXPORT. I have however a lot of older org > > files that I will need to export again. I can manually change the > > blocks but I was wondering if some automatic conversion function has > > been implemented. > > I don't know if there is such a function but, for the problem you > describe, I would try something like this: > > sed -i 's/#+\(BEGIN\|END\)_LaTeX/#+\1_EXPORT/' myfile.org > > If there are lots of files maybe (UNTESTED): > > grep -rl "BEGIN_LaTeX\|END_LaTeX" | \ > xargs -IXX \ > sed -i's/#+\(BEGIN\|END\)_LaTeX/#+\1_EXPORT/' XX > > Myles > > --001a11c2f682b60b56052b5f36ef Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

Check out this announcement email about the syntax change: <= a href=3D"https://lists.gnu.org/archive/html/emacs-orgmode/2015-12/msg00525= .html">https://lists.gnu.org/archive/html/emacs-orgmode/2015-12/msg00525.ht= ml

It has a snippet to convert the old syntax files to new synt= ax.

--
Kaushal Modi

On Feb 9, 2016 6:45 PM, "Myles English"= ; <mylesenglish@gmail.com&= gt; wrote:
Hello Ju= lien,

Julien Cubizolles writes:

> The #+BEGIN_LaTeX... #+END_LaTeX has been deprecated in favor of
> #+BEGIN_EXPORT latex ... #+END_EXPORT. I have however a lot of older o= rg
> files that I will need to export again. I can manually change the
> blocks but I was wondering if some automatic conversion function has > been implemented.

I don't know if there is such a function but, for the problem you
describe, I would try something like this:

sed -i 's/#+\(BEGIN\|END\)_LaTeX/#+\1_EXPORT/' myfile.org

If there are lots of files maybe (UNTESTED):

grep -rl "BEGIN_LaTeX\|END_LaTeX" | \
=C2=A0 =C2=A0 =C2=A0xargs -IXX \
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0sed -i's/#+\(BEGIN\|END\)_LaTe= X/#+\1_EXPORT/' XX

Myles

--001a11c2f682b60b56052b5f36ef--