From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: [patch] better(?) indention for cdlatex-environment Date: Sat, 14 Feb 2015 00:13:06 +0100 Message-ID: <873869h0cd.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> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38588) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YMPQH-0005cp-GL for emacs-orgmode@gnu.org; Fri, 13 Feb 2015 18:13:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YMPQB-0007sW-UD for emacs-orgmode@gnu.org; Fri, 13 Feb 2015 18:13:21 -0500 Received: from plane.gmane.org ([80.91.229.3]:47133) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YMPQB-0007sO-NF for emacs-orgmode@gnu.org; Fri, 13 Feb 2015 18:13:15 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1YMPQ9-0005zo-QR for emacs-orgmode@gnu.org; Sat, 14 Feb 2015 00:13:13 +0100 Received: from tsn109-201-154-147.dyn.nltelcom.net ([109.201.154.147]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 14 Feb 2015 00:13:13 +0100 Received: from rasmus by tsn109-201-154-147.dyn.nltelcom.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 14 Feb 2015 00:13:13 +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 Hi, Nicolas Goaziou writes: >> I don't feel strongly about it. Anyway, I like this better. Cdlatex is, >> um, "opinionated" about is insertion of newlines. > > I still think it is better to split line. Your behaviour just requires > a C-e before calling the function. I agree that the "simpler" approach is better. That's what I mean by the "this" above. >> cdlatex-environment always return nil. I would have to analyze if >> something got inserted "manually". IOW, I don't have the name of the >> environment, and cdlatex-environment returns nil if I press C-g and if I >> select and environment. I don't know how to distinguish the cases. > > If point moved, some text was inserted. I insert a newline before I even call cdlatex. >> The attached patch works "as expected" at all locations marked with "|", >> but not the one marked with "/" and "\", which lead to the next question. >> | - i1 | i2 | >> / - i3 | >> \ > `org-get-indentation' returns the column of the first non-blank > character on the line. This has nothing to do with the point. I think the environment should not indent if point is a bol, but I can check for that. > Well, if you have (X being the point) > > - i1 > - i2 > X > > indenting like should give > > - i1 > - i2 > X I fail to see the relevant of your example. I want to know why: -i1 X -i2 => C-j -i1 -i2 I.e. i2 becomes a child of i1. —Rasmus -- May the Force be with you