Re: [AUCTeX-devel] Extending `LaTeX-array-count-columns'
Hi Arash, 2016-12-20 12:19 GMT+01:00 Arash Esbati : > The in and out file are attached. Running make in tests directory > shows that my test fails due to this excerpt: I think that now it'll work ;-) Adding (setq TeX-parse-self t) before (LaTeX-mode) should suffice. Bye, Mosè ___ auctex-devel mailing list auctex-devel@gnu.org https://lists.gnu.org/mailman/listinfo/auctex-devel
[AUCTeX-diffs] GNU AUCTeX branch, master, updated. c4cb166fe1624545786a9f82f2385ba6a70d4384
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GNU AUCTeX". The branch, master has been updated via c4cb166fe1624545786a9f82f2385ba6a70d4384 (commit) from db3fcb96aaa768a1b851a00d9254d7135c832251 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - commit c4cb166fe1624545786a9f82f2385ba6a70d4384 Author: Mosè Giordano Date: Wed Dec 21 00:58:31 2016 +0100 Add style/ directory to TeX-style-path for tests * tests/latex/latex-test.el: Add our "style/" directory `TeX-style-path' to make it possible to load style files inside tests. diff --git a/tests/latex/latex-test.el b/tests/latex/latex-test.el index 28af7b5..e8d8900 100644 --- a/tests/latex/latex-test.el +++ b/tests/latex/latex-test.el @@ -24,6 +24,13 @@ (require 'ert) (require 'latex) +;; Add the "style/" directory to `TeX-style-path', +;; so we can load style files inside tests. +(add-to-list 'TeX-style-path +(expand-file-name "../../style" + (when load-file-name +(file-name-directory load-file-name + (defun AUCTeX-set-ert-path (&rest sym-val) "Set first element of SYM-VAL to the next one, and so on. --- Summary of changes: tests/latex/latex-test.el |7 +++ 1 file changed, 7 insertions(+) hooks/post-receive -- GNU AUCTeX ___ auctex-diffs mailing list auctex-di...@gnu.org https://lists.gnu.org/mailman/listinfo/auctex-diffs
[AUCTeX-commit] GNU AUCTeX branch, master, updated. c4cb166fe1624545786a9f82f2385ba6a70d4384
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GNU AUCTeX". The branch, master has been updated via c4cb166fe1624545786a9f82f2385ba6a70d4384 (commit) from db3fcb96aaa768a1b851a00d9254d7135c832251 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - commit c4cb166fe1624545786a9f82f2385ba6a70d4384 Author: Mosè Giordano Date: Wed Dec 21 00:58:31 2016 +0100 Add style/ directory to TeX-style-path for tests * tests/latex/latex-test.el: Add our "style/" directory `TeX-style-path' to make it possible to load style files inside tests. --- Summary of changes: tests/latex/latex-test.el |7 +++ 1 file changed, 7 insertions(+) hooks/post-receive -- GNU AUCTeX ___ auctex-commit mailing list auctex-com...@gnu.org https://lists.gnu.org/mailman/listinfo/auctex-commit
[AUCTeX-commit] GNU AUCTeX branch, master, updated. db3fcb96aaa768a1b851a00d9254d7135c832251
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GNU AUCTeX". The branch, master has been updated via db3fcb96aaa768a1b851a00d9254d7135c832251 (commit) from 7518a8a3ae1a85bebd5aa7a9f16e9c36317c150e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - commit db3fcb96aaa768a1b851a00d9254d7135c832251 Author: Mosè Giordano Date: Tue Dec 20 23:53:48 2016 +0100 * tex.el (TeX-add-local-master): Inherit major mode from master file. --- Summary of changes: tex.el | 27 ++- 1 file changed, 18 insertions(+), 9 deletions(-) hooks/post-receive -- GNU AUCTeX ___ auctex-commit mailing list auctex-com...@gnu.org https://lists.gnu.org/mailman/listinfo/auctex-commit
[AUCTeX-diffs] GNU AUCTeX branch, master, updated. db3fcb96aaa768a1b851a00d9254d7135c832251
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GNU AUCTeX". The branch, master has been updated via db3fcb96aaa768a1b851a00d9254d7135c832251 (commit) from 7518a8a3ae1a85bebd5aa7a9f16e9c36317c150e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - commit db3fcb96aaa768a1b851a00d9254d7135c832251 Author: Mosè Giordano Date: Tue Dec 20 23:53:48 2016 +0100 * tex.el (TeX-add-local-master): Inherit major mode from master file. diff --git a/tex.el b/tex.el index e192899..1b5f2cb 100644 --- a/tex.el +++ b/tex.el @@ -2513,7 +2513,9 @@ name of master file if it cannot be determined otherwise." (file-name-directory buffer-file-name))) (defun TeX-add-local-master () - "Add local variable for `TeX-master'." + "Add local variable for `TeX-master'. + +Get `major-mode' from master file and enable it." (when (and (buffer-file-name) (string-match TeX-one-master (file-name-nondirectory (buffer-file-name))) @@ -2526,20 +2528,27 @@ name of master file if it cannot be determined otherwise." "End:"))) (beginning-of-line 1) (insert prefix "TeX-master: " (prin1-to-string TeX-master) "\n")) - (let ((comment-prefix (cond ((eq major-mode 'texinfo-mode) "@c ") - ((eq major-mode 'doctex-mode) "% ") - (t "%%% "))) - (mode (concat (and (boundp 'japanese-TeX-mode) japanese-TeX-mode - "japanese-") - (substring (symbol-name major-mode) 0 -5 + (let* ((mode (if (stringp TeX-master) + (with-current-buffer + (find-file-noselect + (TeX-master-file TeX-default-extension)) +major-mode) +major-mode)) +(comment-prefix (cond ((eq mode 'texinfo-mode) "@c ") + ((eq mode 'doctex-mode) "% ") + (t "%%% "))) +(mode-string (concat (and (boundp 'japanese-TeX-mode) japanese-TeX-mode + "japanese-") + (substring (symbol-name mode) 0 -5 (newline) (when (eq major-mode 'doctex-mode) (insert comment-prefix TeX-esc "endinput\n")) (insert comment-prefix "Local Variables:\n" -comment-prefix "mode: " mode "\n" +comment-prefix "mode: " mode-string "\n" comment-prefix "TeX-master: " (prin1-to-string TeX-master) "\n" -comment-prefix "End:\n") +comment-prefix "End:\n") + (funcall mode) (defun TeX-local-master-p () "Return non-nil if there is a `TeX-master' entry in local variables spec. --- Summary of changes: tex.el | 27 ++- 1 file changed, 18 insertions(+), 9 deletions(-) hooks/post-receive -- GNU AUCTeX ___ auctex-diffs mailing list auctex-di...@gnu.org https://lists.gnu.org/mailman/listinfo/auctex-diffs
Re: [AUCTeX-devel] Extending `LaTeX-array-count-columns'
Hi Mosè, Mosè Giordano writes: > 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 : >> 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) (LaTeX-mode) ... 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 ___ auctex-devel mailing list auctex-devel@gnu.org https://lists.gnu.org/mailman/listinfo/auctex-devel
Re: [AUCTeX-devel] Updating minted.el
Arash Esbati writes: Hi Arash, > I have a question reg. the function `LaTeX-minted-language-list': The > style defines also the variable `LaTeX-minted-language-list' and looks > if it is non-nil in the function, but the variable does not get set > anywhere, so it is permanently nil. This way, the function > `LaTeX-minted-language-list' is executed every time a minted language is > queried with shell-command-temp-buffer-re-search which shows a very > small slow down for me. Is this the intended behavior? Nope, obviously not. > It can be cured easily be setting the variable > `LaTeX-minted-language-list' at the of the first run. That has been my intent. > I've also added a similar function `LaTeX-minted-style-list' for the > styles, but found another anomaly (see FIXME comment in > `LaTeX-minted-key-val-options'). Hm, the anomaly sounds strange. Anyhow, your patch looks very good, so feel free to commit it as is. I'll try to reproduce that issue then an see if there can be something done. Bye, Tassilo ___ auctex-devel mailing list auctex-devel@gnu.org https://lists.gnu.org/mailman/listinfo/auctex-devel
Re: [AUCTeX-devel] Extending `LaTeX-array-count-columns'
Hi Arash and Ikumi, first of all, thanks for your work! If you believe this change is worth a mention in changes.texi, drop there a few lines. 2016-12-16 15:57 GMT+01:00 Arash Esbati : > 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? Bye, Mosè ___ auctex-devel mailing list auctex-devel@gnu.org https://lists.gnu.org/mailman/listinfo/auctex-devel