[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [patch] better(?) indention for cdlatex-environment
From: |
Rasmus |
Subject: |
Re: [O] [patch] better(?) indention for cdlatex-environment |
Date: |
Sat, 14 Feb 2015 00:13:06 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
Hi,
Nicolas Goaziou <address@hidden> 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
- [O] [patch] better(?) indention for cdlatex-environment, Rasmus, 2015/02/10
- Re: [O] [patch] better(?) indention for cdlatex-environment, Rasmus, 2015/02/10
- Re: [O] [patch] better(?) indention for cdlatex-environment, Nicolas Goaziou, 2015/02/10
- Re: [O] [patch] better(?) indention for cdlatex-environment, Rasmus, 2015/02/11
- Re: [O] [patch] better(?) indention for cdlatex-environment, Nicolas Goaziou, 2015/02/11
- Re: [O] [patch] better(?) indention for cdlatex-environment, Rasmus, 2015/02/11
- Re: [O] [patch] better(?) indention for cdlatex-environment, Nicolas Goaziou, 2015/02/13
- Re: [O] [patch] better(?) indention for cdlatex-environment,
Rasmus <=
- Re: [O] [patch] better(?) indention for cdlatex-environment, Rasmus, 2015/02/13
- Re: [O] [patch] better(?) indention for cdlatex-environment, Nicolas Goaziou, 2015/02/14
- Re: [O] [patch] better(?) indention for cdlatex-environment, Rasmus, 2015/02/14
- Re: [O] [patch] better(?) indention for cdlatex-environment, Nicolas Goaziou, 2015/02/15
- Re: [O] [patch] better(?) indention for cdlatex-environment, Rasmus, 2015/02/16
- Re: [O] [patch] better(?) indention for cdlatex-environment, Nicolas Goaziou, 2015/02/17
- Re: [O] [patch] better(?) indention for cdlatex-environment, Rasmus, 2015/02/17
- Re: [O] [patch] better(?) indention for cdlatex-environment, Nicolas Goaziou, 2015/02/17
- Re: [O] [patch] better(?) indention for cdlatex-environment, Rasmus, 2015/02/17
- Re: [O] [patch] better(?) indention for cdlatex-environment, Rasmus, 2015/02/18