[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: |
Thu, 19 Feb 2015 01:22:29 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
Hi,
Nicolas Goaziou <address@hidden> writes:
>> Perhaps there are clever ways to figure it out. I say there are too many
>> dynamics and "fixes" in the code to get cdlatex-environment to work
>> already. Just consider this example where | is cursor
>>
>> - foo | bar
>>
>> Midway through, when ENV is reinserted, but before indentation the
>> end-marker will be *after* bar which is a line after \end{ENV}...
>
> This is exactly what we want: indent (non empty) lines starting in
> [BEG ; END[. Or am I missing something?
OK, the missing key is org-indent-line-to. It works better in this case
and I can use end.
>> Anyway it reminded me that I missed "re-implementing" one feature of
>> cdlatex, namely moving the cursor to the right place. I refind this
>> place do it by inserting a funny string and replacing it. A poor man's
>> marker, I guess...
>
> Another option: when ENV is inserted the first time, store (e.g., in N)
> how many (forward-line -1) are needed to go back to BEG. At the end of
> the process, move to BEG then (forward-line n). I assume point is always
> left on an empty lines. If it is not the case, you also need to store
> current column, relatively to end of line.
OK it now does this.
—Rasmus
--
Dung makes an excellent fertilizer
0001-org.el-Change-indention-for-cdlatex-environments.patch
Description: Text Data
- Re: [O] [patch] better(?) indention for cdlatex-environment, (continued)
- Re: [O] [patch] better(?) indention for cdlatex-environment, Rasmus, 2015/02/13
- 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 <=
- Re: [O] [patch] better(?) indention for cdlatex-environment, Rasmus, 2015/02/19
- Re: [O] [patch] better(?) indention for cdlatex-environment, Nicolas Goaziou, 2015/02/19
- Re: [O] [patch] better(?) indention for cdlatex-environment, Rasmus, 2015/02/19
- Re: [O] [patch] better(?) indention for cdlatex-environment, Nicolas Goaziou, 2015/02/19
- Re: [O] [patch] better(?) indention for cdlatex-environment, Rasmus, 2015/02/19
- Re: [O] [patch] better(?) indention for cdlatex-environment, Nicolas Goaziou, 2015/02/20
- Re: [O] [patch] better(?) indention for cdlatex-environment, Rasmus, 2015/02/20
- Re: [O] [patch] better(?) indention for cdlatex-environment, Nicolas Goaziou, 2015/02/20
- Re: [O] [patch] better(?) indention for cdlatex-environment, Rasmus, 2015/02/20
- Re: [O] [patch] better(?) indention for cdlatex-environment, Nicolas Goaziou, 2015/02/20