GNU bug report logs - #26032
Indenting in tabulars without &

Previous Next

Package: auctex;

Reported by: Arash Esbati <arash <at> gnu.org>

Date: Wed, 8 Mar 2017 19:45:02 UTC

Severity: normal

Done: Arash Esbati <arash <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #30 received at 26032 <at> debbugs.gnu.org (full text, mbox):

From: Arash Esbati <arash <at> gnu.org>
To: Ikumi Keita <ikumi <at> ikumi.que.jp>
Cc: 26032 <at> debbugs.gnu.org, Mosè Giordano <mose <at> gnu.org>
Subject: Re: bug#26032: Indenting in tabulars without &
Date: Fri, 10 Mar 2017 11:50:39 +0100
Arash Esbati <arash <at> gnu.org> writes:

> Ikumi Keita <ikumi <at> ikumi.que.jp> writes:
>
>> I'm afraid that the fix has to be reconsidered.
>
> And I was afraid that this would happen; it seemed just too easy ;-)
>
>> The current code does not work as expected when the whole tabular
>> environment itself is indented like the following examples.
>>
>> \begin{table}
>>   \begin{tabular}{ll}
>>     \multicolumn{2}{c}{These lines will} `M-RET here'
>>   \end{tabular}
>> \end{table}
>>
>> \begin{table}
>>   \begin{tabular}{ll}
>>     \multicolumn{2}{c}{These lines will}  \\
>>     & `C-c C-q C-e here'
>>   \end{tabular}
>> \end{table}
>>
>> So it is not sufficient to examine whether `(- (current-column) 1)' is
>> negative or not.  I suppose that comparing the `(current-column)' and
>> `beg-col' would be necessary.  (Or just using `(max (- (current-column)
>> 1) (+ 2 beg-col))' might be sufficient.  I haven't considered the
>> situation in detail yet.)
>
> Thank you very much for double checking.  I think I won't revert my last
> change; it fixes at least part of the problem.  I will also think about
> it again (but your suggestion above looks quite appealing to me).

Hi Keita,

I did some testing, your suggestion with

    (if (natnump (- (current-column) 1))
        (max (+ 2 beg-col)
             (- (current-column) 1))
      (+ 2 beg-col))

seems to do the job.  Do you have any other idea?

Best, Arash




This bug report was last modified 8 years and 72 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.