From mboxrd@z Thu Jan 1 00:00:00 1970 From: Federico Beffa Subject: Re: proposal for improved integration of cdlatex Date: Thu, 31 Jul 2014 11:12:12 +0200 Message-ID: References: <87iomhwg3s.fsf@bzg.ath.cx> <8761igck8k.fsf@bzg.ath.cx> <87fvhkb4gm.fsf@bzg.ath.cx> <87wqaur3u0.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=001a113465d414745004ff79ab48 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36384) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XCmPK-0000SN-84 for emacs-orgmode@gnu.org; Thu, 31 Jul 2014 05:12:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XCmPJ-00067e-EQ for emacs-orgmode@gnu.org; Thu, 31 Jul 2014 05:12:18 -0400 In-Reply-To: <87wqaur3u0.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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Bastien , emacs-orgmode@gnu.org --001a113465d414745004ff79ab48 Content-Type: text/plain; charset=UTF-8 Thanks for the suggestion. Please find attached the improved patch. Regards, Federico On Wed, Jul 30, 2014 at 10:25 PM, Nicolas Goaziou wrote: > Hello, > > Federico Beffa writes: > >> + (save-excursion >> + (org-mark-element) >> + (org-indent-region (point) (mark)))) > > The function shouldn't set the mark. The following should be enough: > > > (let ((element (org-element-at-point))) > (when element > (org-indent-region (org-element-property :begin element) > (org-element-property :end element)))) > > > Regards, > > -- > Nicolas Goaziou --001a113465d414745004ff79ab48 Content-Type: application/octet-stream; name="0001-org.el-add-function-to-indent-environment-inserted-b.patch" Content-Disposition: attachment; filename="0001-org.el-add-function-to-indent-environment-inserted-b.patch" Content-Transfer-Enco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