auctex-devel
[Top][All Lists]

## Re: [AUCTeX-devel] Extending LaTeX-array-count-columns'

 From: Arash Esbati Subject: Re: [AUCTeX-devel] Extending LaTeX-array-count-columns' Date: Tue, 20 Dec 2016 12:19:13 +0100 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1

Hi Mosè,

> first of all, thanks for your work!  If you believe this change is
> worth a mention in changes.texi, drop there a few lines.

Thanks, I could put some lines into changes.texi.

> 2016-12-16 15:57 GMT+01:00 Arash Esbati <address@hidden>:
>>  Do you have a hint how I can run style hooks
>> (e.g. tabularx.el) while running the test?  I could expand the test for
>> the packages being commented out right now.
>
> Sorry, I overlooked this message before, just noticed after looking to
> the patches you installed yesterday.
>
> I'm a bit surprised by your question because I'd say that the answer
> is pretty easy, but maybe I'm missing something: if you parse the
> visited buffer, all style files of included packages are automatically
> run, otherwise you can manually call TeX-run-style-hook'.  Does this
> help?

You will have seen that I put the test
LaTeX-count-ampersands-inserted-in-tabular' into latex-test.el.  My
problem is that I couldn't find a way to load, e.g. tabularx.el, in the
test body.  I tried TeX-run-style-hook' after (LaTeX-mode) or (setq
TeX-parse-self t)' before (LaTeX-mode) in

(should (string=
(with-temp-buffer
(insert-file-contents tabular-count-ampersands/in)
<experiments here>
(LaTeX-mode)
<or experiments here>
...

The in and out file are attached.  Running make in tests directory
shows that my test fails due to this excerpt:

,----[ Test result ]
| \\begin{tabularx}{1.0\\linewidth}{llX}
|   1 & 2 & LaTeX-insert-item
| \\item
| \\end{tabularx}
----

,----[ Expected test result ]
| \\begin{tabularx}{1.0\\linewidth}{llX}
|   1 & 2 & LaTeX-insert-item \\\\
|     &&
| \\end{tabularx}
----

Best, Arash



tabular-count-ampersands-in.tex
Description: TeX document

tabular-count-ampersands-out.tex
Description: TeX document