From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: [patch] better(?) indention for cdlatex-environment Date: Sun, 15 Feb 2015 01:08:20 +0100 Message-ID: <874mqoc9zf.fsf@gmx.us> References: <87386e0zuy.fsf@gmx.us> <87wq3pwg29.fsf@nicolasgoaziou.fr> <87lhk48z9x.fsf@gmx.us> <87fvacw2jv.fsf@nicolasgoaziou.fr> <87mw4kyq2e.fsf@gmx.us> <87fva9tqdj.fsf@nicolasgoaziou.fr> <873869h0cd.fsf@gmx.us> <87twypgwt5.fsf@gmx.us> <87pp9cnq9w.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37075) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YMmlE-0005R3-LB for emacs-orgmode@gnu.org; Sat, 14 Feb 2015 19:08:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YMml9-0004xV-AS for emacs-orgmode@gnu.org; Sat, 14 Feb 2015 19:08:32 -0500 Received: from mout.gmx.net ([212.227.15.18]:63259) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YMml9-0004xA-0e for emacs-orgmode@gnu.org; Sat, 14 Feb 2015 19:08:27 -0500 Received: from W530 ([109.201.154.182]) by mail.gmx.com (mrgmx003) with ESMTPSA (Nemesis) id 0LsCAp-1XaQtF0lLT-013z6g for ; Sun, 15 Feb 2015 01:08:22 +0100 In-Reply-To: <87pp9cnq9w.fsf@nicolasgoaziou.fr> (Nicolas Goaziou's message of "Sat, 14 Feb 2015 22:20:59 +0100") 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: emacs-orgmode@gnu.org Nicolas Goaziou writes: > Another idea: insert the environment in a temp buffer. Check for buffer > emptiness. If there is something, insert it with appropriate > indentation. It's a very good idea! On the top of my head there's two issues. 1. cdlatex-environment doesn't work with buffers, only files...=EF=BB=BF= =C2=B9 I think it doesn't even work with (with-temp-file =C2=B7 =E2=8B=AF) without sav= ing the file first. Try: (require 'cdlatex) (require 'reftex) (with-temp-buffer (cdlatex-environment "equation")) 2. if run from a temporary buffer, the refcounter would always be one. Perhaps there would be a way to update it afterwards. =E2=80=94Rasmus Footnotes:=20 =EF=BB=BF=C2=B9 https://github.com/cdominik/cdlatex/issues/3 --=20 S=C3=A5dan en god dansk lagereddike kan man slet ikke bruge mere