emacs-orgmode
[Top][All Lists]
Advanced

[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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]