Hi, Nicolas Goaziou <m...@nicolasgoaziou.fr> 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