[AUCTeX-diffs] GNU AUCTeX branch, master, updated. b072f9ca25ff9cc2d6d3a40ab7699eb7ed42f9f6

2015-10-19 Thread Mosè Giordano
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  b072f9ca25ff9cc2d6d3a40ab7699eb7ed42f9f6 (commit)
  from  25a9c18d1712d7f2c221a4a14b72c178b7d6bd5a (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 b072f9ca25ff9cc2d6d3a40ab7699eb7ed42f9f6
Author: Mosè Giordano <m...@gnu.org>
Date:   Mon Oct 19 10:19:46 2015 +0200

Make sure there is a working TeX distribution before running *tex.

* tex-buf.el (TeX-command): Check that AUCTeX can find a working
TeX distribution before running some *TeX commands.

diff --git a/ChangeLog b/ChangeLog
index 20bd1dc..3b4b629 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-10-19  Mosè Giordano  <m...@gnu.org>
+
+   * tex-buf.el (TeX-command): Check that AUCTeX can find a working
+   TeX distribution before running some *TeX commands.
+
 2015-10-18  Mosè Giordano  <m...@gnu.org>
 
* tex.el (fboundp): Define a `TeX-completing-read-multiple'
diff --git a/tex-buf.el b/tex-buf.el
index 324be7a..ec3653c 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -479,6 +479,18 @@ been set."
   (if (get-buffer TeX-error-overview-buffer-name)
  (kill-buffer TeX-error-overview-buffer-name)))
 
+;; Before running some commands, check that AUCTeX is able to find "tex"
+;; program.
+(and (member name '("TeX" "LaTeX" "AmSTeX" "ConTeXt" "ConTeXt Full"))
+(not (executable-find TeX-command))
+(error (format "ERROR: AUCTeX cannot find a working TeX distribution.
+Make sure you have one and that TeX binaries are in PATH environment 
variable%s"
+   (if (eq system-type 'darwin)
+   ".
+If you are using OS X El Capitan or later
+remember to add /Library/TeX/texbin/ to your PATH"
+ ""
+
 ;; Now start the process
 (setq file (funcall file))
 (TeX-process-set-variable file 'TeX-command-next TeX-command-Show)

---

Summary of changes:
 ChangeLog  |5 +
 tex-buf.el |   12 
 2 files changed, 17 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
GNU AUCTeX

___
auctex-diffs mailing list
auctex-di...@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-diffs


[AUCTeX-diffs] GNU AUCTeX branch, master, updated. 25a9c18d1712d7f2c221a4a14b72c178b7d6bd5a

2015-10-18 Thread Mosè Giordano
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  25a9c18d1712d7f2c221a4a14b72c178b7d6bd5a (commit)
  from  93d50ea9920767901221f54ad566c6b3e9a1f462 (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 25a9c18d1712d7f2c221a4a14b72c178b7d6bd5a
Author: Mosè Giordano <m...@gnu.org>
Date:   Sun Oct 18 23:06:13 2015 +0200

Define TeX-completing-read-multiple for Emacs 24.4 and later.

* tex.el (fboundp): Define a `TeX-completing-read-multiple'
version for GNU Emacs >= 24.4.  Fixes bug#19504.

diff --git a/ChangeLog b/ChangeLog
index cd4d925..20bd1dc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-10-18  Mosè Giordano  <m...@gnu.org>
+
+   * tex.el (fboundp): Define a `TeX-completing-read-multiple'
+   version for GNU Emacs >= 24.4.  Fixes bug#19504.
+
 2015-10-13  Mosè Giordano  <m...@gnu.org>
 
* style/pstricks.el ("pstricks"): Do not disable PDF mode if XeTeX
diff --git a/tex.el b/tex.el
index 56fb51b..6bd7a95 100644
--- a/tex.el
+++ b/tex.el
@@ -778,18 +778,57 @@ overlays."
 edit-utils >= 2.32 for XEmacs.")))
 
 (if (fboundp 'completing-read-multiple)
-(defun TeX-completing-read-multiple
-   (prompt table  predicate require-match initial-input
-   hist def inherit-input-method)
-  "Like `completing-read-multiple' which see.
+(if (or (and (= emacs-major-version 24) (>= emacs-minor-version 4))
+   (>= emacs-major-version 25))
+   ;; For GNU Emacs 24.4 or later, based on `completing-read-multiple' of
+   ;; git commit b14abca9476cba2f500b5eda89441d593dd0f12b
+   ;;   2013-01-10  * lisp/emacs-lisp/crm.el: Allow any regexp for 
separators.
+   (defun TeX-completing-read-multiple
+   (prompt table  predicate require-match initial-input
+   hist def inherit-input-method)
+ "Like `completing-read-multiple' which see.
+Retain zero-length substrings but ensure that empty input results
+in nil across different emacs versions."
+ (unwind-protect
+ (progn
+   (add-hook 'choose-completion-string-functions
+ 'crm--choose-completion-string)
+   (let* ((minibuffer-completion-table #'crm--collection-fn)
+  (minibuffer-completion-predicate predicate)
+  ;; see completing_read in src/minibuf.c
+  (minibuffer-completion-confirm
+   (unless (eq require-match t) require-match))
+  (crm-completion-table table)
+  (map (if require-match
+   crm-local-must-match-map
+ crm-local-completion-map))
+  ;; If the user enters empty input, `read-from-minibuffer'
+  ;; returns the empty string, not DEF.
+  (input (read-from-minibuffer
+  prompt initial-input map
+  nil hist def inherit-input-method))
+  result)
+ (and def (string-equal input "") (setq input def))
+ (if (equal (setq result (split-string input crm-separator))
+'(""))
+ nil
+   result)))
+   (remove-hook 'choose-completion-string-functions
+'crm--choose-completion-string)))
+  ;; For GNU Emacs <= 24.3.
+  (defun TeX-completing-read-multiple
+ (prompt table  predicate require-match initial-input
+ hist def inherit-input-method)
+   "Like `completing-read-multiple' which see.
 Ensures that empty input results in nil across different emacs versions."
-  (let ((result (completing-read-multiple prompt table predicate
- require-match initial-input
- hist def inherit-input-method)))
-   (if (equal result '("")) nil result)))
+   (let ((result (completing-read-multiple prompt table predicate
+   require-match initial-input
+   hist def inherit-input-method)))
+ (if (equal result '("")) nil result
+  ;; For XEmacs.
   (defun TeX-completing-read-multiple
-(prompt table  predicate require-match initial-input
-   hist def inherit-input-method)
+  (prompt table  predicate require-match initial-input
+ hist def inheri

Re: [AUCTeX-devel] amsmath, amsthm automatially insert thm, lemma etc

2015-10-18 Thread Mosè Giordano
Hi Arash,

2015-10-18 12:06 GMT+02:00 Arash Esbati :
> Hi Uwe,
>
> Uwe Brauer  writes:
>
>> Maybe I am missing something elementary.
>> Is it is possible to have automatically inserted theorem, lemmas etc
>> when using either amsmath or amsthm style. I cannot get it to work so I
>> have
>>
>> (defun LaTeX-thm-insert (environment) ;Version:1.20
>>   (if (y-or-n-p
>>  (format "Do you want a title "))
>> (let ((title (read-input "(optional) Title: ")))
>> (LaTeX-insert-environment "thm" (concat "[" title "]"))
>> (and (LaTeX-label environment)
>>(newline-and-indent)))
>> (LaTeX-insert-environment "thm")
>> (and (LaTeX-label environment)
>>(newline-and-indent
>>
>> But is this necessary?
>
> Besides the discussion about `subfiles' package, I think `amsthm.el'
> could do a better job reg. new environments defined and optional
> headings.  Further it has a bug in the way it uses `TeX-arg-length':
>
> --8<---cut here---start->8---
> '("newtheoremstyle" "Style name" (TeX-arg-length nil "Space above")
>   (TeX-arg-length nil "Space below") "Body font" "Indent amount"
>   "Theorem head font" "Punctuation after head"
>   (TeX-arg-length nil "Space after head") "Theorem head spec"))
> --8<---cut here---end--->8---
>
> The string "Space above" for example becomes `Initial-Input' and not
> `Prompt'.  I'm attaching an improved version of `amsthm.el'.  Could you
> give it a try?  I have never used the package so I would be grateful if
> you could test it and give some feedback here.

Thanks for your contribution.  I didn't have the time to actually test
it, but it looks good.  Just out of curiosity: isn't

(format "%s" heading)

the same as

heading

?

Cheers,
Mosè

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] amsrefs support in reftex

2015-10-16 Thread Mosè Giordano
Hi Marcin,

2015-10-16 9:43 GMT+02:00 Marcin Borkowski :
> This means that (most probably) I should look into reftex-cite.el, in
> particular the parts which (a) look for files with the bibliography and
> (b) extract info from them.  But where are they and how do they work...?

Yes, reftex-cite.el does the parsing of bibtex files, take a look at
`reftex-parse-bibtex-entry' and `reftex-extract-bib-entries'.

Regarding the absence of docstrings, sometimes they're hidden in
comments, also AUCTeX used to have some docstring as comments, I don't
know if it was a feature of old Emacsen of just a habit of developers.

Bye,
Mosè

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] amsrefs support in reftex

2015-10-15 Thread Mosè Giordano
Hi Marcin,

2015-10-15 22:13 GMT+02:00 Marcin Borkowski :
> Hi all,
>
> I'd very much welcome amsrefs support in reftex.  I understand that it's
> some/a lot of work, and I'm willing to contribute some time to it (I
> don't have a lot of time this semester, but the next one will be much
> better).  I'm currently in the process of sorting out the copyright
> assignment to the FSF, too.
>
> The problem is that reftex's code is nearly incomprehensible.  Many
> functions do not have docstrings at all, for instance.  (Also, I get the
> feeling that the code really could use some refactoring - this I could
> help a bit with, too.)

I'm really happy I'm not the only one having difficulties with
understanding RefTeX' code!  RefTeX is great, provides tons of useful
features, but I find AUCTeX' code much much easier to read.

> So, my question is:  Where should I start reading reftex's code to be
> able to start working on amsrefs support?

Your help would be very welcome.  I'm not familiar with amsrefs.  What
kind of features if offers?  How do you plan to add support in RefTeX?

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. 93d50ea9920767901221f54ad566c6b3e9a1f462

2015-10-13 Thread Mosè Giordano
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  93d50ea9920767901221f54ad566c6b3e9a1f462 (commit)
  from  1f116b8499a0bd6081a473fb53dbf49ba49514cb (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 93d50ea9920767901221f54ad566c6b3e9a1f462
Author: Mosè Giordano <m...@gnu.org>
Date:   Tue Oct 13 21:44:19 2015 +0200

Do not disable PDF when using pstricks with XeTeX.

* style/pstricks.el ("pstricks"): Do not disable PDF mode if XeTeX
engine is used.  Suggested by Mandar Mitra.

diff --git a/ChangeLog b/ChangeLog
index 2c768b9..cd4d925 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-10-13  Mosè Giordano  <m...@gnu.org>
+
+   * style/pstricks.el ("pstricks"): Do not disable PDF mode if XeTeX
+   engine is used.  Suggested by Mandar Mitra.
+
 2015-10-09  Tassilo Horn  <t...@gnu.org>
 
* latex.el (LaTeX-fill-move-to-break-point): Fill $...$ like
diff --git a/style/pstricks.el b/style/pstricks.el
index 02b2c30..5b6e828 100644
--- a/style/pstricks.el
+++ b/style/pstricks.el
@@ -776,7 +776,8 @@ comma separated list. Point has to be within the sexp to 
modify."
 (TeX-add-style-hook
  "pstricks"
  (lambda ()
-   (unless (member "pst-pdf" TeX-active-styles)
+   (unless (or (member "pst-pdf" TeX-active-styles)
+  (eq TeX-engine 'xetex))
  (TeX-PDF-mode-off))
(mapc 'TeX-auto-add-regexp LaTeX-auto-pstricks-regexp-list)
(LaTeX-add-environments

---

Summary of changes:
 ChangeLog |5 +
 style/pstricks.el |3 ++-
 2 files changed, 7 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
GNU AUCTeX

___
auctex-diffs mailing list
auctex-di...@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-diffs


[AUCTeX-diffs] GNU AUCTeX branch, master, updated. 6f77ad9ee30aebc8ed079a9a0190431b50364bfa

2015-10-08 Thread Mosè Giordano
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  6f77ad9ee30aebc8ed079a9a0190431b50364bfa (commit)
   via  4a12225b077b1571b0624ee3ed09fbda0f778193 (commit)
   via  7df138d0cea251eac95904c8ba9caf1ff81a (commit)
   via  7332f76ea26745d0d0fa5058f911f4d8139bec42 (commit)
   via  ac8d4795781144d9ebc3ec0629efb77bc4d9b9d6 (commit)
  from  8a2bd0bfbc4b401f36d488dcb6dbc0282af8d4c1 (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 6f77ad9ee30aebc8ed079a9a0190431b50364bfa
Author: Mosè Giordano <m...@gnu.org>
Date:   Fri Oct 9 00:02:34 2015 +0200

Split TeX-expand-list into a builtin and a custom list.

* tex.el (TeX-expand-list-builtin): New variable.
(TeX-expand-list): Move all entries to `TeX-expand-list-builtin'
and update docstring.
(TeX-expand-list): New function.

* tex-buf.el (TeX-command-expand): Use `TeX-expand-list' function.

* doc/auctex.texi (Starting Viewers): Mention
`TeX-expand-list-builtin'.

* doc/changes.texi: Mention change to `TeX-expand-list'.

diff --git a/ChangeLog b/ChangeLog
index ec8171c..921c5cd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2015-10-08  Mosè Giordano  <m...@gnu.org>
+
+   * tex.el (TeX-expand-list-builtin): New variable.
+   (TeX-expand-list): Move all entries to `TeX-expand-list-builtin'
+   and update docstring.
+   (TeX-expand-list): New function.
+
+   * tex-buf.el (TeX-command-expand): Use `TeX-expand-list' function.
+
+   * doc/auctex.texi (Starting Viewers): Mention
+   `TeX-expand-list-builtin'.
+
+   * doc/changes.texi: Mention change to `TeX-expand-list'.
+
 2015-10-08  Arash Esbati  <esb...@gmx.de>
 
* style/longtable.el ("longtable"): Use `LaTeX-add-counters' on
diff --git a/doc/auctex.texi b/doc/auctex.texi
index e32cd2d..a7ac3ae 100644
--- a/doc/auctex.texi
+++ b/doc/auctex.texi
@@ -3124,14 +3124,15 @@ conditionalized by prefixing them with predicates from
 @code{TeX-view-predicate-list} or
 @code{TeX-view-predicate-list-builtin}.  (See the doc string for the
 exact format to use.)  The command line can also contain placeholders as
-defined in @code{TeX-expand-list} which are expanded before the viewer
-is called.
+defined in @code{TeX-expand-list} and @code{TeX-expand-list-builtin}
+which are expanded before the viewer is called.
 
 The third element of each item is a string, or a list of strings, with
 the name of the executable, or executables, needed to open the output
-file in the viewer.  Placeholders defined in @code{TeX-expand-list} can
-be used here.  This element is optional and is used to check whether the
-viewer is actually available on the system.
+file in the viewer.  Placeholders defined in @code{TeX-expand-list} and
+@code{TeX-expand-list-builtin} can be used here.  This element is
+optional and is used to check whether the viewer is actually available
+on the system.
 
 A built-in viewer spec from @code{TeX-view-program-list-builtin} can be
 overwritten by defining a new viewer spec with the same name.
@@ -3139,10 +3140,10 @@ overwritten by defining a new viewer spec with the same 
name.
 
 Note that the viewer selection and invocation as described above will
 only work if certain default settings in @AUCTeX{} are intact.  For one,
-the whole viewer selection machinery will only be triggered if the
-@samp{%V} expander in @code{TeX-expand-list} is unchanged.  So if you
-have trouble with the viewer invocation you might check if there is an
-older customization of the variable in place.  In addition, the use of a
+the whole viewer selection machinery will only be triggered if there is
+no @samp{%V} expander in @code{TeX-expand-list}.  So if you have trouble
+with the viewer invocation you might check if there is an older
+customization of the variable in place.  In addition, the use of a
 function in @code{TeX-view-program-list} only works if the View command
 in @code{TeX-command-list} makes use of the hook
 @code{TeX-run-discard-or-function}.
diff --git a/doc/changes.texi b/doc/changes.texi
index 14fc510..0ed617e 100644
--- a/doc/changes.texi
+++ b/doc/changes.texi
@@ -49,6 +49,13 @@ Now @AUCTeX{} suggests to run @command{makeindex} when 
appropriate.
 each item, the name of the executable(s) needed to open the viewer.
 
 @item
+@code{TeX-expand-list} variable has been split into
+@code{TeX-expand-list} and @code{TeX-expand-list-builtin}.  Only the
+former is intended to be customized by the user, the latter contains
+built-in expanders.  You might want to keep in @code{TeX-expand-list}
+only new expansion strings.
+
+

Re: [AUCTeX-devel] [PATCH] Various patches

2015-10-08 Thread Mosè Giordano
Hi Arash,

2015-10-08 22:41 GMT+02:00 Arash Esbati :
> Hi all,
>
> please find attached 4 patches covering:
>
> * style/longtable.el ("longtable"): Use `LaTeX-add-counters' on
> "LTchunksize" and not `TeX-add-symbols'.
>
> * style/enumitem.el (LaTeX-arg-SetEnumitemKey): Remove unused
> `prompt' from arguments list.
> (LaTeX-arg-SetEnumitemValue): ditto.
>
> * style/listings.el (LaTeX-listings-key-val-options-local): New
> variable used for all key-val queries.
> ("listings-lstdefinestyle"): Add parsing support for
> "\lstdefinestyle".
> (LaTeX-listings-lstnewenvironment-regexp): Add missing "s" to
> "listing".
> (LaTeX-listings-update-style-key): New function adding newly
> defined values to "style" key in
> `LaTeX-listings-key-val-options-local'.
> ("listings"): Extend "lstdefinestyle".
>
> * style/wrapfig.el ("wrapfig"): Check for new floating
> environments definded through "newfloat.el" and offer them as
> completion to "wrapfloat" environment.
>
> As always any comments welcome and my apologies for missing the change
> in `longtable' last time.

Patches installed, thanks!

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. 8a2bd0bfbc4b401f36d488dcb6dbc0282af8d4c1

2015-10-05 Thread Mosè Giordano
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  8a2bd0bfbc4b401f36d488dcb6dbc0282af8d4c1 (commit)
  from  3b5f047045557baa00f6a5bc26cf1b24037145a8 (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 8a2bd0bfbc4b401f36d488dcb6dbc0282af8d4c1
Author: Mosè Giordano 
Date:   Mon Oct 5 23:23:52 2015 +0200

Fix previous commit.

diff --git a/context.el b/context.el
index ccd32a5..62d7b3a 100644
--- a/context.el
+++ b/context.el
@@ -571,11 +571,11 @@ inserted after the sectioning command."
 (cond ((TeX-TeX-sentinel-check process name))
  ((re-search-forward "fatal error: " nil t)
   (message (concat name ": problems after "
-   (TeX-current-pages name)))
+   (TeX-current-pages)))
   (setq TeX-command-next TeX-command-default))
  (t
   (message (concat name ": successfully formatted "
-   (TeX-current-pages name)))
+   (TeX-current-pages)))
   (setq TeX-command-next TeX-command-Show
;; Mark II
(t

---

Summary of changes:
 context.el |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
GNU AUCTeX

___
auctex-diffs mailing list
auctex-di...@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-diffs


[AUCTeX-diffs] GNU AUCTeX branch, master, updated. 3b5f047045557baa00f6a5bc26cf1b24037145a8

2015-10-05 Thread Mosè Giordano
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  3b5f047045557baa00f6a5bc26cf1b24037145a8 (commit)
   via  e85968c22de15113c1c778b1bcc546f6ae376a49 (commit)
  from  1ec0278e620542285df51086a3de9cd7792e5142 (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 3b5f047045557baa00f6a5bc26cf1b24037145a8
Author: Mosè Giordano <m...@gnu.org>
Date:   Mon Oct 5 23:21:09 2015 +0200

Add supporto to ConTeXt Mark IV in some sentinels.

* context.el (TeX-ConTeXt-sentinel): Parse ConTeXt Mark IV output.

* tex-buf.el (TeX-TeX-sentinel-check): Ditto.

diff --git a/ChangeLog b/ChangeLog
index 61de4d3..b287587 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2015-10-05  Mosè Giordano  <m...@gnu.org>
+
+   * context.el (TeX-ConTeXt-sentinel): Parse ConTeXt Mark IV output.
+
+   * tex-buf.el (TeX-TeX-sentinel-check): Ditto.
+
 2015-10-05  Arash Esbati  <esb...@gmx.de>
 
* style/newfloat.el (LaTeX-newfloat-auto-cleanup): Check if
diff --git a/context.el b/context.el
index 0aa7311..ccd32a5 100644
--- a/context.el
+++ b/context.el
@@ -564,28 +564,43 @@ inserted after the sectioning command."
 ;; Various
 (defun TeX-ConTeXt-sentinel (process name)
   "Cleanup TeX output buffer after running ConTeXt."
-  (cond ((TeX-TeX-sentinel-check process name))
-   ((save-excursion
-  ;; in a full ConTeXt run there will multiple texutil
-  ;; outputs. Just looking for "another run needed" would
-  ;; find the first occurence
-  (goto-char (point-max))
-  (re-search-backward "TeXUtil " nil t)
-  (re-search-forward "another run needed" nil t))
-(message (concat "You should run ConTeXt again "
- "to get references right, "
- (TeX-current-pages)))
-(setq TeX-command-next TeX-command-default))
-   ((re-search-forward "removed files :" nil t)
-(message "sucessfully cleaned up"))
-   ((re-search-forward "^ ?TeX\\(Exec\\|Util\\)" nil t) ;; strange regexp 
--pg
-(message (concat name ": successfully formatted "
- (TeX-current-pages)))
-(setq TeX-command-next TeX-command-Show))
-   (t
-(message (concat name ": problems after "
- (TeX-current-pages)))
-(setq TeX-command-next TeX-command-default
+  (cond
+   ;; Mark IV
+   ((with-current-buffer TeX-command-buffer
+  (string= ConTeXt-Mark-version "IV"))
+(cond ((TeX-TeX-sentinel-check process name))
+ ((re-search-forward "fatal error: " nil t)
+  (message (concat name ": problems after "
+   (TeX-current-pages name)))
+  (setq TeX-command-next TeX-command-default))
+ (t
+  (message (concat name ": successfully formatted "
+   (TeX-current-pages name)))
+  (setq TeX-command-next TeX-command-Show
+   ;; Mark II
+   (t
+(cond ((TeX-TeX-sentinel-check process name))
+ ((save-excursion
+;; in a full ConTeXt run there will multiple texutil
+;; outputs. Just looking for "another run needed" would
+;; find the first occurence
+(goto-char (point-max))
+(re-search-backward "TeXUtil " nil t)
+(re-search-forward "another run needed" nil t))
+  (message (concat "You should run ConTeXt again "
+   "to get references right, "
+   (TeX-current-pages)))
+  (setq TeX-command-next TeX-command-default))
+ ((re-search-forward "removed files :" nil t)
+  (message "sucessfully cleaned up"))
+ ((re-search-forward "^ ?TeX\\(Exec\\|Util\\)" nil t) ;; strange 
regexp --pg
+  (message (concat name ": successfully formatted "
+   (TeX-current-pages)))
+  (setq TeX-command-next TeX-command-Show))
+ (t
+  (message (concat name ": problems after "
+   (TeX-current-pages)))
+  (setq TeX-command-next TeX-command-default))
 
 
 ;;; Environments
diff --git a/tex-buf.el b/tex-buf.el
index bfe684e..d42b547 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -1292,17 +1292,33 @@ errors or warnings to show."
 Return nil ifs no errors were found."
   (save-excursion

Re: [AUCTeX-devel] [PATCH] A fix for longtable and a new style

2015-10-05 Thread Mosè Giordano
Hi Arash,

2015-10-05 23:08 GMT+02:00 Arash Esbati :
> Many thanks for updating the style.  I also found a bug in the way I
> used `(LaTeX-largest-level)'.  Please find attached a patch fixing the
> issue and also adapting it caption.el.  I would appreciate if you could
> install it.

Done, thank you.

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. 1ec0278e620542285df51086a3de9cd7792e5142

2015-10-04 Thread Mosè Giordano
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  1ec0278e620542285df51086a3de9cd7792e5142 (commit)
  from  ce8981a1a087afe87be738549f863ffb243f0748 (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 1ec0278e620542285df51086a3de9cd7792e5142
Author: Mosè Giordano <m...@gnu.org>
Date:   Sun Oct 4 21:41:12 2015 +0200

Different approach to support ConTeXt Mark IV.

* context.el (ConTeXt-Mark-version): New customizable and
safe-local variable.
(ConTeXt-expand-command): New function.
(ConTeXt-expand-options): Use `ConTeXt-Mark-version'.

* tex.el (TeX-command-list): Use %(cntxcom) expander in all
ConTeXt programs.  Remove MkIV entry.
(TeX-expand-list): Add %(cntxcom).

diff --git a/ChangeLog b/ChangeLog
index 5eb3ef7..0f9b067 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2015-10-04  Mosè Giordano  <m...@gnu.org>
+
+   * context.el (ConTeXt-Mark-version): New customizable and
+   safe-local variable.
+   (ConTeXt-expand-command): New function.
+   (ConTeXt-expand-options): Use `ConTeXt-Mark-version'.
+
+   * tex.el (TeX-command-list): Use %(cntxcom) expander in all
+   ConTeXt programs.  Remove MkIV entry.
+   (TeX-expand-list): Add %(cntxcom).
+
 2015-10-04  Tassilo Horn  <t...@gnu.org>
 
* font-latex.el (font-latex-math-environments): Add math
diff --git a/context.el b/context.el
index 30b670e..0aa7311 100644
--- a/context.el
+++ b/context.el
@@ -1,6 +1,6 @@
 ;;; context.el --- Support for ConTeXt documents.
 
-;; Copyright (C) 2003-2006, 2008, 2010, 2012, 2014
+;; Copyright (C) 2003-2006, 2008, 2010, 2012, 2014, 2015
 ;;   Free Software Foundation, Inc.
 
 ;; Maintainer: Berend de Boer <ber...@pobox.com>
@@ -1576,24 +1576,51 @@ else.  There might be text before point."
 
 ;;; Option expander
 
+(defcustom ConTeXt-Mark-version "II"
+  "ConTeXt Mark version used for running ConTeXt."
+  :type "string"
+  :group 'TeX-command)
+(make-variable-buffer-local 'ConTeXt-Mark-version)
+(put 'ConTeXt-Mark-version 'safe-local-variable 'stringp)
+
 (defvar ConTeXt-texexec-option-nonstop "--nonstop "
   "Command line option for texexec to use nonstopmode.")
 
+(defun ConTeXt-expand-command ()
+  "Expand ConTeXt command.
+Use `ConTeXt-Mark-version' to choose the command."
+  (cond
+   ((string= ConTeXt-Mark-version "IV")
+"context")
+   ;; In any other case fall back on Mark II.
+   (t
+"texexec")))
+
 (defun ConTeXt-expand-options ()
   "Expand options for context command."
-  (concat
-   (let ((engine (eval (nth 4 (assq TeX-engine (TeX-engine-alist))
- (when engine
-   (format "--engine=%s " engine)))
-   (unless (eq ConTeXt-current-interface "en")
- (format "--interface=%s " ConTeXt-current-interface))
-   (when TeX-source-correlate-mode
- (format "--passon=\"%s\" "
-(if (eq (TeX-source-correlate-method-active) 'synctex)
-TeX-synctex-tex-flags
-  TeX-source-specials-tex-flags)))
-   (unless TeX-interactive-mode
- ConTeXt-texexec-option-nonstop)))
+  (cond
+   ;; Mark IV
+   ((string= ConTeXt-Mark-version "IV")
+(concat
+ (if TeX-source-correlate-mode
+"--synctex=1 ")
+ (unless TeX-interactive-mode
+   ConTeXt-texexec-option-nonstop)))
+   ;; In any other case fall back on Mark II.
+   (t
+(concat
+ (let ((engine (eval (nth 4 (assq TeX-engine (TeX-engine-alist))
+   (when engine
+(format "--engine=%s " engine)))
+ (unless (eq ConTeXt-current-interface "en")
+   (format "--interface=%s " ConTeXt-current-interface))
+ (when TeX-source-correlate-mode
+   (format "--passon=\"%s\" "
+  (if (eq (TeX-source-correlate-method-active) 'synctex)
+  TeX-synctex-tex-flags
+TeX-source-specials-tex-flags)))
+ (unless TeX-interactive-mode
+   ConTeXt-texexec-option-nonstop)
 
 ;;; Mode
 
diff --git a/tex.el b/tex.el
index 0072e31..d057cef 100644
--- a/tex.el
+++ b/tex.el
@@ -136,13 +136,11 @@ If nil, none is specified."
  TeX-run-TeX nil (ams-tex-mode) :help "Run AMSTeX")
 ;; support for ConTeXt  --pg
 ;; first version of ConTeXt to support nonstopmode: 2003.2.10
-("ConTeXt" "texexec --once --texutil %(extraopts) %(execopts)%t"
+("ConTeXt" "%(cntxcom) --once --texutil %(e

Re: [AUCTeX-devel] [PATCH] A fix for longtable and a new style

2015-09-29 Thread Mosè Giordano
Hi Arash,

2015-09-28 20:29 GMT+02:00 Arash Esbati :
> Thanks for looking at this, installing and updating the style.  There is
> still one `pushnew' in the code, line 118:
>
> --8<---cut here---start->8---
> ((string-equal type "verbatim")
>  (LaTeX-add-environments flt)
>  (make-local-variable 'LaTeX-indent-environment-list)
>  (pushnew `(,flt current-indentation)
>LaTeX-indent-environment-list :test #'equal)
>  ...
> --8<---cut here---end--->8---
>
> Is this on purpose?

Of course no, thanks.

Bye,
Mosè

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] [PATCH] A fix for longtable and a new style

2015-09-28 Thread Mosè Giordano
Hi Tassilo,

2015-09-28 8:40 GMT+02:00 Tassilo Horn <t...@gnu.org>:
> Mosè Giordano <m...@gnu.org> writes:
>
>> `pushnew' can't append to variables, but my understanding is that it's
>> safer than `add-to-list' when it comes to let-bound variables (can
>> someone please confirm this?),
>
> Yes, `add-to-list' should not be used on locals:

Ok, thanks for the confirmation.  I've just applied Arash's patches
and fixed that by myself.

Bye,
Mosè

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] [PATCH] A fix for longtable and a new style

2015-09-27 Thread Mosè Giordano
Hi Arash,

2015-09-27 10:24 GMT+02:00 Arash Esbati :
> Hi all,
>
> please find attached 2 patches:
>
> * style/newfloat.el: New file.
>
> * style/longtable.el ("longtable"): Make package lengths available
> through `LaTeX-add-lengths' and not `TeX-add-symbol'.
>
> Any comments welcome.

Only a minor nitpicking: I think it's better to append entries to
`LaTeX-label-alist', because it's a customizable variable and if you
prepend elements to it you'll override possible custom settings.
`pushnew' can't append to variables, but my understanding is that it's
safer than `add-to-list' when it comes to let-bound variables (can
someone please confirm this?), but this isn't the case, so you could
safely use `add-to-list' with t `append' argument.

Bye,
Mosè

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] TeX output dimensions in ConTeXt

2015-09-27 Thread Mosè Giordano
Hi Carlos,

2015-09-27 22:08 GMT+02:00 Carlos :
> Mosè:
>
> I still think (point-min) is a better alternative than (point-max) since
> only a greater than > is required, that would jump right to where the warning 
> is
> at.  So far, in my end, until further notice:
>
> --- /context.el 2015-09-27 15:10:40.285263202 -0400
> +++ /context.el 2015-09-27 15:39:12.673222971 -0400
>
> @@ -570,22 +570,11 @@
>;; outputs. Just looking for "another run needed" would
>;; find the first occurence
>(goto-char (point-max))
> -  (re-search-backward "TeXUtil " nil t)
> -  (re-search-forward "another run needed" nil t))
> +   (setq TeX-recenter-output-buffer 'TeX-command-next)
>  (message (concat "You should run ConTeXt again "
> - "to get references right, "
> - (TeX-current-pages)))
> -(setq TeX-command-next TeX-command-default))
> -   ((re-search-forward "removed files :" nil t)
> -(message "sucessfully cleaned up"))
> -   ((re-search-forward "^ ?TeX\\(Exec\\|Util\\)" nil t) ;; strange 
> regexp --pg
> -(message (concat name ": successfully formatted "
> - (TeX-current-pages)))
> -(setq TeX-command-next TeX-command-Show))
> -   (t
> -(message (concat name ": problems after "
> - (TeX-current-pages)))
> -(setq TeX-command-next TeX-command-default
> + "to get references right,"
> +   (concat "formatted:"
> + (TeX-current-pages
>

This breaks things for people not using "context", doesn't it?

>  ;;; Environments
> @@ -1723,6 +1712,7 @@
>(setq TeX-sentinel-default-function 'TeX-ConTeXt-sentinel)
>(TeX-run-mode-hooks 'text-mode-hook 'TeX-mode-hook 'ConTeXt-mode-hook))
>
> +
>  (defun context-guess-current-interface ()
>"Guess what ConTeXt interface the current buffer is using."
>(interactive)
>
>
> --- /tex.el 2015-09-27 15:10:40.365263200 -0400
> +++ /tex.el 2015-09-27 15:47:27.657211341 -0400
> @@ -141,6 +141,9 @@
>  ("ConTeXt Full" "texexec %(extraopts) %(execopts)%t"
>   TeX-run-TeX nil
>   (context-mode) :help "Run ConTeXt until completion")
> +("MKIV" "context --synctex=1 %t"
> + TeX-run-TeX t
> + (context-mode) :help "")
>  ("BibTeX" "bibtex %s" TeX-run-BibTeX nil t :help "Run BibTeX")
>  ("Biber" "biber %s" TeX-run-Biber nil t :help "Run Biber")
>  ,(if (or window-system (getenv "DISPLAY"))

Are you sure "MKIV" is better and easier to recognize than "Mark IV"?
Please bear in mind I'm not in ConTeXt, I don't know its naming
conventions :-)

Bye,
Mosè

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] A question with regexps

2015-09-26 Thread Mosè Giordano
Hi Arash,

2015-09-26 16:19 GMT+02:00 Arash Esbati :
> Hi all,
>
> I have a question reg. building a regexp: I have a `newfloat.el' ready
> where I have:
>
> --8<---cut here---start->8---
> (defvar LaTeX-newfloat-DeclareFloatingEnvironment-regex
>   `(,(concat "DeclareFloatingEnvironment"
>  "[ \t\n\r%]*"
>  "\\["
>  "[ \t\n\r%{}a-zA-Z0-9=,]*"
>  "\\]"
>  "[ \t\n\r%]*"
>  "{\\([^}]+\\)}"
>  "[ %]*{\\([^}]*\\)}")
> (1 2) LaTeX-auto-newfloat-DeclareFloatingEnvironment)
>   "Matches the argument of `\\DeclareFloatingEnvironment' from
> `newfloat.sty'.")
> --8<---cut here---end--->8---
>
> The idea is to pass the type of new float-env to AUCTeX and process it,
> e.g.:
>
> --8<---cut here---start->8---
> \usepackage{newfloat}
>
> \DeclareFloatingEnvironment[
>   name=Code,
>   listname={List of Codes},
>   fileext=lol]{code}  %  {verbatim}
> --8<---cut here---end--->8---
>
> Currently, the definition above needs a mandatory `{'.  The downside is
> that if a user omits the opening brace, the regexp fails and it parses
> garbage until the next brace.

Sorry, I didn't get how the type of the environment is specified: it's
the first and only mandatory argument, isn't it?  Why one should omit
the opening brace?

Bye,
Mosè

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] A question with regexps

2015-09-26 Thread Mosè Giordano
2015-09-26 23:37 GMT+02:00 Arash Esbati <esb...@gmx.de>:
> Hi Mosè,
>
> Mosè Giordano <m...@gnu.org> writes:
>
>> 2015-09-26 16:19 GMT+02:00 Arash Esbati <esb...@gmx.de>:
>>>
>>> The idea is to pass the type of new float-env to AUCTeX and process it,
>>> e.g.:
>>>
>>> --8<---cut here---start->8---
>>> \usepackage{newfloat}
>>>
>>> \DeclareFloatingEnvironment[
>>>   name=Code,
>>>   listname={List of Codes},
>>>   fileext=lol]{code}  %  {verbatim}
>>> --8<---cut here---end--->8---
>>>
>>> Currently, the definition above needs a mandatory `{'.  The downside is
>>> that if a user omits the opening brace, the regexp fails and it parses
>>> garbage until the next brace.
>>
>> Sorry, I didn't get how the type of the environment is specified: it's
>> the first and only mandatory argument, isn't it?  Why one should omit
>> the opening brace?
>
> Thanks for your response and sorry for being unclear.  Let me rephrase
> that: The idea is to pass the type of a new float-env to AUCTeX as a
> TeX-comment enclosed in braces, e.g.
>
> --8<---cut here---start->8---
> \usepackage{newfloat}
>
> \DeclareFloatingEnvironment[
>   name=Code,
>   listname={List of Codes},
>   fileext=lol]{code}  %  {verbatim}
> % ^ {verbatim|figure|table}
> --8<---cut here---end--->8---

Probably it's just my fault because I don't know the package and its
syntax, but giving a (not very thorough) look at the documentation I
can't find this.

> I am looking at everything following the `{code}'.  My current
> definition fails if a user does something like:
>
> --8<---cut here---start->8---
> \usepackage{newfloat}
>
> \DeclareFloatingEnvironment[
>   name=Code,
>   listname={List of Codes},
>   fileext=lol]{code}
> %   ^ no `{' after this point
> --8<---cut here---end--->8---
>
> I hope it is more clear now.

Anyway, you can try using a shy group that may or may not be there:

  \\(?:[ %]*{\\([^}]*\\)}\\)?

The trick is "?" after the group.  Hope this helps.

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. 0ac0fa8ed3da67b02c7d8d5bf8ae6ac1a16cffd9

2015-09-26 Thread Mosè Giordano
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  0ac0fa8ed3da67b02c7d8d5bf8ae6ac1a16cffd9 (commit)
  from  3bb1cbebf8a40ee668742ecfa51497fadabe0855 (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 0ac0fa8ed3da67b02c7d8d5bf8ae6ac1a16cffd9
Author: Mosè Giordano <m...@gnu.org>
Date:   Sat Sep 26 23:41:02 2015 +0200

Avoid searching with kpathsea in duplicate directories.

* tex.el (TeX-search-files-kpathsea): Remove duplicates
directories.

diff --git a/ChangeLog b/ChangeLog
index f6cda86..aaa44d9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-09-26  Mosè Giordano  <m...@gnu.org>
+
+   * tex.el (TeX-search-files-kpathsea): Remove duplicates
+   directories.
+
 2015-09-26  Tassilo Horn  <t...@gnu.org>
 
* tex.el (TeX--prettify-symbols-compose-p): New function.
diff --git a/tex.el b/tex.el
index 912073d..c390d15 100644
--- a/tex.el
+++ b/tex.el
@@ -4248,10 +4248,11 @@ non-nil, remove file extension."
   (if (string-match ";" dirs) ";" ":")))
   (unless TeX-kpathsea-path-delimiter
 (throw 'no-kpathsea nil))
-  (setq dirs (delete "" (split-string
- dirs (concat "[\n\r"
-  TeX-kpathsea-path-delimiter
-  "]+"
+  (setq dirs (TeX-delete-duplicate-strings
+  (delete "" (split-string
+  dirs (concat "[\n\r"
+   TeX-kpathsea-path-delimiter
+   "]+")
   (if (eq scope 'global)
   (delete "." dirs))
   (setq extensions (concat "\\." (regexp-opt extensions t) "\\'")

---

Summary of changes:
 ChangeLog |5 +
 tex.el|9 +
 2 files changed, 10 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
GNU AUCTeX

___
auctex-diffs mailing list
auctex-di...@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-diffs


[AUCTeX-diffs] GNU AUCTeX branch, master, updated. a76afdf6fec49e2a81d5513aacc1700acb05c33a

2015-09-25 Thread Mosè Giordano
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  a76afdf6fec49e2a81d5513aacc1700acb05c33a (commit)
  from  3536b0645aebbac75f713cf7e2c9d052aaa4183f (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 a76afdf6fec49e2a81d5513aacc1700acb05c33a
Author: Mosè Giordano <m...@gnu.org>
Date:   Fri Sep 25 23:26:31 2015 +0200

Add abstract env only to classes defining it.

* latex.el (LaTeX-common-initialization): Remove "abstract"
environment, it is not defined in latex.ltx.

* style/amsart.el ("amsart"): Add "abstract" environment.

* style/amsbook.el ("amsbook"): Ditto.

* style/article.el ("article"): Ditto.

* style/memoir.el ("memoir"): Ditto.

* style/report.el ("report"): Ditto.

* style/scrartcl.el ("scrartcl"): Ditto.

* style/scrreprt.el ("scrreprt"): Ditto.

diff --git a/ChangeLog b/ChangeLog
index a585737..3fd1716 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,22 @@
+2015-09-25  Mosè Giordano  <m...@gnu.org>
+
+   * latex.el (LaTeX-common-initialization): Remove "abstract"
+   environment, it is not defined in latex.ltx.
+
+   * style/amsart.el ("amsart"): Add "abstract" environment.
+
+   * style/amsbook.el ("amsbook"): Ditto.
+
+   * style/article.el ("article"): Ditto.
+
+   * style/memoir.el ("memoir"): Ditto.
+
+   * style/report.el ("report"): Ditto.
+
+   * style/scrartcl.el ("scrartcl"): Ditto.
+
+   * style/scrreprt.el ("scrreprt"): Ditto.
+
 2015-09-24  Mosè Giordano  <m...@gnu.org>
 
* tex.el (TeX-doc): Use default argument of `completing-read'.
diff --git a/latex.el b/latex.el
index 2aa2d94..0db24fd 100644
--- a/latex.el
+++ b/latex.el
@@ -5971,7 +5971,7 @@ i.e. you do _not_ have to cater for this yourself by 
adding ' or $."
 
"sloppypar" "picture" "tabbing" "verbatim" "verbatim*"
"flushright" "flushleft" "displaymath" "math" "quote" "quotation"
-   "abstract" "center" "titlepage" "verse" "eqnarray*"
+   "center" "titlepage" "verse" "eqnarray*"
 
;; The following are not defined in latex.el, but in a number of
;; other style files.  I'm to lazy to copy them to all the
diff --git a/style/amsart.el b/style/amsart.el
index 8e3ae5c..26a054c 100644
--- a/style/amsart.el
+++ b/style/amsart.el
@@ -5,7 +5,8 @@
 (TeX-add-style-hook "amsart"
  (function
   (lambda ()
-(TeX-run-style-hooks "amsmath" "amsthm")))
+(TeX-run-style-hooks "amsmath" "amsthm")
+(LaTeX-add-environments "abstract")))
  LaTeX-dialect)
 
 ;;; amsart.el ends here.
diff --git a/style/amsbook.el b/style/amsbook.el
index 192b807..0bdbe3a 100644
--- a/style/amsbook.el
+++ b/style/amsbook.el
@@ -5,7 +5,8 @@
 (TeX-add-style-hook "amsbook"
  (function
   (lambda ()
-(TeX-run-style-hooks "amsmath" "amsthm")))
+(TeX-run-style-hooks "amsmath" "amsthm")
+(LaTeX-add-environments "abstract")))
  LaTeX-dialect)
 
 ;;; amsbook.el ends here.
diff --git a/style/article.el b/style/article.el
index d4842f1..4bfd881 100644
--- a/style/article.el
+++ b/style/article.el
@@ -14,7 +14,8 @@
(LaTeX-largest-level-set "section")
(LaTeX-add-counters "part" "section" "subsection" "subsubsection" 
"paragraph"
   "subparagraph" "figure" "table")
-   (LaTeX-add-pagestyles "headings" "myheadings"))
+   (LaTeX-add-pagestyles "headings" "myheadings")
+   (LaTeX-add-environments "abstract"))
  LaTeX-dialect)
 
 ;;; article.el ends here
diff --git a/style/memoir.el b/style/memoir.el
index 68b74dc..563adbe 100644
--- a/style/memoir.el
+++ b/style/memoir.el
@@ -65,6 +65,8 @@
 
 "leadpagetoclevel")
 
+   (LaTeX-add-environments "abstract")
+
;; Emulated packages.  The `memoir' class contains a list of files
;; emulated at the end of the class-file
(TeX-run-style-hooks
diff --git a/style/report.el b/style/report.el
index 6a4e638..7fa96b2 100644
--- a/style/report.el
+++ b/style/report.el
@@ -11,11 +11,12 @@
 
 (TeX-add-st

Re: [AUCTeX-devel] TeX output dimensions in ConTeXt

2015-09-25 Thread Mosè Giordano
Hi Carlos,

2015-09-24 5:36 GMT+02:00 Carlos :
> You asked "what's wrong with ConTeXt Full?".
>
> I guess nothing is wrong, if the document was compiled with it a while
> ago.
>
> I also think that if ("context full") returns an error such as "no
> more errors", when there are errors, something is not right.

We don't have an error parser for ConTeXt.  If nothing tells AUCTeX
there are errors, AUCTeX will tell you there are no errors even if
errors are there.

> I'm not quite sure either, how far back, is mark iv compatible with
> it. I wouldn't put all the eggs in a basket.
>
> I know you don't like elimination of code. And you have made your
> position about it, clear enough.
>
> Fine. But I don't see why a "mark iv"definition in auctex, is not
> added.

I should know first what "mark iv" is before having a position on it
:-)  I'm open to any improvement, it's just I don't know anything
about ConTeXt, sorry.  What should be avoided is breaking user's
settings, for example by changing a command in `TeX-command-list'.
Ok, we did break something from time to time, but not too frequently.

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. 3536b0645aebbac75f713cf7e2c9d052aaa4183f

2015-09-24 Thread Mosè Giordano
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  3536b0645aebbac75f713cf7e2c9d052aaa4183f (commit)
  from  9cfd5d895aad0fa2399f5fcca7f3a08c0a153f20 (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 3536b0645aebbac75f713cf7e2c9d052aaa4183f
Author: Mosè Giordano <m...@gnu.org>
Date:   Thu Sep 24 14:45:08 2015 +0200

Use default argument of completing-read.

* tex.el (TeX-doc): Use default argument of `completing-read'.

diff --git a/ChangeLog b/ChangeLog
index 94040d4..a585737 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2015-09-24  Mosè Giordano  <m...@gnu.org>
+
+   * tex.el (TeX-doc): Use default argument of `completing-read'.
+
 2015-09-22  Tassilo Horn  <t...@gnu.org>
 
* latex.el (LaTeX-find-matching-end): Find correct end when point
diff --git a/tex.el b/tex.el
index 1c9b95b..e7c54be 100644
--- a/tex.el
+++ b/tex.el
@@ -6120,13 +6120,12 @@ NAME may be a package, a command, or a document."
  (dolist (elt docs)
(setq completions (nconc (mapcar 'list (car elt)) completions)))
  ;; Query user.
- (setq doc (completing-read
-(if contained
-(format "Package, command, or document (default %s): "
-symbol)
-  "Package, command, or document: ")
-completions))
- (setq name (if (string= doc "") symbol doc
+ (setq name (completing-read
+ (if contained
+ (format "Package, command, or document (default %s): "
+ symbol)
+   "Package, command, or document: ")
+ completions nil nil nil nil symbol
   (if (not name)
  (message "No documentation specified")
;; XXX: Provide way to choose in case a symbol can be found in

---

Summary of changes:
 ChangeLog |4 
 tex.el|   13 ++---
 2 files changed, 10 insertions(+), 7 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] TeX output dimensions in ConTeXt

2015-09-23 Thread Mosè Giordano
Hi Carlos,

2015-09-22 14:44 GMT+02:00 Carlos :
>
> I'm having a problem with the frame output dimensions of the window.
> Or the output buffer of a file.
>
> This is something undesirable, not from an aesthetic point of view, but
> from  following up with errors, warnings, and the whole family, which
> results throughout the compilation of a document.
>
> It is a known fact, that TeX-source-correlate-mode is
> not to have a true value for mtxrun to perform inverse
> searches. It might be the case that it's a necessity for its LaTeX
> counterpart. It is also a known fact, that at least in one system,
> dbus-forward had problems.
>
> But the problem here are dimensions with the output window. Why? Because
> if I'm looking at an error, it's inconvenient to have to enter a greater
> than less than symbols,  or whatever you want to call them, to go to the
> top level of a file, or to the bottom level of said file.
>
> I want to go right to where the error is, and not wander around, because
> then, it no longer is convenient, and my fingers get tired.
>
> I'd  pretty much like to have my dear emacs, to display the error, right
> at level reach. Yes. like this : >> undefined control sequence, bla bla
> bla.
>
> And see it right away, instead of having to enter < or > to go top or
> bottom of buffers.
>
> Other than that, I can't complaint.
>
> TeX-correlate-mode is not necessary, although I have set it true in the
> initialization file.
>
> Okular is working flawlessly. C-c C-v is behaving accordingly.
>
> I just had to spread out some lines in context.el and added the option
> --synctex to context's TeX-command-list. Texec is working great
> too. Although in all honesty, except for documents that might have been
> compiled with that wrapper, is not known whether it is a good idea, to
> have it laying around. Why? I'll tell you why, because it is identified
> as ConTeXt but unfortunately points out to texexec. And this means that
> most new documents will not utilize the great features of lua as it is
> being implemented now.
>
> Anyhow, the above was just a rant I guess.
>
> (defun TeX-ConTeXt-sentinel (process name)
>   "Cleanup TeX output buffer after running ConTeXt."
>   (cond ((TeX-TeX-sentinel-check process name))
> ((save-excursion
>;; in a full ConTeXt run there will multiple texutil
>;; outputs. Just looking for "another run needed" would
>;; find the first occurence
>(goto-char (point-max))
>   (re-search-backward "TeXUtil" nil t)
>   (re-search-forward "another run needed" nil t)
>   (message "%s" (concat "ConTeXt successfully formatted"
> (TeX-current-pages)
>(message (concat "You should run ConTeXt again"
> "to get references right."
> (message "successfully 
> finished")))
> (TeX-current-pages)
> (setq TeX-command-Show)))
>
>
> in context.el

Indeed ConTeXt needs a sentinel function, but probably also a reliable
error parser, I'm not sure it can use `TeX-parse-error', or not?

> and the following
>
> ("ConTeXt Full" "context --synctex %t"
>  TeX-run-TeX t
>  (context-mode) :help "Run ConTeXt until completion")
>
> in tex.el

Probably we already asked you, but what's wrong with default "ConTeXt
Full" definition in AUCTeX?

Bye,
Mosè

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] build of xemacs pkg fails for

2015-09-20 Thread Mosè Giordano
Hi Uwe,

this should be fixed now, thanks for having spotted it!  File auto.el
had been removed but a reference to it was still there in Makefile.
Now I can build the XEmacs package successfully, but I didn't test if
it actually works.  Could you please do this?

Bye,
Mosè


2015-09-18 17:25 GMT+02:00 Uwe Brauer :
>
>> Hi Uwe,
>> 2015-09-17 21:51 GMT+02:00 Uwe Brauer :
>
>> xemacs-package rule hasn't really been thought to be used with a
>> non-tagged commit, I think it's easier to create a package by making a
>> fake release-commit instead of cloning twice the repository.  BTW, why
>> don't you just copy the directory instead of pulling the remote
>> repository again?
>
> Uff I think laziness.
>
>> Also when creating a fake release-commit I can confirm your error,
>> which isn't issued when creating the package for release 11.88.  I'll
>> need some time to debug this, probably a week, unless someone else
>> finds the culprit before me :-)
>
> Ok, thanks take your time. I am using more and more GNU emacs instead of
> Xemacs. :-D :'(
>

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


[AUCTeX-diffs] GNU AUCTeX branch, master, updated. 4cfe30ea8ae4f8a54c2f5af603680f207c4c8a6a

2015-09-20 Thread Mosè Giordano
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  4cfe30ea8ae4f8a54c2f5af603680f207c4c8a6a (commit)
  from  5ed22c093e0310c4ad3d7adbfb0b34392486e545 (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 4cfe30ea8ae4f8a54c2f5af603680f207c4c8a6a
Author: Mosè Giordano <m...@gnu.org>
Date:   Sun Sep 20 23:03:11 2015 +0200

Do not reference auto.el in Makefile and gitignore.

* .gitignore: Do not ignore auto.el.

* Makefile.in (install-metadata): auto.el is not there anymore,
we do not need to test if preview is enabled here.

diff --git a/.gitignore b/.gitignore
index 87ee433..a79d419 100644
--- a/.gitignore
+++ b/.gitignore
@@ -23,7 +23,6 @@ doc/preview-dtxdoc.texi
 doc/preview-latex.info
 doc/tex-ref.pdf
 doc/version.texi
-auto.el
 latex/prauctex.cfg
 latex/prauctex.def
 latex/prcounters.def
diff --git a/ChangeLog b/ChangeLog
index 7a90c90..5ad0ddf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2015-09-20  Mosè Giordano  <m...@gnu.org>
+
+   * .gitignore: Do not ignore auto.el.
+
+   * Makefile.in (install-metadata): auto.el is not there anymore,
+   we do not need to test if preview is enabled here.
+
 2015-09-19  Tassilo Horn  <t...@gnu.org>
 
* tex-buf.el (TeX-error-overview): Fix typo in error message.
diff --git a/Makefile.in b/Makefile.in
index bc30c05..5b689b1 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -344,11 +344,7 @@ install-auto:
 install-metadata:
test "x$(packagedir)" = xno || { \
  $(MKINSTALLDIRS) $(DESTDIR)$(packagedir)/pkginfo || : ; \
- if test "x$(preview_enabled)" = xyes; then \
-   $(ELCC) -l prv-install -f preview-make-package 
$(DESTDIR)$(packagedir) "$(PACKAGE)" \"`echo $(AUCTEXDATE)|sed 
's/\(.*\)-\(.*\)-\(.*\)/\1.\2\3/'`\" \"$(AUCTEXVERSION)\" tex-site.el auto.el; \
- else \
-   $(ELCC) -l prv-install -f preview-make-package 
$(DESTDIR)$(packagedir) "$(PACKAGE)" \"`echo $(AUCTEXDATE)|sed 
's/\(.*\)-\(.*\)-\(.*\)/\1.\2\3/'`\" \"$(AUCTEXVERSION)\" tex-site.el; \
- fi && \
+ $(ELCC) -l prv-install -f preview-make-package 
$(DESTDIR)$(packagedir) "$(PACKAGE)" \"`echo $(AUCTEXDATE)|sed 
's/\(.*\)-\(.*\)-\(.*\)/\1.\2\3/'`\" \"$(AUCTEXVERSION)\" tex-site.el && \
  cd $(DESTDIR)$(packagedir) && \
  find "etc/$(PACKAGE)" "lisp/$(PACKAGE)" -print 
>"pkginfo/MANIFEST.$(PACKAGE)" && \
  for i in $(PACKAGE_INFO); do \

---

Summary of changes:
 .gitignore  |1 -
 ChangeLog   |7 +++
 Makefile.in |6 +-
 3 files changed, 8 insertions(+), 6 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] build of xemacs pkg fails for

2015-09-18 Thread Mosè Giordano
Hi Uwe,

2015-09-17 21:51 GMT+02:00 Uwe Brauer :
> Hello
>
> I just wanted to see whether I could built an unoffical xemacs with
> git.[1]
>
> I did this successfully in the past following the following steps:
>
> Say in ~/xemacs/site-list-packages/src I do
>
> git clone git://git.savannah.gnu.org/auctex.git
>
> cd auctex
>
> ./autogen.sh
>
> git clone git://git.savannah.gnu.org/auctex.git
>
>
> mv auctex auctex-11.88-git
>
>  cd auctex-11.88-git
>
> ./autogen.sh
>
> cd ..
>
>
> ./configure --with-xemacs=/usr/local/bin/xemacs 
> --with-packagedir=~/.xemacs/xemacs-packages
>
> make
>
> make xemacs-package FTPDIR=~/tmp TAG=11.88-git

xemacs-package rule hasn't really been thought to be used with a
non-tagged commit, I think it's easier to create a package by making a
fake release-commit instead of cloning twice the repository.  BTW, why
don't you just copy the directory instead of pulling the remote
repository again?

> However I obtained the following error message
>
> xemacs exiting.
> Opening input file: "No such file or directory",
> "/home/oub/xemacs/site-lisp/packages/src/auctex/xemacs-build/auto.el"make[2]: 
> *** [install-metadata] Error 255
> make[2]: Leaving directory 
> `/home/oub/ALLES/xemacs/site-lisp/packages/src/auctex/xemacs-build'
> make[1]: *** [install] Error 2
> make[1]: Leaving directory 
> `/home/oub/ALLES/xemacs/site-lisp/packages/src/auctex/xemacs-build'
> make: *** [xemacs-package] Error 2
>
> Do I miss something?

Also when creating a fake release-commit I can confirm your error,
which isn't issued when creating the package for release 11.88.  I'll
need some time to debug this, probably a week, unless someone else
finds the culprit before me :-)

Bye,
Mosè

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] serious keybinding problem

2015-09-15 Thread Mosè Giordano
Hi Uwe,

2015-09-15 12:34 GMT+02:00 Uwe Brauer :
> Hello
>
>
> I am currently facing two problems:
>
>
> - I always thought that local-key-binding via hook replaces the
>   global-key-binding (at least so it is in Xemacs) now in GNU Emacs I have
>   set (global-set-key "\C-cr" 'ispell-region)
>   (setq reftex-extra-bindings t)
>   which according to the documentation should bind
>   \C-cr to reftex-reference etc. It dos not
>
> -  But I also have set
>
> (add-hook 'LaTeX-mode-hook 'my-latex-mode-key)
>
> (defun my-latex-mode-key ()
>   "Setting of the following keys"
>   (interactive)
>   (local-set-key [(control right)] 'my-turn-bidi-on)
>   (local-set-key [(control left)] 'my-turn-bidi-off)
>   (local-set-key [(f31)]   'TeX-fold-buffer)
>   (local-set-key [(f30)]   'TeX-fold-clearout-buffer)
>   (local-set-key [(control f30)] 'preview-clearout-buffer))
>
> However this binding is ignored, the global-key-binding is taken
> instead.
>
> I have to evaluate the function my-latex-mode-key and then switch latex
> mode off and on. Very annoying.

I can't reproduce your problem in Emacs 24.5 (and I don't think this
bug, if exists, has anything to do with AUCTeX).

If I know map name, I usually set local keys with

--8<---cut here---start->8---
(eval-after-load "latex"
  '(progn
 (define-key LaTeX-mode-map [(control right)] 'my-turn-bidi-on)
 (define-key LaTeX-mode-map [(control left)] 'my-turn-bidi-off)
 (define-key LaTeX-mode-map [(f31)]   'TeX-fold-buffer)
 (define-key LaTeX-mode-map [(f30)]   'TeX-fold-clearout-buffer)
 (define-key LaTeX-mode-map [(control f30)] 'preview-clearout-buffer)))
--8<---cut here---end--->8---

Bye,
Mosè

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] prettify-symbols-mode and quad

2015-09-15 Thread Mosè Giordano
2015-09-15 15:55 GMT+02:00 Tassilo Horn <t...@gnu.org>:
> Mosè Giordano <m...@gnu.org> writes:
>
>>>>> Indeed, \quad is displayed as a whitespace.  That's kinda right
>>>>> because it produces a whitespace as wide as the letter m but of
>>>>> course it's probably inconvenient when editing.
>>>>
>>>>> Hm, what would you prefer instead?
>>>>
>>>>>   ‘␠’  SYMBOL FOR SPACE
>>>>>   ‘␣’  OPEN BOX
>>>>>   ‘␢’  BLANK SYMBOL
>>>>
>>>>
>>>>
>>>> IMHO:
>>>>  ‘␣’  OPEN BOX
>>>
>>> Ok, I've committed a patch which makes \quad display as ␣.
>>
>> Did you also push to upstream repo?  I can't see it  :-)
>
> Yes, see:
>
> http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=40d3a151c281f841fb2b34a8c4ccdd3a80de908f
>
> So the change is to Emacs not AUCTeX.

Oh, sorry, I thought it was AUCTeX' repo.  Today I'm receiving mails
from mailing list with random delay each, I was wondering whether
there was lag also for commits in repos.

Bye,
Mosè

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] prettify-symbols-mode and quad

2015-09-15 Thread Mosè Giordano
Hi Tassilo,

2015-09-15 14:13 GMT+02:00 Tassilo Horn :
> Uwe Brauer  writes:
>
>>> Indeed, \quad is displayed as a whitespace.  That's kinda right
>>> because it produces a whitespace as wide as the letter m but of
>>> course it's probably inconvenient when editing.
>>
>>> Hm, what would you prefer instead?
>>
>>>   ‘␠’  SYMBOL FOR SPACE
>>>   ‘␣’  OPEN BOX
>>>   ‘␢’  BLANK SYMBOL
>>
>>
>>
>> IMHO:
>>  ‘␣’  OPEN BOX
>
> Ok, I've committed a patch which makes \quad display as ␣.

Did you also push to upstream repo?  I can't see it  :-)

Bye,
Mosè

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] [PATCH] New styles

2015-09-13 Thread Mosè Giordano
Hi Arash,

2015-09-13 21:01 GMT+02:00 Arash Esbati :
> Hi Mosč,
>
> Mosč Giordano  writes:
>
>> 2015-09-12 20:27 GMT+02:00 Arash Esbati :
>
>>> All always, any comments welcome.
>>
>> Indeed I have a comment: avoid using the name
>> "LaTeX-*-package-options" for both a variable and a function, there
>> have been problems in the past
> [...]
>
> Thanks for your comment.  I had the impression it is common practice in
> AUCTeX to give the variable and the function the same name.

Where for example?  Anyway, it depends on the specific case: in this
one, `LaTeX-arg-usepackage-read-packages-with-options' expects a
variable or a function by that name, so you may want to be sure only
the function is picked up to avoid any possible problem.  In other
cases only the function or the variable may be expected, so having
them with the same name does no harm.  To tell the truth,
`LaTeX-arg-usepackage-read-packages-with-options' tries the function
first, and this is what you want, I can't remember now what particular
problem I had with biblatex options.

>> Use "LaTeX-*-package-options-list" for the variable instead.
>
> Done.  I've also updated `eso-pic.el'.  Please find attached the new
> change sets.

Thanks, installed!

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. 05cf5be810abefa37d04fa7443ddfb1ef0edbb50

2015-09-13 Thread Mosè Giordano
ds support for `AlegreyaSans.sty' (v2015/09/02).
+;; `AlegreyaSans.sty' is part of TeXLive.
+
+;;; Code:
+
+(TeX-add-style-hook
+ "AlegreyaSans"
+ (lambda ()
+
+   ;; Run style hook for packages loaded by AlegreyaSans
+   (TeX-run-style-hooks "textcomp")
+
+   ;; Load `fontaxes' or `fontspec' dep. on `type1' option:
+   (if (or (LaTeX-provided-package-options-member "AlegreyaSans" "type1")
+  (LaTeX-provided-package-options-member "AlegreyaSans" "type1=true"))
+   (TeX-run-style-hooks "fontaxes")
+ (TeX-run-style-hooks "fontspec"))
+
+   (TeX-add-symbols
+;; Should be used in preamble only
+'("useosf")
+;; Text commands
+'("AlegreyaSans"   -1)
+'("AlegreyaSansLF" -1)
+'("AlegreyaSansOsF"-1)
+'("AlegreyaSansTLF"-1)
+'("AlegreyaSansTOsF"   -1)
+'("AlegreyaSansThin"   -1)
+'("AlegreyaSansLight"  -1)
+'("AlegreyaSansMedium" -1)
+'("AlegreyaSansExtraBold"  -1)
+'("AlegreyaSansBlack"  -1)
+'("AlegreyaSansSC" -1)
+'("textsu"  t)  ; superior figures
+'("sufigures"  -1)  ;
+'("textin"  t)  ; inferior figures
+'("infigures"  -1))
+
+   ;; Fontification
+   (when (and (featurep 'font-latex)
+ (eq TeX-install-font-lock 'font-latex-setup))
+ (font-latex-add-keywords '(("textsu""{")
+   ("textin""{"))
+ 'type-command)
+ (font-latex-add-keywords '(("AlegreyaSans"   "")
+   ("AlegreyaSansLF" "")
+   ("AlegreyaSansOsF""")
+   ("AlegreyaSansTLF""")
+   ("AlegreyaSansTOsF"   "")
+   ("AlegreyaSansLight"  "")
+   ("AlegreyaSansMedium" "")
+   ("AlegreyaSansExtraBold"  "")
+   ("AlegreyaSansBlack"  "")
+   ("AlegreyaSansSC" "")
+   ("sufigures"  "")
+   ("infigures"  ""))
+ 'type-declaration)))
+ LaTeX-dialect)
+
+(defvar LaTeX-AlegreyaSans-package-options-list
+  '(("lining"   ("true" "false"))
+("lf"   ("true" "false"))
+("oldstyle" ("true" "false"))
+("osf"  ("true" "false"))
+("tabular"  ("true" "false"))
+("tf"   ("true" "false"))
+("proportional" ("true" "false"))
+("pf"   ("true" "false"))
+("black"("true" "false"))
+("extrabold"("true" "false"))
+("thin"     ("true" "false"))
+("light"("true" "false"))
+("medium"   ("true" "false"))
+("type1"("true" "false"))
+("sfdefault"("true" "false"))
+("scaled")
+("scale"))
+  "Package options for the AlegreyaSans package.")
+
+(defun LaTeX-AlegreyaSans-package-options ()
+  "Prompt for package options for the AlegreyaSans package."
+  (TeX-read-key-val t LaTeX-AlegreyaSans-package-options-list))
+
+;;; AlegreyaSans.el ends here

commit 4810753449ceae60763d84f56fa793a0c1ff304d
Author: Arash Esbati <esb...@gmx.de>
Date:   Sun Sep 13 20:38:04 2015 +0200

Add new style Alegreya.el.

* Makefile.in (STYLESRC): Add new style.

* style/Alegreya.el: New file.

Signed-off-by: Mosè Giordano <m...@gnu.org>

diff --git a/ChangeLog b/ChangeLog
index e1b72a6..00424fe 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,10 @@
 
* Makefile.in (STYLESRC): Add new style.
 
+   * style/Alegreya.el: New file.
+
+   * Makefile.in (STYLESRC): Add new style.
+
* style/fontenc.el: New file.
 
 2015-09-10  Mosè Giordano  <m...@gnu.org>
diff --git a/Makefile.in b/Makefile.in
index 2a11b68..b6de1e6 100644
--- a/Makefil

Re: [AUCTeX-devel] [PATCH] New styles

2015-09-12 Thread Mosè Giordano
Hi Arash!

2015-09-12 20:27 GMT+02:00 Arash Esbati :
> Hi all,
>
> please find attached 3 patches adding the following new styles:
>
> * style/AlegreyaSans.el: New file.
>
> * style/Alegreya.el: New file.
>
> * style/fontenc.el: New file.
>
> All always, any comments welcome.

Indeed I have a comment: avoid using the name
"LaTeX-*-package-options" for both a variable and a function, there
have been problems in the past, see for example commit

* 9e64e4f (2013-02-18)  * style/biblatex.el ("biblatex"): Add
  hooks for loaded packages.

(http://git.savannah.gnu.org/gitweb/?p=auctex.git;a=commitdiff;h=9e64e4f2bf39fce921c1f99d9ab17a7d1a9d).
Use "LaTeX-*-package-options-list" for the variable instead.

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. f4c5af9a2bfb64fc62a6319c903f7a96dc9052a8

2015-09-10 Thread Mosè Giordano
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  f4c5af9a2bfb64fc62a6319c903f7a96dc9052a8 (commit)
  from  066cf5aa198969206e1cfdc58e3ea71f0e69d2f6 (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 f4c5af9a2bfb64fc62a6319c903f7a96dc9052a8
Author: Mosè Giordano <m...@gnu.org>
Date:   Thu Sep 10 12:13:34 2015 +0200

Fix loading of polyglossia language style files.

* style/polyglossia.el (LaTeX-polyglossia-prepare): Clear
`LaTeX-polyglossia-lang-list'.
(LaTeX-polyglossia-cleanup): Remove clearing of
`LaTeX-polyglossia-lang-list'.
(TeX-update-style-hook): Append
`LaTeX-polyglossia-load-languages'.
("polyglossia"): Remove `LaTeX-polyglossia-load-languages' from
here.

diff --git a/ChangeLog b/ChangeLog
index 9e474fe..71f2b57 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2015-09-10  Mosè Giordano  <m...@gnu.org>
+
+   * style/polyglossia.el (LaTeX-polyglossia-prepare): Clear
+   `LaTeX-polyglossia-lang-list'.
+   (LaTeX-polyglossia-cleanup): Remove clearing of
+   `LaTeX-polyglossia-lang-list'.
+   (TeX-update-style-hook): Append
+   `LaTeX-polyglossia-load-languages'.
+   ("polyglossia"): Remove `LaTeX-polyglossia-load-languages' from
+   here.
+
 2015-09-09  Mosè Giordano  <m...@gnu.org>
 
* style/polyglossia.el: Remove
diff --git a/style/polyglossia.el b/style/polyglossia.el
index 1254f28..86d0add 100644
--- a/style/polyglossia.el
+++ b/style/polyglossia.el
@@ -59,9 +59,10 @@
   "Temporary for parsing polyglossia language options.")
 
 (defun LaTeX-polyglossia-prepare ()
-  "Clear `LaTex-auto-polyglossia-lang' before use."
+  "Clear some polyglossia variables before use."
   (setq LaTeX-auto-polyglossia-lang nil
-   LaTeX-auto-polyglossia-setkeys nil))
+   LaTeX-auto-polyglossia-setkeys nil
+   LaTeX-polyglossia-lang-list nil))
 
 (defun LaTeX-polyglossia-cleanup ()
   "Move languages and their options from
@@ -84,7 +85,6 @@
   ;; the polyglossia command which set the language, the rest of values is the
   ;; list of options given to the language.
   (let (opts otheropts)
-(setq LaTeX-polyglossia-lang-list nil)
 (mapc
  (lambda (elt)
(mapc
@@ -109,6 +109,9 @@
 (add-hook 'TeX-auto-prepare-hook #'LaTeX-polyglossia-prepare)
 (add-hook 'TeX-auto-cleanup-hook #'LaTeX-polyglossia-cleanup)
 (add-hook 'TeX-update-style-hook #'TeX-auto-parse t)
+;; Run style hooks for every active language.  This *has* to be done after
+;; `TeX-auto-parse'.
+(add-hook 'TeX-update-style-hook #'LaTeX-polyglossia-load-languages t)
 
 (defvar LaTeX-polyglossia-language-list
   '("albanian" "amharic" "arabic" "armenian" "asturian" "bahasai" "bahasam"
@@ -230,10 +233,6 @@ argument, otherwise as a mandatory one."
 `(,LaTeX-polyglossia-lang-regexp (3 1 2) LaTeX-auto-polyglossia-lang))
(TeX-auto-add-regexp
 `(,LaTeX-polyglossia-setkeys-regexp (1 2) LaTeX-auto-polyglossia-setkeys))
-   ;; Run style hooks for every active language.  FIXME: actually
-   ;; `LaTeX-polyglossia-active-languages' returns nil here, so no style hook 
is
-   ;; automatically loaded.
-   (LaTeX-polyglossia-load-languages)
(TeX-run-style-hooks "etoolbox" "makecmds" "xkeyval" "fontspec")
(TeX-add-symbols
 '("setdefaultlanguage" (LaTeX-arg-polyglossia-lang  t  nil nil))

---

Summary of changes:
 ChangeLog|   11 +++
 style/polyglossia.el |   13 ++---
 2 files changed, 17 insertions(+), 7 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] Check engines before running LaTeX

2015-09-10 Thread Mosè Giordano
2015-09-09 18:15 GMT+02:00 Mosè Giordano <m...@gnu.org>:
> I've been too enthusiastic about my polyglossia style file.  It had a
> minor bug (a missing * in a regexp), but the major problem is that it
> doesn't load automatically language style files.  This has probably to
> do with when cleanup function is run, I'll try to inspect later today
> or tomorrow.

It should be fixed now!  The trick was to append
`LaTeX-polyglossia-load-languages' to `TeX-update-style-hook', so it's
correctly run after `LaTeX-polyglossia-cleanup'.

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. 8359f08793dd7c55cb9c572ea1ed8b26349a22c7

2015-09-10 Thread Mosè Giordano
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  8359f08793dd7c55cb9c572ea1ed8b26349a22c7 (commit)
  from  2b648fee000ed62c5a9491eb7a710c75a3f95b96 (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 8359f08793dd7c55cb9c572ea1ed8b26349a22c7
Author: Mosè Giordano <m...@gnu.org>
Date:   Thu Sep 10 13:24:44 2015 +0200

Fix in Italian language polyglossia style file.

* style/gloss-italian.el ("gloss-italian"): Fix "textitalian"
macro and "italian" environment arguments.

diff --git a/ChangeLog b/ChangeLog
index 71f2b57..f439bec 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2015-09-10  Mosè Giordano  <m...@gnu.org>
 
+   * style/gloss-italian.el ("gloss-italian"): Fix "textitalian"
+   macro and "italian" environment arguments.
+
* style/polyglossia.el (LaTeX-polyglossia-prepare): Clear
`LaTeX-polyglossia-lang-list'.
(LaTeX-polyglossia-cleanup): Remove clearing of
diff --git a/style/gloss-italian.el b/style/gloss-italian.el
index a93049a..c786bb4 100644
--- a/style/gloss-italian.el
+++ b/style/gloss-italian.el
@@ -36,9 +36,10 @@
  "gloss-italian"
  (lambda ()
(TeX-add-symbols
-'("textitalian" [TeX-arg-key-val LaTeX-polyglossia-italian-options-list]))
+'("textitalian" [TeX-arg-key-val LaTeX-polyglossia-italian-options-list] 
t))
(LaTeX-add-environments
-'("italian" [TeX-arg-key-val LaTeX-polyglossia-italian-options-list]))
+'("italian"
+  LaTeX-env-args [TeX-arg-key-val LaTeX-polyglossia-italian-options-list]))
 
(when (or (LaTeX-polyglossia-lang-option-member "italian" 
"babelshorthands=true")
 (LaTeX-polyglossia-lang-option-member "italian" "babelshorthands"))

---

Summary of changes:
 ChangeLog  |3 +++
 style/gloss-italian.el |5 +++--
 2 files changed, 6 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
GNU AUCTeX

___
auctex-diffs mailing list
auctex-di...@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-diffs


[AUCTeX-diffs] GNU AUCTeX branch, master, updated. 2b648fee000ed62c5a9491eb7a710c75a3f95b96

2015-09-10 Thread Mosè Giordano
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  2b648fee000ed62c5a9491eb7a710c75a3f95b96 (commit)
  from  f4c5af9a2bfb64fc62a6319c903f7a96dc9052a8 (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 2b648fee000ed62c5a9491eb7a710c75a3f95b96
Author: Mosè Giordano 
Date:   Thu Sep 10 12:52:30 2015 +0200

Remove one TODO in style/polyglossia.el.

diff --git a/style/polyglossia.el b/style/polyglossia.el
index 86d0add..6e902a4 100644
--- a/style/polyglossia.el
+++ b/style/polyglossia.el
@@ -32,8 +32,6 @@
 ;;  -- Create language specific styles with names `gloss-.el'.  They
 ;; should add `text' macros, `' environments (`Arabic' for
 ;; `arabic' language), and the others language-specific commands.
-;;
-;;  -- Make autoloading of these style files really work.
 
 ;;; Code:
 

---

Summary of changes:
 style/polyglossia.el |2 --
 1 files changed, 0 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
GNU AUCTeX

___
auctex-diffs mailing list
auctex-di...@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-diffs


[AUCTeX-diffs] GNU AUCTeX branch, master, updated. 066cf5aa198969206e1cfdc58e3ea71f0e69d2f6

2015-09-09 Thread Mosè Giordano
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  066cf5aa198969206e1cfdc58e3ea71f0e69d2f6 (commit)
  from  5dd4f21cf5c044743552232fc01b65932edd9b1a (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 066cf5aa198969206e1cfdc58e3ea71f0e69d2f6
Author: Mosè Giordano <m...@gnu.org>
Date:   Wed Sep 9 18:06:09 2015 +0200

Create Italian style file for polyglossia.

* style/polyglossia.el: Remove
`LaTeX-polyglossia-italian-options-list', moved to
gloss-italian.el.
(LaTeX-polyglossia-setkeys-regexp): Fix regexp.
(LaTeX-polyglossia-cleanup): Remove useless let-bound variables
and set `LaTeX-polyglossia-lang-list'.
(LaTeX-polyglossia-active-languages)
(LaTeX-polyglossia-lang-option-member): Use
`LaTeX-polyglossia-lang-list' variable instead of function.
(LaTeX-polyglossia-load-languages): New function.
("polyglossia"): Use it.

* style/gloss-italian.el: New style file.

* Makefile.in (STYLESRC): Activate it.

diff --git a/ChangeLog b/ChangeLog
index cb5f7de..9e474fe 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,21 @@
 2015-09-09  Mosè Giordano  <m...@gnu.org>
 
+   * style/polyglossia.el: Remove
+   `LaTeX-polyglossia-italian-options-list', moved to
+   gloss-italian.el.
+   (LaTeX-polyglossia-setkeys-regexp): Fix regexp.
+   (LaTeX-polyglossia-cleanup): Remove useless let-bound variables
+   and set `LaTeX-polyglossia-lang-list'.
+   (LaTeX-polyglossia-active-languages)
+   (LaTeX-polyglossia-lang-option-member): Use
+   `LaTeX-polyglossia-lang-list' variable instead of function.
+   (LaTeX-polyglossia-load-languages): New function.
+   ("polyglossia"): Use it.
+
+   * style/gloss-italian.el: New style file.
+
+   * Makefile.in (STYLESRC): Activate it.
+
* style/polyglossia.el: New style file.
 
* Makefile.in (STYLESRC): Activate it.
diff --git a/Makefile.in b/Makefile.in
index d080257..68b785a 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -150,7 +150,8 @@ STYLESRC = style/prosper.el \
   style/mn2e.el  style/colortbl.el  style/attachfile.el \
   style/newpxtext.el style/newpxmath.el style/pdfpages.el \
   style/mnras.el style/environ.el   style/polyglossia.el \
-  style/vwcol.el style/textpos.el   style/transparent.el
+  style/vwcol.el style/textpos.el   style/transparent.el \
+  style/gloss-italian.el
 
 STYLEELC = $(STYLESRC:.el=.elc)
 
diff --git a/style/gloss-italian.el b/style/gloss-italian.el
new file mode 100644
index 000..a93049a
--- /dev/null
+++ b/style/gloss-italian.el
@@ -0,0 +1,67 @@
+;;; gloss-italian.el --- Italian support for polyglossia package.
+
+;; Copyright (C) 2015 Free Software Foundation, Inc.
+
+;; Maintainer: auctex-devel@gnu.org
+;; Author: Mosè Giordano <m...@gnu.org>
+;; Keywords: tex
+
+;; This file is part of AUCTeX.
+
+;; AUCTeX is free software; you can redistribute it and/or modify it
+;; under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 3, or (at your option)
+;; any later version.
+
+;; AUCTeX is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+;; General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with AUCTeX; see the file COPYING.  If not, write to the Free
+;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+;; 02110-1301, USA.
+
+;;; Commentary:
+
+;; This is based on italian.el style file, adapted to polyglossia package.
+
+;;; Code:
+
+(defvar TeX-language-it-hook nil
+  "Hook run for Italian texts.")
+
+(TeX-add-style-hook
+ "gloss-italian"
+ (lambda ()
+   (TeX-add-symbols
+'("textitalian" [TeX-arg-key-val LaTeX-polyglossia-italian-options-list]))
+   (LaTeX-add-environments
+'("italian" [TeX-arg-key-val LaTeX-polyglossia-italian-options-list]))
+
+   (when (or (LaTeX-polyglossia-lang-option-member "italian" 
"babelshorthands=true")
+(LaTeX-polyglossia-lang-option-member "italian" "babelshorthands"))
+ (unless (eq (car TeX-quote-language) 'override)
+   (let ((open-quote (if (and (boundp 'LaTeX-italian-open-quote)
+ LaTeX-italian-open-quote)
+LaTeX-italian-open-quote
+  "\&quo

Re: [AUCTeX-devel] Check engines before running LaTeX

2015-09-09 Thread Mosè Giordano
Hi Tassilo,

2015-09-09 14:06 GMT+02:00 Tassilo Horn <t...@gnu.org>:
> Mosè Giordano <m...@gnu.org> writes:
>
>>> By the way, I once wrote down a style file for polyglossia, I should
>>> review and update it one day.
>>
>> polyglossia style file is now included in AUCTeX.  What we need now
>> are style files for each languages, much like those for babel, and
>> they should be named gloss-.el.
>
> Nice!  Could you provide one such style for Italian so that we have a
> reference on what such a language style needs to provide?  Then it's
> easier and more likely that others contribute other language styles.

I've been too enthusiastic about my polyglossia style file.  It had a
minor bug (a missing * in a regexp), but the major problem is that it
doesn't load automatically language style files.  This has probably to
do with when cleanup function is run, I'll try to inspect later today
or tomorrow.

Anyway I wrote a simple Italian style file for polyglossia.  It
essentially defines "\textitalian" macro and "italian" environment
(this is described in TODO section of polyglossia.el).  This should be
done for all languages.  In addition, polyglossia manual describes
only babelshorthands, like babel, so I took them from italian.el style
file.  These are active only when "babelshorthands=true" option has
been set for that language, either with \setkeys or
\set{main,other}language.  For other languages one should do what
polyglossia manual says, if necessary.

For the language specific hook I used the same name of italian.el, so
users don't have to define new hooks.  babel and polyglossia are
incompatible, so there should be no problem.

Bye,
Mosè

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] How to check whether makeindex should be rerun?

2015-09-08 Thread Mosè Giordano
2015-09-08 13:39 GMT+02:00 Tassilo Horn :
> Tassilo Horn  writes:
>
>>> Patch pushed.  Tassilo, please note file function in
>>> `TeX-command-sequence' is now called without arguments again.
>>
>> Ok, I'll try to investigate why `TeX-command-default' sometimes
>> suggests different commands depending on if the region file name is
>> given with or without directory.
>
> I think I have fixed this now.  `TeX-command-default's region file case
> did not trigger at all when the region file name was given with
> directory.

Oh, it's the the same problem I had in `TeX-LaTeX-sentinel', originals
must be given without directories.  Thank you!

Bye,
Mosè

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] How to check whether makeindex should be rerun?

2015-09-07 Thread Mosè Giordano
Hi all,

finally here is my patch to suggest to run makeindex when needed.  In
a complex document with index and bibliography AUCTeX now suggests to
run

LaTeX
BibTeX
LaTeX
LaTeX
Index
LaTeX
LaTeX

which is the same list suggested by Enrico Gregorio here:
http://tex.blogoverflow.com/2012/09/dont-forget-to-run-makeindex/
Well, there is and extra LaTeX run at the end, but there is a warning
suggesting to run LaTeX once more.  For the record, latexmk for the
same document runs

pdflatex
makeindex
bibtex
pdflatex
makeindex
bibtex
pdflatex
pdflatex

Now, implementation of my patch:  there are two variables,
`TeX-idx-md5-alist' and `TeX-idx-changed-alist' (probably `LaTeX-*'
would be better names), which record the md5 hashes of idx files and
whether they changed after a LaTeX run.  md5 hash is calculated in
`TeX-run-TeX', and then checked again in `TeX-LaTeX-sentinel': if md5
hash changed, `TeX-idx-changed-alist' for current idx file is set to
t.  At this point, if `TeX-command-next' is one between "Dvips" and
`TeX-command-Show', then `TeX-command-default' suggest to run "Index",
because makeindex should be run when the document is almost complete,
not after the fist latex run as latexmk does.

A note about the fact I used alists instead of local variables for
`TeX-idx-md5-alist' and `TeX-idx-changed-alist'.  I first thought to
set local variables in idx files, but we need to open those files and
hope the user won't kill them.  Another possibility would be to set
those variables locally in output buffer since `TeX-command-default'
already requires that buffer to be still alive, but it seems local
variables are killed there before running a command.  My last choice
has been to use a global alist.  Does someone have better idea about
how to store md5 hash and the information about status of idx file?

Any other comment welcome.

Bye,
Mosè

2015-09-01 7:50 GMT+02:00 Tassilo Horn <t...@gnu.org>:
> Mosè Giordano <m...@gnu.org> writes:
>
> Hi Mosè,
>
>> differently from what it's said in section 1.3.2.1 of the manual,
>> AUCTeX never suggests to run makeindex when needed.  Does someone know
>> how can we check whether we need to run makeindex?  The .idx file is
>> rewritten after every latex run, so it's useless to look to its
>> modification time, and no warning is emitted by the compiler.
>>
>> A possibility is to store the md5 hash of the .idx file and check
>> whehter it's changed after running latex.  md5 is pretty fast compared
>> to other algorithms and I don't think this feature is security-wise.
>> If I recall correctly, latexmk does the same check.
>
> `md5' sounds reasonable for this purpose, and it's available in all
> emacsen we support.
>
> Bye,
> Tassilo
>
>
> ___
> auctex-devel mailing list
> auctex-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/auctex-devel
diff --git a/tex-buf.el b/tex-buf.el
index c13a87e..d98f067 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -336,6 +336,17 @@ This works only with TeX commands and if the
 (defconst TeX-error-overview-buffer-name "*TeX errors*"
   "Name of the buffer in which to show error list.")
 
+(defvar TeX-idx-md5-alist nil
+  "Alist of MD5 hashes of idx file.
+
+Car is the idx file, cdr is its md5 hash.")
+
+(defvar TeX-idx-changed-alist nil
+  "Whether the idx files changed.
+
+Car is the idx file, cdr is whether idx changed after LaTeX
+run.")
+
 (defcustom TeX-check-engine t
   "Whether AUCTeX should check the correct engine has been set before running LaTeX commands."
   :group 'TeX-command
@@ -642,7 +653,7 @@ omitted) and `TeX-region-file'."
 	  TeX-command-sequence-command command))
(t
 	(setq cmd (TeX-command-default
-		   (funcall TeX-command-sequence-file-function nil t))
+		   (funcall TeX-command-sequence-file-function))
 	  TeX-command-sequence-command t)))
   (TeX-command cmd TeX-command-sequence-file-function 0)
   (when reset
@@ -685,28 +696,44 @@ omitted) and `TeX-region-file'."
 
 (defun TeX-command-default (name)
   "Guess the next command to be run on NAME."
-  (cond ((if (string-equal name TeX-region)
-	 (TeX-check-files (concat name "." (TeX-output-extension))
-			  (list name)
-			  TeX-file-extensions)
-	   (TeX-save-document (TeX-master-file)))
-	 TeX-command-default)
-	((and (memq major-mode '(doctex-mode latex-mode))
-	  ;; Want to know if bib file is newer than .bbl
-	  ;; We don't care whether the bib files are open in emacs
-	  (TeX-check-files (concat name ".bbl")
-			   (mapcar 'car
-   (LaTeX-bibliography-list))
-			   (append BibTeX-file-extensions
-   TeX-Biber-file-extensions)))
-	 ;; We should check for bst files here 

Re: [AUCTeX-devel] How to check whether makeindex should be rerun?

2015-09-07 Thread Mosè Giordano
Hi Tassilo,

2015-09-07 13:36 GMT+02:00 Tassilo Horn <t...@gnu.org>:
> Mosè Giordano <m...@gnu.org> writes:
>> which record the md5 hashes of idx files and whether they changed
>> after a LaTeX run.
>
> Why two alists and not just one with (FILE MD5 CHANGED) entries?

Uhm, I think that would be a bit awkward: `TeX-run-TeX' updates md5
hash without touching the changed status, instead `TeX-LaTeX-sentinel'
and `TeX-run-index' update the changed status without touching the
hash.  That's why I kept those alists separated, but I can try to
merge them anyway.

>> A note about the fact I used alists instead of local variables for
>> `TeX-idx-md5-alist' and `TeX-idx-changed-alist'.  I first thought to
>> set local variables in idx files, but we need to open those files and
>> hope the user won't kill them.  Another possibility would be to set
>> those variables locally in output buffer since `TeX-command-default'
>> already requires that buffer to be still alive, but it seems local
>> variables are killed there before running a command.  My last choice
>> has been to use a global alist.  Does someone have better idea about
>> how to store md5 hash and the information about status of idx file?
>
> Storing them buffer-locally in the master file's buffer would also work,
> no?

Yes, but there is the same shortcoming as storing the variable locally
in idx file: the buffer shouldn't be killed, and as far as I know we
don't require master file's buffer to be always alive.

Bye,
Mosè

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] How to check whether makeindex should be rerun?

2015-09-07 Thread Mosè Giordano
2015-09-07 16:47 GMT+02:00 Tassilo Horn <t...@gnu.org>:
> Mosè Giordano <m...@gnu.org> writes:
>
>>> Why two alists and not just one with (FILE MD5 CHANGED) entries?
>>
>> Uhm, I think that would be a bit awkward: `TeX-run-TeX' updates md5
>> hash without touching the changed status, instead `TeX-LaTeX-sentinel'
>> and `TeX-run-index' update the changed status without touching the
>> hash.
>
> I don't see why this would be awkward.

Because in order to update only part of the alist (only md5 or changed
status) I have to record the other one beforehand.  `setcdr' comes in
handy in this case, but can be used only if the entry to be changed
already exists, otherwise I'd need to use push as it is now.  This
adds a bit of complexity.

> But another alternative was not
> to have the notion of CHANGED at all but to store entries of the form
> (FILE CURRENT-MD5 PREV-MD5).  Then only `TeX-run-TeX' has to
>
>   (setcdr entry (list new-md5 (cadr entry)))
>
> and nowhere else has the alist (or another one) to be modified.
>
>> That's why I kept those alists separated, but I can try to merge them
>> anyway.
>
> I actually don't have a strong opinion on this so feel free to keep it
> the way it is.

I'd prefer to stick with the current implementation for the time
being, it could be improved in the future.  What I prefer right now is
to have a somewhat good logic to determine when makeindex needs to be
run.

You can find attached the refreshed patch (probably only `TeX-idx-*'
have been renamed), if there are no other comments I'll install it
later today or tomorrow.

Bye,
Mosè
diff --git a/tex-buf.el b/tex-buf.el
index c13a87e..7c1f62b 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -336,6 +336,17 @@ This works only with TeX commands and if the
 (defconst TeX-error-overview-buffer-name "*TeX errors*"
   "Name of the buffer in which to show error list.")
 
+(defvar LaTeX-idx-md5-alist nil
+  "Alist of MD5 hashes of idx file.
+
+Car is the idx file, cdr is its md5 hash.")
+
+(defvar LaTeX-idx-changed-alist nil
+  "Whether the idx files changed.
+
+Car is the idx file, cdr is whether idx changed after LaTeX
+run.")
+
 (defcustom TeX-check-engine t
   "Whether AUCTeX should check the correct engine has been set before running LaTeX commands."
   :group 'TeX-command
@@ -642,7 +653,7 @@ omitted) and `TeX-region-file'."
 	  TeX-command-sequence-command command))
(t
 	(setq cmd (TeX-command-default
-		   (funcall TeX-command-sequence-file-function nil t))
+		   (funcall TeX-command-sequence-file-function))
 	  TeX-command-sequence-command t)))
   (TeX-command cmd TeX-command-sequence-file-function 0)
   (when reset
@@ -685,28 +696,44 @@ omitted) and `TeX-region-file'."
 
 (defun TeX-command-default (name)
   "Guess the next command to be run on NAME."
-  (cond ((if (string-equal name TeX-region)
-	 (TeX-check-files (concat name "." (TeX-output-extension))
-			  (list name)
-			  TeX-file-extensions)
-	   (TeX-save-document (TeX-master-file)))
-	 TeX-command-default)
-	((and (memq major-mode '(doctex-mode latex-mode))
-	  ;; Want to know if bib file is newer than .bbl
-	  ;; We don't care whether the bib files are open in emacs
-	  (TeX-check-files (concat name ".bbl")
-			   (mapcar 'car
-   (LaTeX-bibliography-list))
-			   (append BibTeX-file-extensions
-   TeX-Biber-file-extensions)))
-	 ;; We should check for bst files here as well.
-	 (if LaTeX-using-Biber TeX-command-Biber TeX-command-BibTeX))
-	((TeX-process-get-variable name
-   'TeX-command-next
-   (if (and TeX-PDF-via-dvips-ps2pdf TeX-PDF-mode)
-   "Dvips"
- TeX-command-Show)))
-	(TeX-command-Show)))
+  (let ((command-next nil))
+(cond ((if (string-equal name TeX-region)
+	   (TeX-check-files (concat name "." (TeX-output-extension))
+(list name)
+TeX-file-extensions)
+	 (TeX-save-document (TeX-master-file)))
+	   TeX-command-default)
+	  ((and (memq major-mode '(doctex-mode latex-mode))
+		;; Want to know if bib file is newer than .bbl
+		;; We don't care whether the bib files are open in emacs
+		(TeX-check-files (concat name ".bbl")
+ (mapcar 'car
+	 (LaTeX-bibliography-list))
+ (append BibTeX-file-extensions
+	 TeX-Biber-file-extensions)))
+	   ;; We should check for bst files here as well.
+	   (if LaTeX-using-Biber TeX-command-Biber TeX-command-BibTeX))
+	  ((and
+	;; Rational: makeindex should be run when final document is
+	;; almost complete (see
+	;; http://tex.blogoverflow.com/2012/09/dont-forget-to-run-makeindex/),
+	;; otherwise after following latex runs index pages may change
+	;; due to changes in final document, resulting in extra
+	;; makeindex and latex runs.
+	(member

[AUCTeX-diffs] GNU AUCTeX branch, master, updated. 03772382dc5bc37d80a9d1025c37ea2cd47ed73f

2015-09-07 Thread Mosè Giordano
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  03772382dc5bc37d80a9d1025c37ea2cd47ed73f (commit)
  from  d4ba58533a321bb2ec04a6589de1905190f2e15c (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 03772382dc5bc37d80a9d1025c37ea2cd47ed73f
Author: Mosè Giordano <m...@gnu.org>
Date:   Mon Sep 7 16:43:47 2015 +0200

Add TeX-compile-run-all to AUCTeX reference card.

* doc/tex-ref.tex: Update copyright years.
Mention C-c C-a key binding.

diff --git a/ChangeLog b/ChangeLog
index 422ad9f..c412871 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-09-07  Mosè Giordano  <m...@gnu.org>
+
+   * doc/tex-ref.tex: Update copyright years.
+   Mention C-c C-a key binding.
+
 2015-09-05  Tassilo Horn  <t...@gnu.org>
 
* font-latex.el (font-latex-unfontify-region): Also remove the
diff --git a/doc/tex-ref.tex b/doc/tex-ref.tex
index 3ca96bc..de7edb8 100644
--- a/doc/tex-ref.tex
+++ b/doc/tex-ref.tex
@@ -29,7 +29,7 @@
 % compile-command: "tex tex-ref" or "pdftex tex-ref"
 %
 % Original author of Auc-TeX Reference Card:
-%  
+%
 %   Terrence Brannon, PO Box 5027, Bethlehem, PA 18015 , USA
 %  internet: t...@pl118f.cc.lehigh.edu  (215) 758-1720 (215) 758-2104
 %
@@ -52,8 +52,8 @@
 
 \def\copyrightnotice{%
 \vskip 1ex plus 2 fill\begingroup\small
-\centerline{Copyright \copyright\ 1987, 1992, 1993, 2004, 2005, 2008,}
-\centerline{2010, 2012, 2014 Free Software Foundation, Inc.}
+\centerline{Copyright \copyright\ 1987, 1992-1994, 2004-2006, 2008, 2010,}
+\centerline{2012, 2014, 2015 Free Software Foundation, Inc.}
 \centerline{for AUC\TeX\ version \versionnumber}
 
 Permission is granted to make and distribute copies of
@@ -73,7 +73,7 @@ are preserved on all copies.
 
 \edef\ncolumns{\the\columnsperpage}
 
-\message{[\ncolumns\space 
+\message{[\ncolumns\space
   column\if 1\ncolumns\else s\fi\space per page]}
 
 \def\scaledmag#1{ scaled \magstep #1}
@@ -155,7 +155,7 @@ are preserved on all copies.
   \def\bye{\par\vfill\supereject
 \if a\abc \else\null\vfill\eject\fi
 \if a\abc \else\null\vfill\eject\fi
-\end}  
+\end}
 \fi
 
 % we won't be using math mode much, so redefine some of the characters
@@ -245,6 +245,7 @@ are preserved on all copies.
 \key{Toggle debug of bad boxes}{C-c C-t C-b}
 \key{Toggle debug of warnings}{C-c C-t C-w}
 \key{View output file}{C-c C-v}
+\key{Compile all and view output file}{C-c C-a}
 
 Commands you can run on the master file (with \kbd{C-c C-c}) or the
 region (with \kbd{C-c C-r}) include the following (starred versions
@@ -302,7 +303,7 @@ indicated in the mode line.
 \key{Complete \TeX\ macro}{M-TAB}
 \key{Smart ``quote''}{"}
 \key{Smart ``dollar''}{\$}
-  
+
 \section{Font Selection}
 
 \key{Insert {\bf bold\/} text}{C-c C-f C-b}
@@ -674,7 +675,7 @@ $\sp1$ An argument of \kbd{C-u} triggers a document scan 
first.
 
 \bye
 
-%%% Local Variables: 
+%%% Local Variables:
 %%% mode: plain-TeX
 %%% TeX-master: t
-%%% End: 
+%%% End:

---

Summary of changes:
 ChangeLog   |5 +
 doc/tex-ref.tex |   17 +
 2 files changed, 14 insertions(+), 8 deletions(-)


hooks/post-receive
-- 
GNU AUCTeX

___
auctex-diffs mailing list
auctex-di...@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-diffs


[AUCTeX-diffs] GNU AUCTeX branch, master, updated. 6b3cbea3d456fb556f90413fa26fa1e34f5cb2d4

2015-09-07 Thread Mosè Giordano
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  6b3cbea3d456fb556f90413fa26fa1e34f5cb2d4 (commit)
  from  03772382dc5bc37d80a9d1025c37ea2cd47ed73f (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 6b3cbea3d456fb556f90413fa26fa1e34f5cb2d4
Author: Mosè Giordano <m...@gnu.org>
Date:   Mon Sep 7 23:24:38 2015 +0200

Suggest to run Index when appropriate.

* tex-buf.el (LaTeX-idx-md5-alist, LaTeX-idx-changed-alist): New
variables.
(TeX-command-sequence): Call file function without optional
arguments.
(TeX-command-default): Suggest "Index" when appropriate.
(TeX-run-TeX): Store value of `LaTeX-idx-md5-alist'.
(TeX-run-index): New function.
(TeX-LaTeX-sentinel): Set `LaTeX-idx-changed-alist'.
(TeX-index-sentinel): New function.

* tex.el (TeX-command-list): Mention "makeindex" in "Index" help.
Suggested by Arash Esbati.

* doc/changes.texi: Mention ability to suggest makeindex when
needed.

* doc/todo.texi (Wishlist): Remove reference to makeindex.

diff --git a/ChangeLog b/ChangeLog
index c412871..e1fa98a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,23 @@
 2015-09-07  Mosè Giordano  <m...@gnu.org>
 
+   * tex-buf.el (LaTeX-idx-md5-alist, LaTeX-idx-changed-alist): New
+   variables.
+   (TeX-command-sequence): Call file function without optional
+   arguments.
+   (TeX-command-default): Suggest "Index" when appropriate.
+   (TeX-run-TeX): Store value of `LaTeX-idx-md5-alist'.
+   (TeX-run-index): New function.
+   (TeX-LaTeX-sentinel): Set `LaTeX-idx-changed-alist'.
+   (TeX-index-sentinel): New function.
+
+   * tex.el (TeX-command-list): Mention "makeindex" in "Index" help.
+   Suggested by Arash Esbati.
+
+   * doc/changes.texi: Mention ability to suggest makeindex when
+   needed.
+
+   * doc/todo.texi (Wishlist): Remove reference to makeindex.
+
* doc/tex-ref.tex: Update copyright years.
Mention C-c C-a key binding.
 
diff --git a/doc/changes.texi b/doc/changes.texi
index 0a90934..14fc510 100644
--- a/doc/changes.texi
+++ b/doc/changes.texi
@@ -22,7 +22,7 @@ current section (or part, chapter, subsection, etc).  See
 @code{LaTeX-command-section} and
 @code{LaTeX-command-section-change-level}.
 @ifclear rawfile
-Also see the documentation at @xref{Starting a Command}.
+@xref{Starting a Command}, for details.
 @end ifclear
 
 @item
@@ -42,6 +42,9 @@ style for error messages.
 Indent @samp{\[...\]} math mode as a regular environment by default.
 
 @item
+Now @AUCTeX{} suggests to run @command{makeindex} when appropriate.
+
+@item
 @code{TeX-view-program-list} can contain, as third optional element of
 each item, the name of the executable(s) needed to open the viewer.
 
diff --git a/doc/todo.texi b/doc/todo.texi
index 59b0f29..8025351 100644
--- a/doc/todo.texi
+++ b/doc/todo.texi
@@ -138,9 +138,6 @@ This default value for TeX-master could then be controled 
with mapping
 based on the extension.
 
 @item
-Suggest @samp{makeindex} when appropriate.
-
-@item
 Use index files (when available) to speed up @kbd{C-c C-m include
 @key{RET}}.
 
diff --git a/tex-buf.el b/tex-buf.el
index c13a87e..07e54ef 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -336,6 +336,17 @@ This works only with TeX commands and if the
 (defconst TeX-error-overview-buffer-name "*TeX errors*"
   "Name of the buffer in which to show error list.")
 
+(defvar LaTeX-idx-md5-alist nil
+  "Alist of MD5 hashes of idx file.
+
+Car is the idx file, cdr is its md5 hash.")
+
+(defvar LaTeX-idx-changed-alist nil
+  "Whether the idx files changed.
+
+Car is the idx file, cdr is whether idx changed after LaTeX
+run.")
+
 (defcustom TeX-check-engine t
   "Whether AUCTeX should check the correct engine has been set before running 
LaTeX commands."
   :group 'TeX-command
@@ -642,7 +653,10 @@ omitted) and `TeX-region-file'."
  TeX-command-sequence-command command))
(t
(setq cmd (TeX-command-default
-  (funcall TeX-command-sequence-file-function nil t))
+  ;; File function should be called with nil `nondirectory'
+  ;; argument, otherwise `TeX-command-sequence' won't work in
+  ;; included files not placed in `TeX-master-directory'.
+  (funcall TeX-command-sequence-file-function))
  TeX-command-sequence-command t)))
   (TeX-command cmd TeX-command-sequence-file-function 0)
   (when reset

Re: [AUCTeX-devel] GNU AUCTeX branch, master, updated. e2b24137ddfcda625264d513da6de3bb0b5270b3

2015-09-04 Thread Mosè Giordano
2015-09-04 13:47 GMT+02:00 Tassilo Horn :
> Sure, but I am in a latex buffer and still get:

Uh, here I get C-c C-a as expected :-/

Bye,
Mosè

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] GNU AUCTeX branch, master, updated. e2b24137ddfcda625264d513da6de3bb0b5270b3

2015-09-04 Thread Mosè Giordano
Hi Tassilo,

2015-09-04 13:33 GMT+02:00 Tassilo Horn <t...@gnu.org>:
> Mosè Giordano <m...@gnu.org> writes:
>
> Hi!
>
>> * tex-buf.el (TeX-command-run-all): Use `universal-argument' to
>> reference C-u.
>
> Do you know why \\[universal-argument] expands to `C-u' in
> `TeX-command-run-all's docstring but \\[TeX-command-run-all] expands to
> `M-x TeX-command-run-all' instead of `C-c C-a'?

Probably depends on the map in effect when you read the docstring: if
you're in an elisp buffer you'll see `M-x TeX-command-run-all', if
you're in a TeX buffer you'll get it expanded to C-c C-a.  A
\\ before \\[TeX-command-run-all] fixes this.

Bye,
Mosè

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] Implementing TeX-update

2015-09-04 Thread Mosè Giordano
Hi Tassilo,

2015-09-04 11:02 GMT+02:00 Tassilo Horn <t...@gnu.org>:
> Mosè Giordano <m...@gnu.org> writes:
>
>>> (after a bit of testing)!  I think we have accumulated more than enough
>>> additions, fixes, and new features to think about that.
>>
>> Regarding testing.  I think `LaTeX-command-run-all-section' should
>> check if it's on a LaTeX document, for example in a plain tex document
>
> Fixed, and also for LaTeX-command-section.

May I ask you why in `TeX-command-sequence' you funcall
`TeX-command-sequence-file-function' with `nondirectory' argument set
to t (line 645 of tex-buf.el)?  This breaks `TeX-command-sequence' run
from included files placed in directories different from
`TeX-master-directory'!!

Bye,
Mosè

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] Implementing TeX-update

2015-09-04 Thread Mosè Giordano
Hi Tassilo,

2015-09-04 6:56 GMT+02:00 Tassilo Horn :
> Tassilo Horn  writes:
>
 Is `TeX-command-run-all' an option?  Rational: `TeX-command-list'
 mostly uses `run'.  +1 for C-c C-a.
>>>
>>> Uhm, good point but I really don't know which option to choose: for
>>> me `TeX-command-compile-all' and `TeX-command-run-all' are equally
>>> good.
>
> So now I've renamed TeX-update to TeX-command-run-all and bound it to
> C-c C-a.  The reason I didn't come up with "run all" in the first place
> is that all TeX-run-* functions are internal workers, not commands.
> Well, but `TeX-command-run-all' is fine of course.

Thanks!

> Glad we have that now.  Then I'll do the region/section stuff ASAP, Mosè
> does the Index suggestion, and then we can have a new shiny release

Cool!

> (after a bit of testing)!  I think we have accumulated more than enough
> additions, fixes, and new features to think about that.

Regarding testing.  I think `LaTeX-command-run-all-section' should
check if it's on a LaTeX document, for example in a plain tex document
it currently throws the error

LaTeX-command-run-all-section: Wrong type argument: number-or-marker-p, nil

In addition, in this simple document

--8<---cut here---start->8---
\documentclass{article}
\begin{document}
\section{one}
\label{sec:one}
hey there
\section{two}
\label{sec:two}
-!-foo
\end{document}

%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% End:
--8<---cut here---end--->8---

with point at -!- if I run C-u C-u C-c C-a compilation fails because
_region_.tex doesn't exist, and when compiling with C-c C-z the
content of the section (-!-foo) isn't included in the final output.

Bye,
Mosè

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] Implementing TeX-update

2015-09-03 Thread Mosè Giordano
Hi Arash,

2015-09-03 22:27 GMT+02:00 Arash Esbati <esb...@gmx.de>:
> Mosè Giordano <m...@gnu.org> writes:
>
>> 2015-09-02 7:58 GMT+02:00 Tassilo Horn <t...@gnu.org>:
>>>
>>> I'm not sure which name is best, though.  `TeX-command-all' has the nice
>>> property that then all processing commands have the TeX-command prefix.
>>> So maybe `TeX-command-compile-all' would be best compromise
>>> wrt. discoverability, descriptiveness, and mnemonics.
>>
>> I like `TeX-command-compile-all' and above all C-c C-a key binding,
>> it's much easier than C-c C-u on QWERTY-based layouts ;-)
>
> Is `TeX-command-run-all' an option?  Rational: `TeX-command-list' mostly
> uses `run'.  +1 for C-c C-a.

Uhm, good point but I really don't know which option to choose: for me
`TeX-command-compile-all' and `TeX-command-run-all' are equally good.

> While we are at it: `TeX-command-list' has:
>
> ("Index" "makeindex %s" TeX-run-command nil t :help "Create index file")
> ("Xindy" "texindy %s" TeX-run-command nil t
>  :help "Run xindy to create index file")
>
> Should the first entry be changed to:
>
> ("Index" "makeindex %s" TeX-run-command nil t
>  :help "Run makeindex to create index file")

Thanks for that, I'll make this change in my patch to suggest "Index"
when needed.  For the record, this work has been a bit harder than I
initially thought, but I should be able to submit a patch by the end
of the week.  By the way, I've always found the name "Index" for that
command a bit misleading: without looking to the list of commands (ok,
it's available also in toolbar menu "Command"), I think that everyone
would try first to run "makeindex" at C-c C-c prompt.

Bye,
Mosè

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] How to check whether makeindex should be rerun?

2015-09-02 Thread Mosè Giordano
Hi Tassilo,

2015-09-02 10:36 GMT+02:00 Tassilo Horn <t...@gnu.org>:
> Mosè Giordano <m...@gnu.org> writes:
>
>> differently from what it's said in section 1.3.2.1 of the manual,
>> AUCTeX never suggests to run makeindex when needed.  Does someone know
>> how can we check whether we need to run makeindex?  The .idx file is
>> rewritten after every latex run, so it's useless to look to its
>> modification time, and no warning is emitted by the compiler.
>
> BTW, it just occurred to me that I got this warning when compiling my
> document:
>
> LaTeX Warning: Index entries may have changed. While keeping the aux-files 
> rerun
>  both LaTeX and makeindex to get index entries right.
>
> This is with LuaLaTeX, though.

Uh, that's interesting, but I don't get that warning in this document

--8<---cut here---start->8---
\documentclass{article}
\usepackage{makeidx}
\makeindex{}
\begin{document}
foo\index{foo}
\printindex{}
\end{document}

%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% TeX-engine: luatex
%%% End:
--8<---cut here---end--->8---

Looking on the Internet for "Index entries may have changed." I found
only this thread:
http://de.comp.text.tex.narkive.com/glNYInu1/index-mit-automatischer-eindeutigkeitsmachung
Does it say something to you? ;-)


Bye,
Mosè

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] Implementing TeX-update

2015-09-02 Thread Mosè Giordano
Hi Tassilo,

2015-09-02 7:58 GMT+02:00 Tassilo Horn :
> I like Ivan's suggestions.  Basically, the command is something like
> "make all", so how about either `TeX-make-all', `TeX-execute-all',
> `TeX-command-all', or `TeX-compile-all'?  The binding C-c C-a would make
> sense for all of them.
>
> I'm not sure which name is best, though.  `TeX-command-all' has the nice
> property that then all processing commands have the TeX-command prefix.
> So maybe `TeX-command-compile-all' would be best compromise
> wrt. discoverability, descriptiveness, and mnemonics.

I like `TeX-command-compile-all' and above all C-c C-a key binding,
it's much easier than C-c C-u on QWERTY-based layouts ;-)

Bye,
Mosè

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] prettify-symbols-mode and the documentation.

2015-09-02 Thread Mosè Giordano
Hi Uwe,

2015-09-02 17:49 GMT+02:00 Uwe Brauer :
> Hi
>
> Maybe after some days of testing we should add an entry to the feature
> list, http://www.gnu.org/software/auctex/features.html
> describing the new feature?

That makes sense, but we should release the new version of AUCTeX
first and consider also this feature requires Emacs >= 25 which is
still in development too.

Bye,
Mosè

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] Implementing TeX-update

2015-09-02 Thread Mosè Giordano
Hi Uwe,

2015-09-02 17:56 GMT+02:00 Uwe Brauer <o...@mat.ucm.es>:
>
>> 2015-08-17 12:26 GMT+02:00 Mosè Giordano <m...@gnu.org>:
>
>> No comment? :-)
>
> Sorry to arrive late on this discussion. Off-topic question to start
> with, where is the «wishlist» you mentioned?

In our manual (info "(auctex)Development") or
https://gnu.org/software/auctex/manual/auctex.html#Development

> Let me see whether I understand the philosophy.
>
> Usually I run C-c C-c and then I will be prompted for latex (pdflatex,
> xelatex whatever). If the viewer has been started it gets updated.
>
> Now the TeX-update function bound to C-c C-u will not prompt you for
> latex or the viewer, but if the buffer has been modified it will run the
> relevant latex command, if not nothing will happen. Is this correct?

Almost: if nothing is changed the viewer is opened.  C-c C-u (or the
new key binding, in case we should change it) basically is like
running C-c C-c repeatedly but without being prompted every time.  The
default option is always used.  You issue C-c C-u and the document
will be compiled until it's ready, but remember AUCTeX' mechanism to
guess the next command is far from being bullet-proof.

> Any other function provided (the region-wise functions apart)?

The function `TeX-command-sequence', on which `TeX-update' (or its new
name, in case we should change it) is based, can be fed with a list of
string: if you happen to frequently run the same list of commands,
e.g. LaTeX - BibTeX - LaTeX - LaTeX - View, you can bind a key to the
following lambda:

(lambda ()
  (interactive)
  (TeX-command-sequence '("LaTeX" "BibTeX" "LaTeX" "LaTeX" "View") t))

This is like a simple Makefile.  You can also give
`TeX-command-sequence' as argument another function if you don't like
`TeX-command-default''s logic to guess the default command.

> I first thought this is not very useful, but after playing around for
> file, I think now the opposite it is quite handy!! Thanks Mosè!

You're welcome!

Bye,
Mosè

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] [RFC] parsing \jobname in LaTeX files?

2015-09-01 Thread Mosè Giordano
Hi Tassilo,

2015-09-01 7:46 GMT+02:00 Tassilo Horn <t...@gnu.org>:
> Mosè Giordano <m...@gnu.org> writes:
>
> Hi Mosè,
>
>> I'd like to do a little survey: does someone find useful to correctly
>> parse \jobname in LaTeX files?  To be clear, as it is now,
>>
>> \include{\jobname-foo}
>> \addbibresource{\jobname.bib}
>>
>> are ignored by the parser.[1] Do you think it's valuable to make
>> \jobname be replaced by `(TeX-master-file)' when parsing the file?
>>
>> This should be feasible by changing `LaTeX-auto-cleanup' and some
>> regexps in `LaTeX-auto-regexp-list', but before starting hacking on it
>> I'd like some feedback.
>
> I don't use \jobname so I don't have a real opinion on this.

Actually me neither, just because AUCTeX can't handle \jobname, but I
don't know how often I'd use it otherwise.

> But
> \jobname could be anything, the basename of the master file is just the
> default, no?  That is, I could set `TeX-command-extra-options' to
> "-jobname foo" although my document is bar.tex, and then \jobname
> expands to "foo".

Indeed yes, but if you change \jobname it woulnd't be possible to open
the viewer with `C-c C-v' either.[1]  This is another strange
effect/breakage Marcin referred to.

Bye,
Mosè

Note:

[1] In my personal wishlist there is the possibility to handle custom
jobname and outdir with file local variables.

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] Implementing TeX-update

2015-09-01 Thread Mosè Giordano
2015-09-01 21:45 GMT+02:00 Tassilo Horn <t...@gnu.org>:
> Mosè Giordano <m...@gnu.org> writes:
>
>>> Now could there also be commands `TeX-update-region' and
>>> `LaTeX-update-section'?
>>
>> In `TeX-command-sequence' there is the line
>>
>> (TeX-command cmd 'TeX-master-file 0)
>>
>> so commands are always run on the whole document, but we can change
>> this by adding another argument to the function with the name of the
>> file to be compiled, for the region case.  Also the `t' branch of the
>> first `cond' should be updated to cater for the region.
>
> I just added an optional FILE-FN argument which can be either
> #'TeX-master-file or #'TeX-region-file.  So now you can do
>
>   (TeX-command-sequence t t #'TeX-region-file)
>
> to recompile the region.

Thanks, that's what I was thinking to.

> Well, what's missing is that the region file
> needs to be updated before doing that but I don't have time to do that.

Uhm, I'll try to have a look at this, but I don't know when.

>>> And while we are at it: do you think "update" is the best term for
>>> this feature?  IMHO, it's a too wide term, e.g., anything can be
>>> updated and there's already `TeX-update-style' which has nothing to
>>> do with that feature.  So maybe the terms "recompile" or just
>>> "compile" would fit better?
>>
>> I don't have a strong opinion on this, but I tend to agree with you.
>> I just followed the name suggested in our wishlist which also matches
>> the proposed key binding `C-c C-u'.  Feel free to change the names
>> (and key binding), if you feel like that.
>
> Too bad the bindings for the only two better terms I can come up, i.e.,
> _c_ompile and _r_ecompile, are already taken for _c_ommand and
> _r_egion...

Indeed we're running out of letters.  Letters still free should be:

a (u) x y

Actually I'm not sure about "x".  Do you have ideas for "a" or "y"?

Bye,
Mosè

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] Implementing TeX-update

2015-09-01 Thread Mosè Giordano
Hi Tassilo,

2015-09-01 9:10 GMT+02:00 Tassilo Horn :
> Now could there also be commands `TeX-update-region' and
> `LaTeX-update-section'?

In `TeX-command-sequence' there is the line

(TeX-command cmd 'TeX-master-file 0)

so commands are always run on the whole document, but we can change
this by adding another argument to the function with the name of the
file to be compiled, for the region case.  Also the `t' branch of the
first `cond' should be updated to cater for the region.  I'm not sure
what to do for the LaTeX section, you're the expert on this ;-)

> And while we are at it: do you think "update" is the best term for this
> feature?  IMHO, it's a too wide term, e.g., anything can be updated and
> there's already `TeX-update-style' which has nothing to do with that
> feature.  So maybe the terms "recompile" or just "compile" would fit
> better?

I don't have a strong opinion on this, but I tend to agree with you.
I just followed the name suggested in our wishlist which also matches
the proposed key binding `C-c C-u'.  Feel free to change the names
(and key binding), if you feel like that.

Bye,
Mosè

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] (add-hook 'LaTeX-mode-hook 'turn-on-prettify-symbols-mode)

2015-09-01 Thread Mosè Giordano
Hi Uwe,

2015-09-01 15:53 GMT+02:00 Uwe Brauer :
> On 09/01/2015 05:57 AM, Tassilo Horn wrote:
>
> Uwe Brauer  writes:
>
> Hi Uwe,
>
>> I have the above setting
>> (add-hook 'LaTeX-mode-hook 'turn-on-prettify-symbols-mode)
>>
>> however when I open a LaTeX file the symbols are not prettified I have
>> to manually turn off and on the prettify-symbols-mode, can sombody
>> verify this?
>
> I just wanted do debug this issue but with the Emacs copy as of right
> now (commit 4a703c73305211c780307e3654969ac1a20fb229) I can't reproduce
> it anymore.  With the above add-hook, symbols are instantly prettified
> when opening some tex file.
>
> So it might be some temporary hiccup in emacs.  Can you confirm that?
>
> Bye,
> Tassilo
>
>
> ok I will try once I have a fast internet connection. BTW how can I update
> an existing
> git directory?  git clone git://git.savannah.gnu.org/emacs.git
> just clones and complains that the current directory is non empty.

In the directory of your repo (or one of its subdirectories) run

git pull

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. dbc87df41c22a68d98629c65653afa07cfb5e398

2015-08-31 Thread Mosè Giordano
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  dbc87df41c22a68d98629c65653afa07cfb5e398 (commit)
   via  a07f43647eb3ed649d47a14bc6e1db181cd18a7b (commit)
  from  a85d7c62dde35869f0e86786d9e9620f333a2527 (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 dbc87df41c22a68d98629c65653afa07cfb5e398
Author: Mosè Giordano <m...@gnu.org>
Date:   Mon Aug 31 18:02:50 2015 +0200

Generate PDF via dvips+ps2pdf.

* tex-buf.el (TeX-previous-error): Delete point in error message.
(TeX-command-default)
(TeX-run-set-command): Take care of `TeX-PDF-via-dvips-ps2pdf'.
(TeX-run-dvips, TeX-run-ps2pdf): New functions.
(TeX-TeX-sentinel, TeX-TeX-sentinel-check, TeX-LaTeX-sentinel):
Take care of `TeX-PDF-via-dvips-ps2pdf'.
(TeX-dvips-sentinel, TeX-ps2pdf-sentinel): New functions.
(TeX-parse-command, TeX-output-revert-buffer): Delete point in
error message.

* tex.el (TeX-command-list): Add "Dvips" and "Ps2pdf" entries.
(TeX-expand-list): Take care of `TeX-PDF-via-dvips-ps2pdf'.
(TeX-PDF-via-dvips-ps2pdf): New customizable and safe-local
variable.
(TeX-toggle-PDF-via-dvips-ps2pdf): New function.
(TeX-mode-specific-command-menu-entries): Add "PDF via dvips +
ps2pdf" entry.

* doc/auctex.texi (Processor Options): Document
`TeX-PDF-via-dvips-ps2pdf' and fix a typo.

* doc/changes.texi: Mention `TeX-PDF-via-dvips-ps2pdf'.

* doc/quickstart.texi (Processing Facilities): Mention
`TeX-PDF-via-dvips-ps2pdf'.

diff --git a/ChangeLog b/ChangeLog
index 4edd55f..5057a0a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,31 @@
 2015-08-31  Mosè Giordano  <m...@gnu.org>
 
+   * tex-buf.el (TeX-previous-error): Delete point in error message.
+   (TeX-command-default)
+   (TeX-run-set-command): Take care of `TeX-PDF-via-dvips-ps2pdf'.
+   (TeX-run-dvips, TeX-run-ps2pdf): New functions.
+   (TeX-TeX-sentinel, TeX-TeX-sentinel-check, TeX-LaTeX-sentinel):
+   Take care of `TeX-PDF-via-dvips-ps2pdf'.
+   (TeX-dvips-sentinel, TeX-ps2pdf-sentinel): New functions.
+   (TeX-parse-command, TeX-output-revert-buffer): Delete point in
+   error message.
+
+   * tex.el (TeX-command-list): Add "Dvips" and "Ps2pdf" entries.
+   (TeX-expand-list): Take care of `TeX-PDF-via-dvips-ps2pdf'.
+   (TeX-PDF-via-dvips-ps2pdf): New customizable and safe-local
+   variable.
+   (TeX-toggle-PDF-via-dvips-ps2pdf): New function.
+   (TeX-mode-specific-command-menu-entries): Add "PDF via dvips +
+   ps2pdf" entry.
+
+   * doc/auctex.texi (Processor Options): Document
+   `TeX-PDF-via-dvips-ps2pdf' and fix a typo.
+
+   * doc/changes.texi: Mention `TeX-PDF-via-dvips-ps2pdf'.
+
+   * doc/quickstart.texi (Processing Facilities): Mention
+   `TeX-PDF-via-dvips-ps2pdf'.
+
* tex-buf.el: Update copyright year.
(TeX-command-sequence-max-runs-same-command)
(TeX-command-sequence-max-runs): New customizable variables.
diff --git a/doc/auctex.texi b/doc/auctex.texi
index ad1e951..c60d755 100644
--- a/doc/auctex.texi
+++ b/doc/auctex.texi
@@ -2907,6 +2907,33 @@ In particular, fine-tuning the page breaks should be 
done with source
 specials switched off.
 @end deffn
 
+Sometimes you are requested, by journal rules or packages, to compile
+the document into @acronym{DVI} output.  Thus, if you want a
+@acronym{PDF} document in the end you can either use Xe@TeX{} engine,
+see below for information about how to set engines, or compile the
+document with @command{tex} and then convert to @acronym{PDF} with
+@command{dvips}--@command{ps2pdf} before viewing it.  The latter can be
+done automatically in @AUCTeX{} by setting the
+@code{TeX-PDF-via-dvips-ps2pdf} variable to a non-nil value.
+
+@defopt TeX-PDF-via-dvips-ps2pdf
+With @code{TeX-PDF-mode} set to non-nil, if
+@code{TeX-PDF-via-dvips-ps2pdf} is non-nil too, the document is compiled
+with @command{tex} (or @command{latex}) instead of @command{pdftex} (or
+@command{pdflatex}).  When the document is ready, @kbd{C-c C-c} will
+suggest to run @command{dvips} and then @command{ps2pdf} in order to
+convert the @acronym{DVI} file to @acronym{PDF}.  When the @acronym{PDF}
+file is finally ready, the next suggested command will be to open the
+viewer.
+
+This option can also be set as a file local variable, in order to use
+the sequence @command{tex}--@command{dvips}--@command{ps2pdf} on a
+per-document basis.
+
+Recall the whole sequence of @kbd{C-c C-c} commands can be replace by
+th

Re: [AUCTeX-devel] Implementing TeX-update

2015-08-31 Thread Mosè Giordano
Ok, no one objected, then I've applied the patches.

Happy TeXing with new C-c C-u command!

Bye,
Mosè


2015-08-24 18:27 GMT+02:00 Mosè Giordano <m...@gnu.org>:
> 2015-08-17 12:26 GMT+02:00 Mosè Giordano <m...@gnu.org>:
>> Hi list,
>>
>> I've implemented TeX-update, as suggested in the wishlist.  My work
>> follows the same logic of http://www.emacswiki.org/emacs/TN#toc8 and
>> is in part based on it: a function runs the compilation command and
>> calls a sentinel which, when the command finishes, calls back the
>> function and so on until a stopping condition is reached.
>>
>> Some comments about possible copyrights concerns:
>>
>> - `TeX-command-default' is extracted from `TeX-command-query', there
>> is nothing new in it;
>>
>> - the sentinel function `TeX-command-sequence-sentinel' is similar to
>> `TeX-texify-sentinel' of EmacsWiki, but I don't know how a basic
>> sentinel could be written otherwise.  Moreover, how to test whether
>> there have been errors in the last compilation is reported literally
>> in the docstring of `TeX-error-report-switches';
>>
>> - `TeX-command-sequence' has only the last three lines in common with
>> `TeX-texify' of EmacsWiki, which are the setting of a sentinel, how
>> could it be done otherwise?  For the rest these functions are
>> different: `TeX-command-sequence' is much more flexible (see the
>> docstring and the possible values of the first argument) and stopping
>> after a command has been run N times in a row does work, in
>> `TeX-texify' it doesn't.
>>
>> In addition, in the second patch I've added "dvips" and "ps2pdf" rules
>> to `TeX-command-list', and there is a new option
>> `TeX-PDF-via-dvips-ps2pdf' so that one can produce a PDF using latex +
>> dvips + ps2pdf.  Using `TeX-update' all this boils down to a single
>> C-c C-u  :-)
>>
>> I've been using `TeX-update' and dvips + ps2pdf for a week, without
>> problems.  Comments and suggestions welcome.
>
> No comment? :-)

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


[AUCTeX-devel] How to check whether makeindex should be rerun?

2015-08-31 Thread Mosè Giordano
Hi all,

differently from what it's said in section 1.3.2.1 of the manual,
AUCTeX never suggests to run makeindex when needed.  Does someone know
how can we check whether we need to run makeindex?  The .idx file is
rewritten after every latex run, so it's useless to look to its
modification time, and no warning is emitted by the compiler.

A possibility is to store the md5 hash of the .idx file and check
whehter it's changed after running latex.  md5 is pretty fast compared
to other algorithms and I don't think this feature is security-wise.
If I recall correctly, latexmk does the same check.

Bye,
Mosè

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


[AUCTeX-devel] [RFC] parsing \jobname in LaTeX files?

2015-08-31 Thread Mosè Giordano
Hi all,

I'd like to do a little survey: does someone find useful to correctly
parse \jobname in LaTeX files?  To be clear, as it is now,

\include{\jobname-foo}
\addbibresource{\jobname.bib}

are ignored by the parser.[1]  Do you think it's valuable to make
\jobname be replaced by `(TeX-master-file)' when parsing the file?

This should be feasible by changing `LaTeX-auto-cleanup' and some
regexps in `LaTeX-auto-regexp-list', but before starting hacking on it
I'd like some feedback.

Bye,
Mosè

Note:
[1] well, for the bibliography there is also the problem of clashing
basenames :-(

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] [PATCH] Various patches

2015-08-30 Thread Mosè Giordano
Hi Arash,

2015-08-30 15:22 GMT+02:00 Arash Esbati esb...@gmx.de:
 Mosč Giordano m...@gnu.org writes:

 Hi Mosč,

 2015-08-24 22:49 GMT+02:00 Arash Esbati esb...@gmx.de:

 Regarding `TeX-arg-{opening,closing}-brace' values, we have
 `TeX-gr{op,cl}' variables, avoid using hardcoded { and }.  In
 addition, since there is an `optional' argument you may want to bind
 `TeX-arg-{opening,closing}-brace' to `LaTeX-opt{op,cl}' when
 `optional' is non-nil, but that argument is actually always mandatory
 in real cases so this could be an overkill.

 Thanks for your comments.  I went the non overkill route and used
 `TeX-gr{op,cl}' straight away.

 I will clean up the code and make a new patch this weekend.  Reg. the
 other patches, I could also re-submit them as well.  Just give me a hint
 how you want to proceed.

 It would be great if you manage to resend a full changeset, but
 working with ChangeLog conflicts is a bit tedious.

 I know now ;-)  Please find them all attached and thanks for your
 patience.

Patches installed, thank you!

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. a85d7c62dde35869f0e86786d9e9620f333a2527

2015-08-30 Thread Mosè Giordano
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  a85d7c62dde35869f0e86786d9e9620f333a2527 (commit)
   via  a3e3ab866b7147c8662113e3b738cd69b5521b4d (commit)
   via  8d5acb0d4bb8fa376e013ca7c4bf23ee0fa08e73 (commit)
   via  0b3a6e8d51defeda7016d926e2c8bcc8daaf4898 (commit)
   via  2da69abf3049394278346b59d768fd72fef39bdd (commit)
  from  eff71a7bd11b202a4e61094ef9d117a8aa315b65 (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 a85d7c62dde35869f0e86786d9e9620f333a2527
Author: Arash Esbati esb...@gmx.de
Date:   Sun Aug 30 15:12:26 2015 +0200

Add support for undocumented macros `\captionbox[*]'.

* style/caption.el (caption): Add support for undocumented
macros `\captionbox[*]'.
(LaTeX-arg-caption-captionbox): New function.

Signed-off-by: Mosè Giordano m...@gnu.org

diff --git a/ChangeLog b/ChangeLog
index 6fcf165..a5f6908 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2015-08-30  Arash Esbati  esb...@gmx.de
 
+   * style/caption.el (caption): Add support for undocumented
+   macros `\captionbox[*]'.
+   (LaTeX-arg-caption-captionbox): New function.
+
* Makefile.in (STYLESRC): Add new style.
 
* style/transparent.el: New file.
diff --git a/style/caption.el b/style/caption.el
index 0ec6c29..448f611 100644
--- a/style/caption.el
+++ b/style/caption.el
@@ -190,6 +190,51 @@ suffix of the command.
   format name))
 (TeX-argument-insert name optional)))
 
+;; Support for an undocumented feature of caption.sty:
+;; `\captionbox' sets the width of the caption equal to the width of
+;; the contents (a feature provided e.g. by `threeparttable.sty').
+;; The starred version typesets the caption without label and without
+;; entry to the list of figures or tables.
+
+;; The first mandatory argument {heading} contains the caption text
+;; and the label.  We use `TeX-insert-macro' to do the job. (Thanks to
+;; M. Giordano for his valuable comments on this!)
+
+;; Syntax:
+;; \captionbox[list entry]{heading}[width][inner-pos]{contents}
+;; \captionbox*{heading}[width][inner-pos]{contents}
+
+(defun LaTeX-arg-caption-captionbox (optional optional star prompt)
+  Query for the arguments of `\\captionbox' incl. a label and
+insert them.  If STAR is t, then do not query for a `\\label' and
+insert only a caption.
+  (let ((caption (TeX-read-string
+ (TeX-argument-prompt optional prompt Caption
+(LaTeX-indent-line)
+(insert TeX-grop caption)
+(unless star (TeX-insert-macro label))
+(insert TeX-grcl))
+  (let ((width (completing-read (TeX-argument-prompt t prompt Width)
+   (mapcar (lambda(elt) (concat TeX-esc (car elt)))
+   (LaTeX-length-list
+   (inpos (completing-read (TeX-argument-prompt t prompt Inner position)
+   '(c l r s
+(cond (;; 2 optional args
+  (and width (not (string-equal width ))
+   inpos (not (string-equal inpos )))
+  (insert (format [%s][%s] width inpos)))
+ (;; 1st empty opt. arg, 2nd opt. arg
+  (and (string-equal width )
+   inpos (not (string-equal inpos )))
+  (insert (format [][%s] inpos)))
+ (;; 1st opt. arg, 2nd empty opt. arg
+  (and width (not (string-equal width ))
+   (string-equal inpos ))
+  (insert (format [%s] width)))
+ (t ; Do nothing if both empty
+  (ignore
+  (LaTeX-fill-paragraph))
+
 (TeX-add-style-hook
  caption
  (lambda ()
@@ -240,6 +285,10 @@ suffix of the command.
   (TeX-arg-eval completing-read (TeX-argument-prompt nil nil Float type)
LaTeX-caption-supported-float-types))
 
+'(captionbox  [List entry] (LaTeX-arg-caption-captionbox) t)
+
+'(captionbox* (LaTeX-arg-caption-captionbox t) t)
+
 '(ContinuedFloat 0)
 
 '(DeclareCaptionFont
@@ -286,7 +335,8 @@ suffix of the command.
  (eq TeX-install-font-lock 'font-latex-setup))
  (font-latex-add-keywords '((caption   *[{)
(captionlistentry  [{)
-   (captionof *[{))
+   (captionof *[{)
+   (captionbox*[{[[{))
  'textual)
  (font-latex-add-keywords '((captionsetup  *[{)
(clearcaptionsetup *[{)

commit a3e3ab866b7147c8662113e3b738cd69b5521b4d
Author: Arash Esbati esb...@gmx.de
Date:   Sun Aug 30 15:08:31 2015 +0200

Add new 

Re: [AUCTeX-devel] latex-pretty-symbols.el and subscripts (x-symbol): don't display _ or ^

2015-08-24 Thread Mosè Giordano
2015-08-24 9:24 GMT+02:00 Uwe Brauer o...@mat.ucm.es:

 2015-08-23 22:50 GMT+02:00 Uwe Brauer o...@mat.ucm.es:


 Speaking for myself, I don't like code disappearing.  Instead I like
 AUCTeX' approach: {sub,super}scripts are rendered as such but ^ and
 _ (and braces) are still there.

 Usually I agree, but in this specific case, I prefer to not see ^ and _.

I see, but with `latex-pretty-symbol' only ^{1} is prettified, not
^{12} for example, in my opinion its utility is limited.

 I thought that adding another
 `substitute-patterns-with-unicode-symbol' would have overridden the
 one in `latex-unicode-simplified', but it doesn't seem to be the case.
 Then, redefining `latex-unicode-simplified' seems to be the way to go.


 Why?  I'm not a hardcore TeX-fold-mode user, actually I seldom use it,
 I don't know why you say you have to do that.

 Here is the scenario:
 \begin{equation}
 \label{eq:new:1}
 \int f(x)dx =0
 \end{equation}

 Now TeX-fold-buffer gives:
 \begin{equation}
 [l]
 ∫ f(x)dx =0
 \end{equation}

 So the integral is represented by its unicode symbol.
 Now I modify the equation

 \begin{equation}
 [l]
 ∫ f(x)dx = \sum_{j=1}^{\infty}
 \end{equation}

 Sum is NOT represented this way, however when I run
 TeX-fold-clearout-buffer, and then again TeX-fold buffer I obtain:

 \begin{equation}
 [l]
 ∫ f(x)dx = ∑_{j=1}^{∞}
 \end{equation}

 Can you reproduce this behavior? Don't you think that it is
 inconvenient?

Actually you don't need to issue `TeX-fold-clearout-buffer' before
`TeX-fold-buffer', but this isn't the point.  IIUC, you'd prefer
automatic folding as you type, right?  I'm not aware of such a feature
and a quick look to the manual doesn't help me.

Pperhaps last Tassilo's commit has something to do with this topic
(not TeX-folding-mode though).

Bye,
Mosè

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] Implementing TeX-update

2015-08-24 Thread Mosè Giordano
2015-08-17 12:26 GMT+02:00 Mosè Giordano m...@gnu.org:
 Hi list,

 I've implemented TeX-update, as suggested in the wishlist.  My work
 follows the same logic of http://www.emacswiki.org/emacs/TN#toc8 and
 is in part based on it: a function runs the compilation command and
 calls a sentinel which, when the command finishes, calls back the
 function and so on until a stopping condition is reached.

 Some comments about possible copyrights concerns:

 - `TeX-command-default' is extracted from `TeX-command-query', there
 is nothing new in it;

 - the sentinel function `TeX-command-sequence-sentinel' is similar to
 `TeX-texify-sentinel' of EmacsWiki, but I don't know how a basic
 sentinel could be written otherwise.  Moreover, how to test whether
 there have been errors in the last compilation is reported literally
 in the docstring of `TeX-error-report-switches';

 - `TeX-command-sequence' has only the last three lines in common with
 `TeX-texify' of EmacsWiki, which are the setting of a sentinel, how
 could it be done otherwise?  For the rest these functions are
 different: `TeX-command-sequence' is much more flexible (see the
 docstring and the possible values of the first argument) and stopping
 after a command has been run N times in a row does work, in
 `TeX-texify' it doesn't.

 In addition, in the second patch I've added dvips and ps2pdf rules
 to `TeX-command-list', and there is a new option
 `TeX-PDF-via-dvips-ps2pdf' so that one can produce a PDF using latex +
 dvips + ps2pdf.  Using `TeX-update' all this boils down to a single
 C-c C-u  :-)

 I've been using `TeX-update' and dvips + ps2pdf for a week, without
 problems.  Comments and suggestions welcome.

No comment? :-)

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] latex-pretty-symbols.el and subscripts (x-symbol): don't display _ or ^

2015-08-24 Thread Mosè Giordano
2015-08-24 18:35 GMT+02:00 Uwe Brauer o...@mat.ucm.es:
 Actually you don't need to issue `TeX-fold-clearout-buffer' before
 `TeX-fold-buffer', but this isn't the point.  IIUC, you'd prefer
 automatic folding as you type, right?

 That is correct but maybe this is very resource consuming?

I think so, in a long buffer `TeX-fold-buffer' can take a sensible
time.  `TeX-fold-dwim' is much faster but definitely not a solution.

Bye,
Mosè

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] [PATCH] Various patches

2015-08-24 Thread Mosè Giordano
Hi Arash,

2015-08-24 22:49 GMT+02:00 Arash Esbati esb...@gmx.de:
 Mosè Giordano m...@gnu.org writes:

 Hi Mosè,

 2015-08-22 12:13 GMT+02:00 Arash Esbati esb...@gmx.de:
 As always, any comments welcome.

 I reviewed your patches, they're overall fine, as usual, I have only a
 minor concern about captionbox: for the label you could simply call

 (TeX-insert-macro label)

 which will do the-right-thing.

 Many thanks again for looking at this.  Indeed, `TeX-insert-macro' does
 the trick.  Now I have:

 --8---cut here---start-8---
 (defun LaTeX-arg-caption-captionbox (optional optional star prompt)
   Query for the arguments of `\\captionbox' incl. a label and
 insert them.  If STAR is t, then do not query for a `\\label' and
 insert only a caption.
   (let ((caption (TeX-read-string (TeX-argument-prompt optional prompt 
 Caption)))
 (TeX-arg-opening-brace {)
 (TeX-arg-closing-brace }))
 (LaTeX-indent-line)
 (insert TeX-arg-opening-brace caption)
 (unless star (TeX-insert-macro label))
 (insert TeX-arg-closing-brace))
   (let ((width (completing-read (TeX-argument-prompt t prompt Width)
   (mapcar (lambda(elt) (concat TeX-esc (car 
 elt)))
   (LaTeX-length-list
 (inpos (completing-read (TeX-argument-prompt t prompt Inner 
 position)
'(c l r s
 (cond (;; 2 optional args
(and width (not (string-equal width ))
 inpos (not (string-equal inpos )))
(insert (format [%s][%s] width inpos)))
   (;; 1st empty opt. arg, 2nd opt. arg
(and (string-equal width )
 inpos (not (string-equal inpos )))
(insert (format [][%s] inpos)))
   (;; 1st opt. arg, 2nd empty opt. arg
(and width (not (string-equal width ))
 (string-equal inpos ))
(insert (format [%s] width)))
   (t ; Do nothing if both empty
(ignore
   (LaTeX-fill-paragraph))
 --8---cut here---end---8---

Regarding `TeX-arg-{opening,closing}-brace' values, we have
`TeX-gr{op,cl}' variables, avoid using hardcoded { and }.  In
addition, since there is an `optional' argument you may want to bind
`TeX-arg-{opening,closing}-brace' to `LaTeX-opt{op,cl}' when
`optional' is non-nil, but that argument is actually always mandatory
in real cases so this could be an overkill.

 I will clean up the code and make a new patch this weekend.  Reg. the
 other patches, I could also re-submit them as well.  Just give me a hint
 how you want to proceed.

It would be great if you manage to resend a full changeset, but
working with ChangeLog conflicts is a bit tedious.  You could create a
branch from current AUCTeX master HEAD and cherry-pick one by one your
commits and fix one by one ChangeLog conflicts.  This should work.

Bye,
Mosè

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] [PATCH] Various patches

2015-08-23 Thread Mosè Giordano
Hi Arash,

2015-08-22 12:13 GMT+02:00 Arash Esbati esb...@gmx.de:
 As always, any comments welcome.

I reviewed your patches, they're overall fine, as usual, I have only a
minor concern about captionbox: for the label you could simply call

(TeX-insert-macro label)

which will do the-right-thing.  In this way `TeX-read-label' isn't
needed anymore.!  So,

(TeX-argument-insert heading optional)

can be replaced by (didn't actually tested, but this or something
close to this should do the trick)

(insert TeX-arg-opening-brace caption)
(if star (TeX-insert-macro label))
(insert TeX-arg-closing-brace)

Just remember to let-bind the opening/closing brace depending on the
value of `optional'.

Sorry, I didn't look closely to the patch in your previous email.

Bye,
Mosè

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] latex-pretty-symbols.el and subscripts (x-symbol): don't display _ or ^

2015-08-23 Thread Mosè Giordano
Hi Uwe,

2015-08-23 17:26 GMT+02:00 Uwe Brauer o...@mat.ucm.es:
 Hello

 I just found out that latex-pretty-symbols.el provides, at first glance,
 basically the same features as x-symbol-mode.

 However there is one small difference:

 - both package display sub and superscripts actually one a
   lower/higher position compared with the orginal line as in
   $\int_a^b$, however x-symbol-mode does *not* display _ or ^,
   while GNU emacs does. Can I customize this behaviour?

I hope it's clear `latex-pretty-symbols' has nothing to do with AUCTeX
;-)  Anyway, the question is fairly easy to answer: looking to the
code it doesn't seem you can choose what to prettify and what not.
You can either redefine `latex-unicode-simplified' without all
{sub,super}script entries or add a new function to the hook reverting
that change.  In the latter case, make sure the new function is
evaluated after `latex-unicode-simplified'.  In package source code
there is the email address of the author: you could suggest him to
make some symbols optional.

Just out of curiosity, what's wrong with AUCTeX' fold mode?  At least,
when point is on a macro it's expanded to the real code and you can
edit it, with latex-pretty-symbol I find this less convenient.

Bye,
Mosè

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] latex-pretty-symbols.el and subscripts (x-symbol): don't display _ or ^

2015-08-23 Thread Mosè Giordano
2015-08-23 22:50 GMT+02:00 Uwe Brauer o...@mat.ucm.es:
 Mosè == Mosè Giordano m...@gnu.org writes:

 Hi Uwe,
 2015-08-23 17:26 GMT+02:00 Uwe Brauer o...@mat.ucm.es:

 I hope it's clear `latex-pretty-symbols' has nothing to do with AUCTeX
 ;-)

 Point taken, I sometimes (ab)use the auctex mailing list as a general
 list for editing latex files in (X)emacs, which would include reftex,
 cdlatex x-symbol etc.

Well, RefTeX is on-topic here since we develop also that package ;-)

 I also thought that the issue of sub and superscripts is a general
 feature of GNU emacs, however in the context of latex files it is the
 most relevant, but now I understand that the super subscript issue is of
 more special character as the following paragraph suggests.
 Or in other words it is not possible in general to make the _ and the ^
 disappear, which is sad and ugly.

Speaking for myself, I don't like code disappearing.  Instead I like
AUCTeX' approach: {sub,super}scripts are rendered as such but ^ and
_ (and braces) are still there.

 Anyway, the question is fairly easy to answer: looking to the
 code it doesn't seem you can choose what to prettify and what not.
 You can either redefine `latex-unicode-simplified' without all
 {sub,super}script entries or add a new function to the hook reverting
 that change.  In the latter case, make sure the new function is
 evaluated after `latex-unicode-simplified'.  In package source code
 there is the email address of the author: you could suggest him to
 make some symbols optional.

 Right, what I miss most know is the inverse function of 
 latex-unicode-simplified.

I thought that adding another
`substitute-patterns-with-unicode-symbol' would have overridden the
one in `latex-unicode-simplified', but it doesn't seem to be the case.
Then, redefining `latex-unicode-simplified' seems to be the way to go.

 Just out of curiosity, what's wrong with AUCTeX' fold mode?  At least,
 when point is on a macro it's expanded to the real code and you can
 edit it, with latex-pretty-symbol I find this less convenient.

 I tend to disagree, see my comments below, however I agree: a inverse
 function to  latex-unicode-simplified would be convenient.

 As for AUCTeX fold mode: first of all in Xemacs it does have the
 features that are present  in GNU emacs: replacing (using overlays?) math 
 constructs such
 as \int really by its (unicode?) Symbols.

 However I consider the fold mode as being  inconvenient. When
 I modify a formula I have to toggle all the time
 TeX-fold-buffer
 and
 TeX-fold-clearout-buffer.

Why?  I'm not a hardcore TeX-fold-mode user, actually I seldom use it,
I don't know why you say you have to do that.

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. 40963e5f00d689045f3c707d1f293b929547ced2

2015-08-21 Thread Mosè Giordano
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  40963e5f00d689045f3c707d1f293b929547ced2 (commit)
  from  a4d23f65e86c5f18a0722d9f037daa61b54beb91 (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 40963e5f00d689045f3c707d1f293b929547ced2
Author: Mosè Giordano m...@gnu.org
Date:   Fri Aug 21 15:23:24 2015 +0200

Check engine before running LaTeX command.

* tex-buf.el (TeX-check-engine): New customizable variable.
(TeX-check-engine-list): New variable.
(TeX-check-engine-add-engines): New function.
(TeX-check-engine): New function.
(TeX-command): Use `TeX-check-engine' and update docstring
accordingly.

* style/fontspec.el (fontspec): Add engine restrictions.

* doc/auctex.texi (Processor Options): Document
`TeX-check-engine'.

* doc/changes.texi: Mention `TeX-check-engine'.

diff --git a/ChangeLog b/ChangeLog
index e2c8ac8..7201d85 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2015-08-21  Mosè Giordano  m...@gnu.org
+
+   * tex-buf.el (TeX-check-engine): New customizable variable.
+   (TeX-check-engine-list): New variable.
+   (TeX-check-engine-add-engines): New function.
+   (TeX-check-engine): New function.
+   (TeX-command): Use `TeX-check-engine' and update docstring
+   accordingly.
+
+   * style/fontspec.el (fontspec): Add engine restrictions.
+
+   * doc/auctex.texi (Processor Options): Document
+   `TeX-check-engine'.
+
+   * doc/changes.texi: Mention `TeX-check-engine'.
+
 2015-08-20  Mosè Giordano  m...@gnu.org
 
* tex-buf.el (TeX-error-overview-jump-to-source)
diff --git a/doc/auctex.texi b/doc/auctex.texi
index 09935c9..141afff 100644
--- a/doc/auctex.texi
+++ b/doc/auctex.texi
@@ -2950,6 +2950,20 @@ command can either be a variable or a string.  An empty 
string or nil
 means there is no command available.
 @end defopt
 
+Some @LaTeX{} packages requires the document to be compiled with a
+specific engine.  Notably examples are fontspec and polyglossia
+packages, which require Lua@TeX{} and Xe@TeX{} engines.  If you try to
+compile a document which loads one of such packages and the set engine
+is not one of those allowed you will be asked to select a different
+engine before running the @LaTeX{} command.  If you do not want to be
+warned by @AUCTeX{} in these cases, customize the option
+@code{TeX-check-engine}.
+
+@defopt TeX-check-engine
+This boolean option controls whether @AUCTeX{} should check the correct
+engine has been set before running @LaTeX{} commands.
+@end defopt
+
 As shown above, @AUCTeX{} handles in a special way most of the main
 options that can be given to the @TeX{} processors.  When you need to
 pass to the @TeX{} processor arbitrary options not handled by @AUCTeX{},
diff --git a/doc/changes.texi b/doc/changes.texi
index 1dd552d..2178387 100644
--- a/doc/changes.texi
+++ b/doc/changes.texi
@@ -34,6 +34,11 @@ Indent @samp{\[...\]} math mode as a regular environment by 
default.
 @item
 @code{TeX-view-program-list} can contain, as third optional element of
 each item, the name of the executable(s) needed to open the viewer.
+
+@item
+When new option @code{TeX-check-engine} is non-nil, before running
+@LaTeX{} commands @AUCTeX{} will check whether the correct engine has
+been set, based upon known restrictions posed by @LaTeX{} packages.
 @end itemize
 
 @heading News in 11.88
diff --git a/style/fontspec.el b/style/fontspec.el
index 144b976..5ec7bb4 100644
--- a/style/fontspec.el
+++ b/style/fontspec.el
@@ -166,6 +166,7 @@ to retrieve the list of fonts.
 (TeX-add-style-hook
  fontspec
  (lambda ()
+   (TeX-check-engine-add-engines 'luatex 'xetex)
(TeX-run-style-hooks expl3 xparse)
(TeX-add-symbols
 ;; Font selection
diff --git a/tex-buf.el b/tex-buf.el
index cdd5fe2..3be47d7 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -332,6 +332,96 @@ This works only with TeX commands and if the
 (defconst TeX-error-overview-buffer-name *TeX errors*
   Name of the buffer in which to show error list.)
 
+(defcustom TeX-check-engine t
+  Whether AUCTeX should check the correct engine has been set before running 
LaTeX commands.
+  :group 'TeX-command
+  :type 'boolean)
+
+(defvar TeX-check-engine-list '(default luatex omega xetex)
+  List of engines required by the loaded TeX packages.
+
+Do not set this variable directly, use
+`TeX-check-engine-add-engines' to specify required engines.)
+(make-variable-buffer-local 'TeX-check-engine-list)
+
+(defun TeX-check-engine-add-engines (rest engines)
+  Add ENGINES to list of required engines.
+
+Set `TeX-check-engine-list' to the intersection between

Re: [AUCTeX-devel] Check engines before running LaTeX

2015-08-21 Thread Mosè Giordano
Hi Tassilo,

2015-08-21 8:15 GMT+02:00 Tassilo Horn t...@gnu.org:
 Mosè Giordano m...@gnu.org writes:

 Hi Mosè,

 I sometimes happen to try to compile documents with a wrong engine
 (above all example documents found on the Internet and the culprits
 are fontspec and polyglossia, which require LuaTeX or XeTeX).  I'd
 like to be warned by AUCTeX that I'm going to get an error, then I
 wrote the attached patch.

 Style authors should specify the engines required by the package (e.g.
 LuaTeX and XeTeX for fontspec and polyglossia), then if the option
 `TeX-check-engine' is non-nil the user will be warned before running
 LaTeX command that a wrong engine has been selected, for example when
 `TeX-engine' is set to `default'.

 If you know other packages requiring a specific engine please tell us.

 No, not exactly engine dependencies.  But other packages have other
 requirements.  For example, minted requires that you use -shell-escape
 (--shell-escape with LuaTeX).  And to use pstricks with LuaTeX, you need
 something like

 \RequirePackage{ifluatex}
 \documentclass{article}

 \ifluatex
   \usepackage{fontspec}
   \setmainfont{TeX Gyre Pagella}
 \else
   \usepackage{tgpagella}
   \usepackage{pstricks}
 \fi
 \usepackage{auto-pst-pdf}

 which is not really testable.

Uhm, I'm not sure this isn't testable, but this would be anyway too
much tailored to a non basic package.  Instead, fontspec and
polyglossia are almost mandatory when using Lua/XeLaTeX.  By the way,
I once wrote down a style file for polyglossia, I should review and
update it one day.

 And hyperref, varioref, and cleveref can be used only if they are
 use-packaged in one specific order.

 So the constraints can be much more complex than just being restricted
 to some special engine, and I think the engine is the simplest part of
 it.

 But that shouldn't stop you of course.  If you think it's helpful, then
 by all means do it.

Thanks, done.

Bye,
Mosè

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


[AUCTeX-devel] Check engines before running LaTeX

2015-08-20 Thread Mosè Giordano
Hi all,

I sometimes happen to try to compile documents with a wrong engine
(above all example documents found on the Internet and the culprits
are fontspec and polyglossia, which require LuaTeX or XeTeX).  I'd
like to be warned by AUCTeX that I'm going to get an error, then I
wrote the attached patch.

Style authors should specify the engines required by the package (e.g.
LuaTeX and XeTeX for fontspec and polyglossia), then if the option
`TeX-check-engine' is non-nil the user will be warned before running
LaTeX command that a wrong engine has been selected, for example when
`TeX-engine' is set to `default'.

If you know other packages requiring a specific engine please tell us.

Comments?

Bye,
Mosè
diff --git a/style/fontspec.el b/style/fontspec.el
index 144b976..5ec7bb4 100644
--- a/style/fontspec.el
+++ b/style/fontspec.el
@@ -166,6 +166,7 @@ to retrieve the list of fonts.
 (TeX-add-style-hook
  fontspec
  (lambda ()
+   (TeX-check-engine-add-engines 'luatex 'xetex)
(TeX-run-style-hooks expl3 xparse)
(TeX-add-symbols
 ;; Font selection
diff --git a/tex-buf.el b/tex-buf.el
index b5ed365..dc7e3c6 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -332,6 +332,91 @@ This works only with TeX commands and if the
 (defconst TeX-error-overview-buffer-name *TeX errors*
   Name of the buffer in which to show error list.)
 
+(defcustom TeX-check-engine t
+  Whether AUCTeX should check the correct engine has been set before running LaTeX commands.
+  :group 'TeX-command
+  :type 'boolean)
+
+(defvar TeX-check-engine-list '(default luatex omega xetex)
+  List of engines required by the loaded TeX packages.
+
+Do not set this variable directly, use
+`TeX-check-engine-add-engines' to specify required engines.)
+(make-variable-buffer-local 'TeX-check-engine-list)
+
+(defun TeX-check-engine-add-engines (rest engines)
+  Add ENGINES to list of required engines.
+
+This function calculates the intersection between
+`TeX-check-engine-list' and the list of provided engines.
+
+See for example style/fontspec.el
+  (let ((list TeX-check-engine-list)
+	(res nil))
+(setq TeX-check-engine-list
+	  ;; The following is based on the definition of `cl-intersection' of
+	  ;; GNU Emacs.
+	  (and list engines
+	   (if (equal list engines) list
+		 (or (= (length list) (length engines))
+		 (setq list (prog1 engines (setq engines list
+		 (while engines
+		   (if (memq (car engines) list)
+		   (push (car engines) res))
+		   (pop engines))
+		 res)
+
+(defun TeX-check-engine ()
+  Check the correct engine has been set.
+
+Look into `TeX-check-engine-list' for the required engines.
+  (and TeX-check-engine-list
+   (null (memq TeX-engine TeX-check-engine-list))
+   (memq TeX-engine '(default luatex omega xetex))
+   ;; The engine set is not listed in `TeX-check-engine-list'.  We check
+   ;; only builtin engines because we can't take care of custom ones.  Do
+   ;; nothing if there is no allowed engine, we don't know what to do in
+   ;; that case.
+   (let ((length (length TeX-check-engine-list))
+	 (name-alist '((default . TeX)
+			   (luatex  . LuaTeX)
+			   (omega   . Omega)
+			   (xetex   . XeTeX)))
+	 (completion-ignore-case t)
+	 (engine nil))
+	 (cond
+	  ;; There is exactly one allowed engine.
+	  ((= length 1)
+	   (if (y-or-n-p (format %s is required to build this document.
+Do you want to use this engine? (cdr (assoc (car TeX-check-engine-list)
+	 name-alist
+	   (setq engine (car TeX-check-engine-list
+	  ;; More than one engine is allowed.
+	  (( length 1)
+	   (if (y-or-n-p (format %s are required to build this document.
+Do you want to select one of these engines?
+ (mapconcat
+  (lambda (elt) (cdr (assoc elt name-alist)))
+  TeX-check-engine-list , )))
+	   (setq engine
+		 (car (rassoc
+			   (completing-read
+			(format
+			 Choose between %s: 
+			 (mapconcat
+			  (lambda (elt) (cdr (assoc elt name-alist)))
+			  TeX-check-engine-list , ))
+			(mapcar
+			 (lambda (elt) (cdr (assoc elt name-alist)))
+			 TeX-check-engine-list))
+			   name-alist))
+	 (when engine
+	   (TeX-engine-set engine)
+	   (when (and (fboundp 'add-file-local-variable)
+		  (y-or-n-p Do you want to remember the choice?))
+	 (add-file-local-variable 'TeX-engine engine)
+	 (save-buffer))
+
 (defun TeX-command (name file optional override-confirm)
   Run command NAME on the file returned by calling FILE.
 
@@ -343,7 +428,13 @@ Use the information in `TeX-command-list' to determine how to run
 the command.
 
 If OVERRIDE-CONFIRM is a prefix argument, confirmation will be
-asked if it is positive, and suppressed if it is not.
+asked if it is positive, and suppressed if it is not.
+
+When `TeX-check-engine' is non-nil, check the correct engine has
+been set before running LaTeX commands.
+  (and (string= name LaTeX) TeX-check-engine
+   (TeX-check-engine))
+
   (cond ((eq file 

[AUCTeX-diffs] GNU AUCTeX branch, master, updated. a4d23f65e86c5f18a0722d9f037daa61b54beb91

2015-08-20 Thread Mosè Giordano
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  a4d23f65e86c5f18a0722d9f037daa61b54beb91 (commit)
  from  2648a5807bf6567b86ecd9342a39d439c7288b38 (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 a4d23f65e86c5f18a0722d9f037daa61b54beb91
Author: Mosè Giordano m...@gnu.org
Date:   Thu Aug 20 16:33:06 2015 +0200

Add menu and new functions for error overview.

* tex-buf.el (TeX-error-overview-jump-to-source)
(TeX-error-overview-goto-log): New functions.
(TeX-error-overview-mode-map): Add
`TeX-error-overview-jump-to-source' and
`TeX-error-overview-goto-log'.
(TeX-error-overview-menu): Define menu for TeX error overview.
(TeX-error-overview-mode): Add menu.

* doc/auctex.texi (top)
(Debugging): Add section for error overview.
(Error overview): Document new functions and keys.

diff --git a/ChangeLog b/ChangeLog
index 876673f..e2c8ac8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2015-08-20  Mosè Giordano  m...@gnu.org
+
+   * tex-buf.el (TeX-error-overview-jump-to-source)
+   (TeX-error-overview-goto-log): New functions.
+   (TeX-error-overview-mode-map): Add
+   `TeX-error-overview-jump-to-source' and
+   `TeX-error-overview-goto-log'.
+   (TeX-error-overview-menu): Define menu for TeX error overview.
+   (TeX-error-overview-mode): Add menu.
+
+   * doc/auctex.texi (top)
+   (Debugging): Add section for error overview.
+   (Error overview): Document new functions and keys.
+
 2015-08-19  Mosè Giordano  m...@gnu.org
 
* latex.el (LaTeX-label): Mention in the docstring the returned
diff --git a/doc/auctex.texi b/doc/auctex.texi
index 6307637..09935c9 100644
--- a/doc/auctex.texi
+++ b/doc/auctex.texi
@@ -188,6 +188,10 @@ Viewing the Formatted Output
 * Starting Viewers::Starting viewers
 * I/O Correlation:: Forward and inverse search
 
+Catching the errors
+
+* Error overview::  List of all errors and warnings
+
 Customization and Extension
 
 * Multifile::   Multifile Documents
@@ -3210,7 +3214,9 @@ to do exactly.  In xdvi you normally have to use 
@kbd{C-down-mouse-1}.
 @cindex Underfull boxes
 
 Once you've formatted your document you may `debug' it, i.e. browse
-through the errors (La)@TeX{} reported.
+through the errors (La)@TeX{} reported.  If you have GNU Emacs 24 or
+later, you may also have a look at a nicely formatted list of all errors
+and warnings reported by the compiler.
 
 @deffn Command TeX-next-error @var{arg} @var{reparse}
 @kindex C-c `
@@ -3277,6 +3283,13 @@ terse information about the error is displayed in the 
echo area.  If
 @TeX{} output.
 @end defopt
 
+@menu
+* Error overview::List of all errors and warnings
+@end menu
+
+@node Error overview
+@subsection List of all errors and warnings
+
 When the option @code{TeX-parse-all-errors} is non-nil, you will be also
 able to open an overview of all errors and warnings reported by the TeX
 compiler.  This feature requires @code{tabulated-list-mode}, shipped
@@ -3290,7 +3303,9 @@ In this window you can visit the error on which point is 
on by pressing
 @key{RET}, and visit the next or previous issue by pressing @key{n} or
 @key{p} respectively.  A prefix argument to these keys specifies how
 many errors to move forward or backward.  You can visit an error also by
-clicking on its message.  Press @key{q} to quit the overview.
+clicking on its message.  Jump to error point in the source code with
+@key{j}, and use @key{l} see the error in the log buffer.  Press @key{q}
+to quit the overview.
 @end deffn
 
 @defopt TeX-error-overview-open-after-TeX-run
diff --git a/tex-buf.el b/tex-buf.el
index b5ed365..cdd5fe2 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -2701,6 +2701,21 @@ forward, if negative).
   (interactive p)
   (TeX-error-overview-next-error (- arg)))
 
+(defun TeX-error-overview-jump-to-source ()
+  Display the help and move point to the error source.
+  (interactive)
+  (TeX-error-overview-goto-source)
+  (pop-to-buffer
+   (save-window-excursion
+ (select-window TeX-error-overview-orig-window)
+ (current-buffer
+
+(defun TeX-error-overview-goto-log ()
+  Display the current error in log buffer.
+  (interactive)
+  (let ((TeX-display-help 'expert))
+(TeX-error-overview-goto-source)))
+
 (defun TeX-error-overview-quit ()
   Delete the window or the frame of the error overview.
   (interactive)
@@ -2712,6 +2727,8 @@ forward, if negative).
 (defvar TeX-error-overview-mode-map
   (let ((map (make-sparse-keymap))
(menu-map (make-sparse-keymap)))
+(define-key map j'TeX-error

Re: [AUCTeX-devel] Any equivalent to `reftex-label' in AUCTeX

2015-08-19 Thread Mosè Giordano
Hi Arash,

2015-08-19 0:27 GMT+02:00 Arash Esbati esb...@gmx.de:
 Mosè Giordano m...@gnu.org writes:

 Hi Mosè,

 2015-08-18 22:19 GMT+02:00 Arash Esbati esb...@gmx.de:

 [...]

 My question is, does AUCTeX has something equivalent to `reftex-label'
 or should I just read the label as a string?

 To insert a new label there is `TeX-arg-define-label', instead to read
 a label we have `TeX-arg-label'.  There is also `LaTeX-label' to
 insert the whole \label{} macro (which is probably what you're
 looking for, right?).

 thanks for your response.  Indeed, I want to read-in the label and then
 insert it at once with the caption text.  The issue with the other
 functions you mentioned is that they insert text at point upon
 execution, i.e.:

 --8---cut here---start-8---
 \begin{figure}
   % with (reftex-label nil t): Works
   \captionbox{foobar\label{fig:foo}}{}
   % with (TeX-arg-define-label)
   \captionbox{fig:foo}{foobar\label{nil}}{}
   % with (LaTeX-label 'environment)
   \captionbox\label{fig:foo}{foobar\label{fig:foo}}{}
 \end{figure}
 --8---cut here---end---8---

 The function was modified like this:
 --8---cut here---start-8---

 (defun LaTeX-arg-caption-captionbox (optional optional prompt)
   Query for the arguments of `\\captionbox' incl. a label and
 insert them.
   (let* ((caption (TeX-read-string (TeX-argument-prompt optional prompt 
 Caption)))
  (label   ; (if (fboundp 'reftex-label)  Version 1
   ; (reftex-label nil t) Version 1
   ;  (TeX-read-string (TeX-argument-prompt optional prompt 
 Label))) Version 1
   ;(TeX-arg-define-label optional prompt) ; Version 2
   (LaTeX-label 'environment) ;; Version 3
   )
  (width   (completing-read (TeX-argument-prompt t prompt Width)
(mapcar (lambda(elt) (concat TeX-esc (car 
 elt)))
(LaTeX-length-list
  (inpos   (completing-read (TeX-argument-prompt t prompt Inner 
 position)
'(c l r s)))
  (heading (format %s\\label{%s} caption label)))
 (LaTeX-indent-line)
 (TeX-argument-insert heading optional)
 (cond (;; 2 optional args
(and width (not (string-equal width ))
 inpos (not (string-equal inpos )))
(insert (format [%s][%s] width inpos)))
   (;; 1st empty opt. arg, 2nd opt. arg
(and (string-equal width )
 inpos (not (string-equal inpos )))
(insert (format [][%s] inpos)))
   (;; 1st opt. arg, 2nd empty opt. arg
(and width (not (string-equal width ))
 (string-equal inpos ))
(insert (format [%s] width)))
   (t ; Do nothing if both empty
(ignore)))
 (LaTeX-fill-paragraph)))
 --8---cut here---end---8---

 As a rule of thumb, in AUCTeX you should always use these functions
 and avoid using reftex' ones, since the jobs are seamlessly
 transferred to the reftex equivalents if `reftex-plug-into-AUCTeX' has
 been called.

 Of course, you're right.  But do you a hint how I can achieve the
 desired result with AUCTeX functions?

With the brand-new `TeX-arg-label' function!

I'd suggest you to use the same check done inside `LaTeX-label' (if
`LaTeX-label-function' is a valid function call it), but I suspect you
need to pass to `reftex-label' also the second argument, which is not
requested by `LaTeX-label-function'.  Probably there aren't many other
functions bound to `LaTeX-label-function' apart from `reftex-label',
in which case we could update the docstring of `LaTeX-label-function'
requesting also a second argument, but we need some feedback from
users before doing this change.

Bye,
Mosè

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] Any equivalent to `reftex-label' in AUCTeX

2015-08-19 Thread Mosè Giordano
2015-08-19 16:58 GMT+02:00 Mosè Giordano m...@gnu.org:
 With the brand-new `TeX-arg-label' function!

Of course I meant `TeX-read-label' ;-)

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. 2648a5807bf6567b86ecd9342a39d439c7288b38

2015-08-19 Thread Mosè Giordano
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  2648a5807bf6567b86ecd9342a39d439c7288b38 (commit)
  from  c896f96bc44577680b777bc4cd6f477181f13784 (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 2648a5807bf6567b86ecd9342a39d439c7288b38
Author: Mosè Giordano m...@gnu.org
Date:   Wed Aug 19 16:46:46 2015 +0200

New function to read labels.

* latex.el (LaTeX-label): Mention in the docstring the returned
value.  Let-bind `TeX-read-label-prefix' and use `TeX-read-label'
to read the label.
(TeX-read-label-prefix): New variable.
(TeX-read-label): New function.
(TeX-arg-label): Use `TeX-read-label' and mention
`TeX-read-label-prefix' in docstring.
(TeX-arg-define-label): Mention `TeX-read-label-prefix' in
docstring.

diff --git a/ChangeLog b/ChangeLog
index 2e1516b..876673f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2015-08-19  Mosè Giordano  m...@gnu.org
+
+   * latex.el (LaTeX-label): Mention in the docstring the returned
+   value.  Let-bind `TeX-read-label-prefix' and use `TeX-read-label'
+   to read the label.
+   (TeX-read-label-prefix): New variable.
+   (TeX-read-label): New function.
+   (TeX-arg-label): Use `TeX-read-label' and mention
+   `TeX-read-label-prefix' in docstring.
+   (TeX-arg-define-label): Mention `TeX-read-label-prefix' in
+   docstring.
+
 2015-08-14  Arash Esbati  esb...@gmx.de
 
* latex.el (LaTeX-common-initialization): Fix the subgroup number
diff --git a/latex.el b/latex.el
index 8561535..8f613c2 100644
--- a/latex.el
+++ b/latex.el
@@ -993,35 +993,36 @@ you will be always prompted for a label, with an empty 
default
 prefix.
 
 If `LaTeX-label-function' is a valid function, LaTeX label will
-transfer the job to this function.
-  (let ((prefix (cond
-((eq type 'environment)
- (cdr (assoc name LaTeX-label-alist)))
-((eq type 'section)
- (if (assoc name LaTeX-section-list)
- (if (stringp LaTeX-section-label)
- LaTeX-section-label
-   (and (listp LaTeX-section-label)
-(cdr (assoc name LaTeX-section-label
-   ))
-((null type)
- )
-(t
- nil)))
+transfer the job to this function.
+
+The inserted label is returned, nil if it is empty.
+  (let ((TeX-read-label-prefix
+(cond
+ ((eq type 'environment)
+  (cdr (assoc name LaTeX-label-alist)))
+ ((eq type 'section)
+  (if (assoc name LaTeX-section-list)
+  (if (stringp LaTeX-section-label)
+  LaTeX-section-label
+(and (listp LaTeX-section-label)
+ (cdr (assoc name LaTeX-section-label
+))
+ ((null type)
+  )
+ (t
+  nil)))
label)
-(when (symbolp prefix)
-  (setq prefix (symbol-value prefix)))
-(when prefix
+(when (symbolp TeX-read-label-prefix)
+  (setq TeX-read-label-prefix (symbol-value TeX-read-label-prefix)))
+(when TeX-read-label-prefix
   (if (and (boundp 'LaTeX-label-function)
   LaTeX-label-function
   (fboundp LaTeX-label-function))
  (setq label (funcall LaTeX-label-function name))
;; Use completing-read as we do with `C-c C-m \label RET'
-   (setq label (completing-read
-(TeX-argument-prompt t nil What label)
-(LaTeX-label-list) nil nil prefix))
+   (setq label (TeX-read-label t What label t))
;; No label or empty string entered?
-   (if (or (string= prefix label)
+   (if (or (string= TeX-read-label-prefix label)
(string=  label))
(setq label nil)
  (insert TeX-esc label TeX-grop label TeX-grcl))
@@ -1773,17 +1774,32 @@ If OPTIONAL is non-nil, insert the resulting value as 
an optional
 argument, otherwise as a mandatory one.
   (TeX-argument-insert (eval args) optional))
 
-(defun TeX-arg-label (optional optional prompt definition)
-  Prompt for a label completing with known labels.
+(defvar TeX-read-label-prefix nil
+  Initial input for the label in `TeX-read-label.')
+
+(defun TeX-read-label (optional optional prompt definition)
+  Prompt for a label completing with known labels and return it.
 If OPTIONAL is non-nil, insert the resulting value as an optional
 argument, otherwise as a mandatory one.  Use PROMPT as the prompt
 string.  If DEFINITION is non-nil, add the chosen label to the
-list of defined

Re: [AUCTeX-devel] Any equivalent to `reftex-label' in AUCTeX

2015-08-18 Thread Mosè Giordano
Hi Arash,

2015-08-18 22:19 GMT+02:00 Arash Esbati esb...@gmx.de:
 Hi all,

 caption.sty has an undocumented command `\captionbox' with the following
 syntax:

 \captionbox[list entry]{heading}[width][inner-pos]{contents}
 \captionbox*{heading}[width][inner-pos]{contents}

 `heading' contains the caption text and the `\label{}'.  Currently, I
 have the following code in `caption.el' to implement this command:

 --8---cut here---start-8---
 (defun LaTeX-arg-caption-captionbox (optional optional prompt)
   Query for the arguments of `\\captionbox' incl. a label and
 insert them.
   (let* ((caption (TeX-read-string (TeX-argument-prompt optional prompt 
 Caption)))
  (label   (if (fboundp 'reftex-label)
   (reftex-label nil t)
 (TeX-read-string (TeX-argument-prompt optional prompt 
 Label
  (width   (completing-read (TeX-argument-prompt t prompt Width)
(mapcar (lambda(elt) (concat TeX-esc (car 
 elt)))
(LaTeX-length-list
  (inpos   (completing-read (TeX-argument-prompt t prompt Inner 
 position)
'(c l r s)))
  (heading (format %s\\label{%s} caption label)))
 (LaTeX-indent-line)
 (TeX-argument-insert heading optional)
 (cond (;; 2 optional args
(and width (not (string-equal width ))
 inpos (not (string-equal inpos )))
(insert (format [%s][%s] width inpos)))
   (;; 1st empty opt. arg, 2nd opt. arg
(and (string-equal width )
 inpos (not (string-equal inpos )))
(insert (format [][%s] inpos)))
   (;; 1st opt. arg, 2nd empty opt. arg
(and width (not (string-equal width ))
 (string-equal inpos ))
(insert (format [%s] width)))
   (t ; Do nothing if both empty
(ignore)))
 (LaTeX-fill-paragraph)))

 (TeX-add-style-hook
  caption
  (lambda ()
'(captionbox  [ List entry ] (LaTeX-arg-caption-captionbox) t)))
 --8---cut here---end---8---

 My question is, does AUCTeX has something equivalent to `reftex-label'
 or should I just read the label as a string?

To insert a new label there is `TeX-arg-define-label', instead to read
a label we have `TeX-arg-label'.  There is also `LaTeX-label' to
insert the whole \label{} macro (which is probably what you're
looking for, right?).  As a rule of thumb, in AUCTeX you should always
use these functions and avoid using reftex' ones, since the jobs are
seamlessly transferred to the reftex equivalents if
`reftex-plug-into-AUCTeX' has been called.

Bye,
Mosè

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


[AUCTeX-devel] Implementing TeX-update

2015-08-17 Thread Mosè Giordano
Hi list,

I've implemented TeX-update, as suggested in the wishlist.  My work
follows the same logic of http://www.emacswiki.org/emacs/TN#toc8 and
is in part based on it: a function runs the compilation command and
calls a sentinel which, when the command finishes, calls back the
function and so on until a stopping condition is reached.

Some comments about possible copyrights concerns:

- `TeX-command-default' is extracted from `TeX-command-query', there
is nothing new in it;

- the sentinel function `TeX-command-sequence-sentinel' is similar to
`TeX-texify-sentinel' of EmacsWiki, but I don't know how a basic
sentinel could be written otherwise.  Moreover, how to test whether
there have been errors in the last compilation is reported literally
in the docstring of `TeX-error-report-switches';

- `TeX-command-sequence' has only the last three lines in common with
`TeX-texify' of EmacsWiki, which are the setting of a sentinel, how
could it be done otherwise?  For the rest these functions are
different: `TeX-command-sequence' is much more flexible (see the
docstring and the possible values of the first argument) and stopping
after a command has been run N times in a row does work, in
`TeX-texify' it doesn't.

In addition, in the second patch I've added dvips and ps2pdf rules
to `TeX-command-list', and there is a new option
`TeX-PDF-via-dvips-ps2pdf' so that one can produce a PDF using latex +
dvips + ps2pdf.  Using `TeX-update' all this boils down to a single
C-c C-u  :-)

I've been using `TeX-update' and dvips + ps2pdf for a week, without
problems.  Comments and suggestions welcome.

Bye,
Mosè
From 4ea34d2d4510c84d722ed8c0c4b82345e1cb88f7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mos=C3=A8=20Giordano?= m...@gnu.org
Date: Mon, 17 Aug 2015 00:28:03 +0200
Subject: [PATCH 1/2] Implement TeX-update.

---
 tex-buf.el | 171 +
 tex.el |  12 ++---
 2 files changed, 154 insertions(+), 29 deletions(-)

diff --git a/tex-buf.el b/tex-buf.el
index b5ed365..668a5b5 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -1,6 +1,6 @@
 ;;; tex-buf.el --- External commands for AUCTeX.
 
-;; Copyright (C) 1991-1999, 2001-2014 Free Software Foundation, Inc.
+;; Copyright (C) 1991-1999, 2001-2015 Free Software Foundation, Inc.
 
 ;; Maintainer: auctex-devel@gnu.org
 ;; Keywords: tex, wp
@@ -460,6 +460,114 @@ ORIGINALS which are modified but not saved yet.
   (setq found t)))
 found))
 
+(defcustom TeX-command-sequence-max-runs-same-command 4
+  Maximum number of runs of the same command.
+  :type 'integer
+  :group 'TeX-command)
+
+(defcustom TeX-command-sequence-max-runs 12
+  Maximum number of total runs.
+  :type 'integer
+  :group 'TeX-command)
+
+(defvar TeX-command-sequence-count-same-command 1
+  Counter for the runs of the same command in `TeX-command-sequence'.)
+
+(defvar TeX-command-sequence-count 1
+  Counter for the total runs of `TeX-command-sequence'.)
+
+(defvar TeX-command-sequence-last-command nil
+  Last command run in `TeX-command-sequence'.)
+
+(defvar TeX-command-sequence-sentinel nil
+  Sentinel for `TeX-command-sequence'.)
+
+(defvar TeX-command-sequence-command nil
+  Command argument for `TeX-command-sequence'.
+
+It is set in `TeX-command-sequence' and used in
+`TeX-command-sequence-sentinel' to call again
+`TeX-command-sequence' with the appropriate command argument.)
+
+(defun TeX-command-sequence (command optional reset)
+  Run a sequence of TeX commands defined by COMMAND.
+
+The COMMAND argument may be
+
+  * nil: no command will be run in this case
+
+  * a string with a command from `TeX-command-list'
+
+  * a non-nil list of strings, which are commands from
+`TeX-command-list'; the car of the list is used as command to
+be executed in the first run of `TeX-command-sequence', the
+cdr of the list will be passed to the function in the next
+run, etc.
+
+  * a function name, returning a string which is command from
+`TeX-command-list'; it will be funcall'd (without arguments!)
+and used again in the next run of `TeX-command-sequence'.
+
+  * with any other value the function `TeX-command-default' is
+used to determine the command to run, until a stopping
+condition is met.
+
+This function runs at most
+`TeX-command-sequence-max-runs-same-command' times the same
+command in a row, and `TeX-command-sequence-max-runs' times in
+total in any case.  It ends when `TeX-command-Show' is the
+command to be run.
+
+A non-nil value for the optional argument RESET means this is the
+first run of the function and some variables need to be reset.
+  (if (null command)
+  (message No command to run.)
+(let (cmd process)
+  (cond
+   ((stringp command)
+	(setq cmd command
+	  TeX-command-sequence-command nil))
+   ((listp command)
+	(setq cmd (pop command)
+	  TeX-command-sequence-command command))
+   ((functionp command)
+	(setq cmd (funcall command)
+	  

[AUCTeX-diffs] GNU AUCTeX branch, master, updated. c896f96bc44577680b777bc4cd6f477181f13784

2015-08-15 Thread Mosè Giordano
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  c896f96bc44577680b777bc4cd6f477181f13784 (commit)
  from  e88f11f47a27b1a17da97af91c9c554f7d60ae7c (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 c896f96bc44577680b777bc4cd6f477181f13784
Author: Arash Esbati esb...@gmx.de
Date:   Fri Aug 14 21:10:23 2015 +0200

Fix the subgroup number in a regex.

* latex.el (LaTeX-common-initialization): Fix the subgroup number
in the regex for `\\(this\\)?pagestyle'

Signed-off-by: Mosè Giordano m...@gnu.org

diff --git a/ChangeLog b/ChangeLog
index 5ccb448..2e1516b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-08-14  Arash Esbati  esb...@gmx.de
+
+   * latex.el (LaTeX-common-initialization): Fix the subgroup number
+   in the regex for `\\(this\\)?pagestyle'
+
 2015-08-10  Tassilo Horn  t...@gnu.org
 
* latex.el (TeX-latex-mode): Call LaTeX-preview-setup only if its
diff --git a/latex.el b/latex.el
index 5a0200a..8561535 100644
--- a/latex.el
+++ b/latex.el
@@ -5931,7 +5931,7 @@ i.e. you do _not_ have to cater for this yourself by 
adding ' or $.
  (renewenvironment\\*?{\\([A-Za-z]*\\)
   1 LaTeX-environment-list-filtered })
   (\\(this\\)?pagestyle{\\([A-Za-z]*\\)
-  1 LaTeX-pagestyle-list }))
+  2 LaTeX-pagestyle-list }))
TeX-complete-list))
 
   (LaTeX-add-environments

---

Summary of changes:
 ChangeLog |5 +
 latex.el  |2 +-
 2 files changed, 6 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
GNU AUCTeX

___
auctex-diffs mailing list
auctex-di...@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-diffs


[AUCTeX-diffs] GNU AUCTeX branch, master, updated. be9f14a1726b74848186b921ed6dc4f89f7cd4ac

2015-08-09 Thread Mosè Giordano
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  be9f14a1726b74848186b921ed6dc4f89f7cd4ac (commit)
   via  79c02c93e3152f63f4adb968130ae7945c04524c (commit)
  from  3fdeb4b8de31702d4c58b063cd9536284bb27ff7 (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 be9f14a1726b74848186b921ed6dc4f89f7cd4ac
Author: Arash Esbati esb...@gmx.de
Date:   Sun Aug 9 12:30:36 2015 +0200

Add the missing starred version of \AddEnumerateCounter.

* style/enumitem.el (enumitem): Cater for the starred version of
`\AddEnumerateCounter'.

Signed-off-by: Mosè Giordano m...@gnu.org

diff --git a/ChangeLog b/ChangeLog
index 570d256..9809c70 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2015-08-09  Arash Esbati  esb...@gmx.de
 
+   * style/enumitem.el (enumitem): Cater for the starred version of
+   `\AddEnumerateCounter'.
+
* style/ragged2e.el (ragged2e): Make package lengths available
through `LaTeX-add-lengths' and not `TeX-add-symbol'.
 
diff --git a/style/enumitem.el b/style/enumitem.el
index b9d88e4..bca9203 100644
--- a/style/enumitem.el
+++ b/style/enumitem.el
@@ -403,6 +403,7 @@ in `enumitem'-completions.
 
 ;; Just add the braces and let the user do the rest.
 '(AddEnumerateCounter 3)
+'(AddEnumerateCounter* 3)
 
 ;; This command only makes sense for enumerate type environments.
 ;; Currently, we offer all defined env's -- to be improved
@@ -431,7 +432,7 @@ in `enumitem'-completions.
  (font-latex-add-keywords '((newlist {{{)
(renewlist   {{{)
(setlist *[{)
-   (AddEnumerateCounter {{{)
+   (AddEnumerateCounter *{{{)
(SetEnumitemKey  {{ )
(SetEnumitemValue{{{))
  'function)

commit 79c02c93e3152f63f4adb968130ae7945c04524c
Author: Arash Esbati esb...@gmx.de
Date:   Sun Aug 9 11:10:17 2015 +0200

Make lengths available through `LaTeX-add-lengths'.

* style/ragged2e.el (ragged2e): Make package lengths available
through `LaTeX-add-lengths' and not `TeX-add-symbol'.

Signed-off-by: Mosè Giordano m...@gnu.org

diff --git a/ChangeLog b/ChangeLog
index 8e92d51..570d256 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-08-09  Arash Esbati  esb...@gmx.de
+
+   * style/ragged2e.el (ragged2e): Make package lengths available
+   through `LaTeX-add-lengths' and not `TeX-add-symbol'.
+
 2015-08-07  Tassilo Horn  t...@gnu.org
 
* latex.el (TeX-latex-mode): Call `LaTeX-preview-setup'
diff --git a/style/ragged2e.el b/style/ragged2e.el
index 8614425..2b7050e 100644
--- a/style/ragged2e.el
+++ b/style/ragged2e.el
@@ -1,6 +1,6 @@
 ;;; ragged2e.el --- AUCTeX style for `ragged2e.sty'
 
-;; Copyright (C) 2011 Free Software Foundation, Inc.
+;; Copyright (C) 2011, 2015 Free Software Foundation, Inc.
 
 ;; Author: Mads Jensen m...@inducks.org
 ;; Created: 2011-04-16
@@ -33,29 +33,27 @@
  ragged2e
  (lambda ()
(TeX-add-symbols
-CenteringLeftskip
-RaggedLeftLeftskip
-RaggedRightLeftskip
-CenteringRightskip
-RaggedLeftRightskip
-RaggedRightRightskip
-CenteringParfillskip
-RaggedLeftParfillskip
-RaggedRightParfillskip
-CenteringParindent
-RaggedLeftParindent
-RaggedRightParindent
-JustifyingParfillskip
-JustifyingParindent
-ttraggedright
 Centering
 justifying
 RaggedRight
 RaggedLeft)
 
-   (LaTeX-add-environments 
+   (LaTeX-add-environments
 FlushLeft FlushRight Center justify)
 
+   (LaTeX-add-lengths
+;; \Centering
+CenteringLeftskip CenteringRightskip
+CenteringParfillskip  CenteringParindent
+;; \RaggedLeft
+RaggedLeftLeftskipRaggedLeftRightskip
+RaggedLeftParfillskip RaggedLeftParindent
+;; \RaggedRight
+RaggedRightLeftskip   RaggedRightRightskip
+RaggedRightParindent  RaggedRightParfillskip
+;; \justifying
+JustifyingParfillskip JustifyingParindent)
+
(TeX-run-style-hooks footmisc everysel))
  LaTeX-dialect)
 

---

Summary of changes:
 ChangeLog |8 
 style/enumitem.el |3 ++-
 style/ragged2e.el |   32 +++-
 3 files changed, 25 insertions(+), 18 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] TeX-toggle-debug-warnings on: TeX-next-error jumps to undefined ref, but not to duplicated labels

2015-07-23 Thread Mosè Giordano
Hi Uwe,

2015-07-22 13:39 GMT+02:00 Uwe Brauer o...@mat.ucm.es:


 Hello

 It is great that TeX-next-error is able to jump to undefined references,
 when  TeX-toggle-debug-warnings is on as in the following short document.

 However this document contains another error: duplicated labels.


  TeX-next-error however just jumps to the aux file  but not to the
  problematic labels or do I miss something?


 If not, could such a feature be implemented, please?


 regards

 Uwe Brauer


 \documentclass[12pt]{article}

 \begin{document}
 \begin{equation}
 \label{eq:testref:1}
 \int
 \end{equation}

 \begin{equation}
 \label{eq:testref:1}
 \int
 \end{equation}


 (\ref{eq:testref:3})
 \end{document}

AUCTeX simply parses the compilation log and there you can find

--8---cut here---start-8---
(./test.aux

LaTeX Warning: Label `eq:testref:1' multiply defined.

)
--8---cut here---end---8---

That warning is reported in the .aux file, our parser does its job
well.  We _could_ in addition search for the second occurrence of
\label{eq:testref:1} in the document, but there are many problems
with that:

- what to do when the document is split over different files?  RefTeX
has `reftex-isearch-minor-mode', AUCTeX doesn't;

- what to do when labels aren't defined with \label{labelname}?

- what to do when the label is defined more than twice?  The log
reports this warning only once in that case, AUCTeX can't know how
many times the label has been defined, without reading the whole
document (see above points).

Your request is meaningful, but I don't think AUCTeX can do better
than what it does now, what should be improved (if possible) is the
compilation log.  For the record, also Texworks, TeXstudio and
Texmaker behaves like AUCTeX.

Bye,
Mosè

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] Various Patches

2015-07-21 Thread Mosè Giordano
Hi Arash,

2015-07-21 22:26 GMT+02:00 Arash Esbati esb...@gmx.de:
 Mosč Giordano m...@gnu.org writes:

 Hi Mosč,

 2015-07-19 15:04 GMT+02:00 Arash Esbati esb...@gmx.de:
 Hi all,

 please find attached 7 patches.  From Changelog:

 [...]

 Patches installed, thank you so much!

 Thank you very much for installing them.  Unfortunately, I found a major
 typo in `textpos.el' :-[  Could you please install the following patch
 which cures this issue?

Of course!  Done, thank you.

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. e351a3a6ad8bcb15c959d77227849f50cd5d8de9

2015-07-21 Thread Mosè Giordano
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  e351a3a6ad8bcb15c959d77227849f50cd5d8de9 (commit)
  from  166e14bf5496e2c8a85bcefb1786c7ae9e474a14 (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 e351a3a6ad8bcb15c959d77227849f50cd5d8de9
Author: Arash Esbati a.esb...@elumatec.net
Date:   Tue Jul 21 22:18:47 2015 +0200

Add missing commands `\nameref*' and `\Nameref'.

* style/nameref.el (nameref): Add missing commands `\nameref*'
and `\Nameref'.

Signed-off-by: Mosè Giordano m...@gnu.org

diff --git a/ChangeLog b/ChangeLog
index 5265019..8ff7097 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2015-07-21  Arash Esbati  esb...@gmx.de
 
+   * style/nameref.el (nameref): Add missing commands `\nameref*'
+   and `\Nameref'.
+
* style/textpos.el (textpos): Fix the name of the provided env's
which is `textblock' and not `textpos'.
 
diff --git a/style/nameref.el b/style/nameref.el
index d09ddbe..49e7202 100644
--- a/style/nameref.el
+++ b/style/nameref.el
@@ -1,6 +1,6 @@
 ;;; nameref.el --- AUCTeX style for `nameref.sty'
 
-;; Copyright (C) 2013 Free Software Foundation, Inc.
+;; Copyright (C) 2013, 2015 Free Software Foundation, Inc.
 
 ;; Author: Mads Jensen m...@inducks.org
 ;; Maintainer: auctex-devel@gnu.org
@@ -33,17 +33,22 @@
  nameref
  (lambda ()
(TeX-add-symbols
-'(nameref TeX-arg-ref))
-   
+'(nameref TeX-arg-ref)
+'(nameref* TeX-arg-ref)
+'(Nameref TeX-arg-ref))
+
(setq TeX-complete-list
- (append '((nameref{\\([^{}\n\r\\%,]*\\) 1 LaTeX-label-list }))
- TeX-complete-list))
-   
+(append
+ '((\\(?:N\\|n\\)ameref\\*?{\\([^{}\n\r\\%,]*\\) 1 
LaTeX-label-list }))
+ TeX-complete-list))
+
;, Fontification
(when (and (fboundp 'font-latex-add-keywords)
  (fboundp 'font-latex-set-syntactic-keywords)
  (eq TeX-install-font-lock 'font-latex-setup))
- (font-latex-add-keywords '((nameref {)) 'reference)))
+ (font-latex-add-keywords '((nameref *{)
+   (Nameref {))
+ 'reference)))
  LaTeX-dialect)
 
 (defvar LaTeX-nameref-package-options nil

---

Summary of changes:
 ChangeLog|3 +++
 style/nameref.el |   19 ---
 2 files changed, 15 insertions(+), 7 deletions(-)


hooks/post-receive
-- 
GNU AUCTeX

___
auctex-diffs mailing list
auctex-di...@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-diffs


[AUCTeX-diffs] GNU AUCTeX branch, master, updated. 166e14bf5496e2c8a85bcefb1786c7ae9e474a14

2015-07-21 Thread Mosè Giordano
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  166e14bf5496e2c8a85bcefb1786c7ae9e474a14 (commit)
  from  482dddb6eb1441c5ed500b97065bf72e46624e6d (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 166e14bf5496e2c8a85bcefb1786c7ae9e474a14
Author: Arash Esbati a.esb...@elumatec.net
Date:   Tue Jul 21 20:54:05 2015 +0200

Fix a typo in the name of provided env's.

* style/textpos.el (textpos): Fix the name of the provided env's
which is `textblock' and not `textpos'.

Signed-off-by: Mosè Giordano m...@gnu.org

diff --git a/ChangeLog b/ChangeLog
index 1825cd7..5265019 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-07-21  Arash Esbati  esb...@gmx.de
+
+   * style/textpos.el (textpos): Fix the name of the provided env's
+   which is `textblock' and not `textpos'.
+
 2015-07-18  Arash Esbati  esb...@gmx.de
 
* latex.el (LaTeX-common-initialization): Query for the default
diff --git a/style/textpos.el b/style/textpos.el
index 6732361..c2f3e19 100644
--- a/style/textpos.el
+++ b/style/textpos.el
@@ -31,8 +31,8 @@
 
 ;;; Code:
 
-(defun LaTeX-env-arg-textpos (env)
-  Query for the arguments of `textpos' environment and insert
+(defun LaTeX-env-arg-textpos-textblock (env)
+  Query for the arguments of `textblock' environment and insert
 them.
   (let* ((hsize (TeX-read-string Width: ))
 (ho(TeX-read-string (Optional) X reference point: ))
@@ -68,9 +68,9 @@ them.
(TeX-run-style-hooks everyshi color)
 
(LaTeX-add-environments
-;; \begin{textpos}{hsize}[ho,vo](hpos,vpos) ... \end{textpos}
-'(textpos  LaTeX-env-arg-textpos)
-'(textpos* LaTeX-env-arg-textpos))
+;; \begin{textblock}{hsize}[ho,vo](hpos,vpos) ... \end{textblock}
+'(textblock  LaTeX-env-arg-textpos-textblock)
+'(textblock* LaTeX-env-arg-textpos-textblock))
 
(TeX-add-symbols
 '(TPGrid [ LaTeX-arg-textpos-tpgrid ]

---

Summary of changes:
 ChangeLog|5 +
 style/textpos.el |   10 +-
 2 files changed, 10 insertions(+), 5 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] [PATCH] Add missing commands `\nameref*' and `\Nameref'

2015-07-21 Thread Mosè Giordano
2015-07-21 22:29 GMT+02:00 Arash Esbati esb...@gmx.de:
 Hi all,

 the following patch adds two missing commands `\nameref*' and `\Nameref'
 to `nameref.el'.

 Any comments welcome.

Second patch applied too ;-)

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. 482dddb6eb1441c5ed500b97065bf72e46624e6d

2015-07-19 Thread Mosè Giordano
+   (t ; No args
+(add-to-list 'LaTeX-auto-environment (list env)))
+
+(add-hook 'TeX-auto-prepare-hook #'LaTeX-environ-auto-prepare t)
+(add-hook 'TeX-auto-cleanup-hook #'LaTeX-environ-auto-cleanup t)
+(add-hook 'TeX-update-style-hook #'TeX-auto-parse t)
+
+(defun TeX-arg-environ-final-code (_optional)
+  Query for the presence of optional `final code' as argument to
+`\\NewEnviron' and insert the appropriate brackets.
+  (let ((fincode (y-or-n-p With optional final code?)))
+(when fincode
+   (insert []
+
+(TeX-add-style-hook
+ environ
+ (lambda ()
+
+   ;; Add it to the parser
+   (TeX-auto-add-regexp LaTeX-environ-NewEnviron-regexp)
+
+   (TeX-add-symbols
+
+;; \NewEnviron{name}[No.args][Opt.arg.]{Macro code}[Final code]
+'(NewEnviron
+  (TeX-arg-define-environment Environment)
+  [ Number of arguments ] [ argument ] t TeX-arg-environ-final-code)
+
+'(RenewEnviron
+  (TeX-arg-environment Environment)
+  [ Number of arguments ] [ argument ] t TeX-arg-environ-final-code)
+
+;; Insert a pair of braces and we're done
+'(environfinalcode t)
+
+;; Pre-defined
+'(BODY)
+
+;; Define another macro instead of \BODY
+'(environbodyname TeX-arg-define-macro)))
+  LaTeX-dialect)
+
+(defvar LaTeX-environ-package-options nil
+  Package options for the environ package.)
+
+;;; environ.el ends here

commit 24a2a9d1d91751a86c5227d8cf54a6757f554276
Author: Arash Esbati esb...@gmx.de
Date:   Sat Jul 18 09:38:23 2015 +0200

Add `LCRJ' to `LaTeX-array-column-letters'.

Signed-off-by: Mosè Giordano m...@gnu.org

diff --git a/ChangeLog b/ChangeLog
index 94fcf10..6eca23d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2015-07-18  Arash Esbati  esb...@gmx.de
 
+   * style/tabulary.el (tabulary): Add `LCRJ' to
+   `LaTeX-array-column-letters'.
+
* style/tabularx.el (tabularx): Add `X' to
`LaTeX-array-column-letters'.
 
diff --git a/style/tabulary.el b/style/tabulary.el
index c17b96e..30e3a64 100644
--- a/style/tabulary.el
+++ b/style/tabulary.el
@@ -52,7 +52,11 @@
 '(tabulary LaTeX-env-tabular*))
 
;; `tabulary' requires the array package
-   (TeX-run-style-hooks array))
+   (TeX-run-style-hooks array)
+
+   ;; `tabulary.sty' adds some new column specification letters.
+   (set (make-local-variable 'LaTeX-array-column-letters)
+   (concat LaTeX-array-column-letters L C R J)))
  LaTeX-dialect)
 
 ;;; tabulary.el ends here

commit 1202f8321edbaecbfcd03dde22804c87ce95ce8a
Author: Arash Esbati esb...@gmx.de
Date:   Sat Jul 18 09:30:15 2015 +0200

Add `X' to `LaTeX-array-column-letters'.

Signed-off-by: Mosè Giordano m...@gnu.org

diff --git a/ChangeLog b/ChangeLog
index 148c741..94fcf10 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2015-07-18  Arash Esbati  esb...@gmx.de
 
+   * style/tabularx.el (tabularx): Add `X' to
+   `LaTeX-array-column-letters'.
+
* style/array.el: Parse user-defined new column types and add them
to `LaTeX-array-column-letters'.
 
diff --git a/style/tabularx.el b/style/tabularx.el
index a0f3ee3..5cfebc8 100644
--- a/style/tabularx.el
+++ b/style/tabularx.el
@@ -1,6 +1,6 @@
 ;;; tabularx.el --- AUCTeX style for the tabularx package.
 
-;; Copyright (C) 2009, 2013 Free Software Foundation, Inc.
+;; Copyright (C) 2009, 2013, 2015 Free Software Foundation, Inc.
 
 ;; Author: Ralf Angeli ang...@caeruleus.net
 ;; Maintainer: auctex-devel@gnu.org
@@ -55,7 +55,11 @@
 '(tabularx LaTeX-env-tabular*))

;; `tabularx' requires array to define the column types
-   (TeX-run-style-hooks array))
+   (TeX-run-style-hooks array)
+
+   ;; `tabularx.sty' adds one new column specification letter.
+   (set (make-local-variable 'LaTeX-array-column-letters)
+   (concat LaTeX-array-column-letters X)))
  LaTeX-dialect)
 
 ;;; tabularx.el ends here

commit c2c7dd9bfdaecaef29496504a317fa40ca56c9dd
Author: Arash Esbati esb...@gmx.de
Date:   Sat Jul 18 09:25:42 2015 +0200

Parse user-defined new column types.

Signed-off-by: Mosè Giordano m...@gnu.org

diff --git a/ChangeLog b/ChangeLog
index 2813370..148c741 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-07-18  Arash Esbati  esb...@gmx.de
+
+   * style/array.el: Parse user-defined new column types and add them
+   to `LaTeX-array-column-letters'.
+
 2015-07-09  Mosè Giordano  m...@gnu.org
 
* latex/README: restore file deleted by mistake when preview/
diff --git a/style/array.el b/style/array.el
index 51a27e8..058eb92 100644
--- a/style/array.el
+++ b/style/array.el
@@ -1,6 +1,6 @@
 ;;; array.el --- AUCTeX style for `array.sty'
 
-;; Copyright (C) 2013 Free Software Foundation, Inc.
+;; Copyright (C) 2013, 2015 Free Software Foundation, Inc.
 
 ;; Author: Mads Jensen m...@inducks.org
 ;; Maintainer: auctex-devel@gnu.org
@@ -29,11 +29,57 @@
 
 ;;; Code:
 
+(require 'tex)
+
+(TeX-auto-add-type array-newcolumntype LaTeX)
+
+(defvar LaTeX-array

Re: [AUCTeX-devel] Various Patches

2015-07-19 Thread Mosè Giordano
Hi Arash,

2015-07-19 15:04 GMT+02:00 Arash Esbati esb...@gmx.de:
 Hi all,

 please find attached 7 patches.  From Changelog:

 1) style/array.el: Parse user-defined new column types and add them to
`LaTeX-array-column-letters'.

 2) style/tabularx.el (tabularx): Add `X' to
`LaTeX-array-column-letters'.

 3) style/tabulary.el (tabulary): Add `LCRJ' to
`LaTeX-array-column-letters'.

 4) style/environ.el: New file.

 5) style/textpos.el: New file.

 6) style/vwcol.el: New file.

 7) latex.el (LaTeX-common-initialization): Query for the default value
of first arg when (re-)defining new environments.

Patches installed, thank you so much!

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. 609470047cfbfffa91e81cd8a3c38f57b9d80ff9

2015-07-09 Thread Mosè Giordano
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  609470047cfbfffa91e81cd8a3c38f57b9d80ff9 (commit)
  from  5178ba6a0312ed789a091ddfd75e5d39b4064161 (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 609470047cfbfffa91e81cd8a3c38f57b9d80ff9
Author: Mosè Giordano m...@gnu.org
Date:   Thu Jul 9 11:00:02 2015 +0200

Restore deleted preview README.

* latex/README: restore file deleted by mistake when preview/
directory has been moved to top level.

* Makefile.in: Use everywhere $(MAKE) in place of make.

diff --git a/ChangeLog b/ChangeLog
index 4446c4c..2813370 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2015-07-09  Mosè Giordano  m...@gnu.org
+
+   * latex/README: restore file deleted by mistake when preview/
+   directory has been moved to top level.
+
+   * Makefile.in: Use everywhere $(MAKE) in place of make.
+
 2015-06-21  Mosè Giordano  m...@gnu.org
 
* tex-buf.el (TeX-LaTeX-sentinel): Add support for hf-tikz
diff --git a/Makefile.in b/Makefile.in
index f365af7..290462c 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -505,7 +505,7 @@ xemacs-package: check-tag
$(CP_A) auctex-$(TAG) $(XEMACS_BUILD_DIR)
cd $(XEMACS_BUILD_DIR) \
 ./configure INSTALL_INFO=: TEXHASH=: --with-xemacs 
--with-packagedir=`pwd`/xemacs-package --without-texmf-dir 
--with-auto-dir=etc/auctex/auto \
-make all install-man install  cd xemacs-package  tar -cf - 
--owner=root --group=root . | gzip --best  $(FTPDIR)/auctex-$(TAG)-pkg.tar.gz
+$(MAKE) all install-man install  cd xemacs-package  tar -cf - 
--owner=root --group=root . | gzip --best  $(FTPDIR)/auctex-$(TAG)-pkg.tar.gz
 
 # Pre-compiled AUCTeX package for Emacs on Windows
 WBUILDDIR=$(PWD)/windows-package
@@ -565,9 +565,9 @@ windows-package: check-tag
  --without-texmf-dir --with-emacs=$(WEMACS) \
  --with-lispdir=$(WBUILDDIR)/emacs-$(WEMACSVER)/$(WEMACSSITELISP) \
  --datarootdir=$(WBUILDDIR)/emacs-$(WEMACSVER)/$(WEMACSDATAROOTDIR) \
-make \
+$(MAKE) \
 sed -i -e 's/\/[^\n]\+/(expand-file-name ..\/var\/auctex 
(file-name-directory load-file-name))/' tex-site.el \
-make install
+$(MAKE) install
 # Create the package
test -d $(FTPDIR) || mkdir -p $(FTPDIR)
rm -f $(FTPDIR)/$(WPACKAGE)
@@ -622,7 +622,7 @@ preview-ball: check-tag
 # Use TAG_EXPORT if set (for snapshots)
git archive $${TAG_EXPORT:=`echo release_$(TAG) | sed 's/[.]/_/g'`} \
  latex/ | tar -xC $(PREVIEW_BUILD_DIR) --strip-components=1
-   cd $(PREVIEW_BUILD_DIR)  make -f ../latex/Makefile preview.ins 
preview.pdf
+   cd $(PREVIEW_BUILD_DIR)  $(MAKE) -f ../latex/Makefile preview.ins 
preview.pdf
chmod -R go-w+rX $(PREVIEW_BUILD_DIR)
test -d $(CTANDIR) || mkdir -p $(CTANDIR)
 # CTAN requires a top level directory preview/ for the archive.
diff --git a/latex/README b/latex/README
new file mode 100644
index 000..0d0e8a8
--- /dev/null
+++ b/latex/README
@@ -0,0 +1,64 @@
+The preview.sty style file
+==
+
+Purpose
+---
+
+The main purpose of the preview package is the extraction of selected
+elements from a LaTeX source, like formulas or graphics, into separate
+pages of a DVI file.  A flexible and convenient interface allows it to
+specify what commands and constructs should be extracted.  This works
+with DVI files postprocessed by either Dvips and Ghostscript or
+dvipng, but it also works when you are using PDFTeX for generating PDF
+files.
+
+Current uses of the package include the preview-latex package for
+WYSIWYG functionality in the AUCTeX editing environment, generation of
+previews in LyX, as part of the operation of the ps4pdf and pst-pdf
+packages, the tbook XML system and some other tools.
+
+Availability
+
+
+The preview package is being developed along and distributed with
+AUCTeX.  It can therefore be obtained as part of AUCTeX distribution
+files available at URL:ftp://ftp.gnu.org/pub/gnu/auctex/ or its
+mirror at CTAN:support/auctex.  CTAN also provides a standalone
+version at CTAN:macros/latex/contrib/preview.  The project page at
+URL:http://savannah.gnu.org/projects/auctex/ offers downloads and
+anonymous CVS access for cutting edge versions.  For more information
+about the preview package please refer to the home page of AUCTeX at
+URL:http://www.gnu.org/software/auctex/.
+
+Installation
+
+
+To install the preview style file on its own without the entire AUCTeX
+package, run
+tex preview.ins
+If preview.ins happens to be missing, you can regenerate it by running
+tex

Re: [AUCTeX-devel] RFC: Extending array.el to parse \newcolumntype

2015-07-07 Thread Mosè Giordano
Hi Arash,

2015-07-01 23:03 GMT+02:00 Arash Esbati esb...@gmx.de:
 Arash Esbati esb...@gmx.de writes:

 Hi Mosč,

 Thanks for your comments.  I will include them in a new suggestion; I'm
 thinking about a general function and update `tabularx.el' and
 `tabulary.el' at the same time.

 following up myself, attached is an updated version of `array.el'.  Your
 suggestions are incorporated, and my tests were ok.  I would appreciate
 if you could give it a roll again.

Now it looks fine to me ;-)

 I would also add something like this to `tabular[x|y].el' and submit a
 patch.

 --8---cut here---start-8---
 (set (make-local-variable 'LaTeX-array-column-letters)
  (concat LaTeX-array-column-letters X))
 --8---cut here---end---8---

Makes sense.

Bye,
Mosè

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] latex-mode or context-mode in startup

2015-06-28 Thread Mosè Giordano
Hi Carlos,

AUCTeX expects the input file to have an extension.  Try setting
`TeX-default-extension' to the empty string and change the last three
lines of the definition of `TeX-master-file' to

(if (null (zerop (length extension)))
  (concat name . extension)
name

This should make it possible to work even with a file without extension.

Bye,
Mosè

2015-06-27 23:40 GMT+02:00 Carlos linguafa...@gmail.com:
 Ivan thanks for the reply. I appreciate it. I forgot to mention it in
 the last post.

 Take care.


 ___
 auctex-devel mailing list
 auctex-devel@gnu.org
 https://lists.gnu.org/mailman/listinfo/auctex-devel


___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


[AUCTeX-diffs] GNU AUCTeX branch, master, updated. 5178ba6a0312ed789a091ddfd75e5d39b4064161

2015-06-21 Thread Mosè Giordano
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  5178ba6a0312ed789a091ddfd75e5d39b4064161 (commit)
   via  bb195aee193724df8b23c4d16808984e325d4594 (commit)
  from  0efe67851762d1f9c00124629d5984b23cf37bd7 (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 5178ba6a0312ed789a091ddfd75e5d39b4064161
Author: Mosè Giordano m...@gnu.org
Date:   Sun Jun 21 15:58:09 2015 +0200

Parse hf-tikz messages suggesting to rerun LaTeX.

* tex-buf.el (TeX-LaTeX-sentinel): Add support for hf-tikz
messages.

diff --git a/ChangeLog b/ChangeLog
index 77d25cd..4446c4c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2015-06-21  Mosè Giordano  m...@gnu.org
 
+   * tex-buf.el (TeX-LaTeX-sentinel): Add support for hf-tikz
+   messages.
+
* style/mnras.el: New style file.
 
* Makefile.in (STYLESRC): Activate it.
diff --git a/tex-buf.el b/tex-buf.el
index 0e412cc..b5ed365 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -1098,6 +1098,11 @@ changed\\. Rerun LaTeX\\. nil t)
 (message
  %s You should run LaTeX again to get table formatting right)
 (setq TeX-command-next TeX-command-default))
+   ((re-search-forward ^hf-TikZ Warning: Mark '.*' changed\\. \
+Rerun to get mark in right position\\. nil t)
+(message
+ %s You should run LaTeX again to get TikZ marks in right position)
+(setq TeX-command-next TeX-command-default))
((re-search-forward
  ^\\(\\*\\* \\)?J?I?p?\\(La\\|Sli\\)TeX\\(2e\\)? \
 \\(Version\\|ver\\.\\|[0-9/]*\\) nil t)

commit bb195aee193724df8b23c4d16808984e325d4594
Author: Mosè Giordano m...@gnu.org
Date:   Sun Jun 21 15:46:30 2015 +0200

Add new style file for mnras class.

* style/mnras.el: New style file.

* Makefile.in (STYLESRC): Activate it.

diff --git a/ChangeLog b/ChangeLog
index c64649b..77d25cd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2015-06-21  Mosè Giordano  m...@gnu.org
+
+   * style/mnras.el: New style file.
+
+   * Makefile.in (STYLESRC): Activate it.
+
 2015-06-14  Arash Esbati  esb...@gmx.de
 
* style/pdfpages.el (pdfpages): Restrict suggested files to
@@ -8,7 +14,7 @@
 
* tex-buf.el (TeX-LaTeX-sentinel-has-warnings, TeX-parse-error):
Cater for packages with digits in their names (e.g., fixltx2e,
-   wich emits a warning from TeX Live 2015).
+   which emits a warning from TeX Live 2015).
 
 2015-06-09  Tassilo Horn  t...@gnu.org
 
diff --git a/Makefile.in b/Makefile.in
index 069a847..f365af7 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -148,7 +148,8 @@ STYLESRC = style/prosper.el \
   style/bidibeamer.el style/enumitem.el style/caption.el \
   style/geometry.el  style/ltablex.el   style/ltxtable.el \
   style/mn2e.el  style/colortbl.el  style/attachfile.el \
-  style/newpxtext.el style/newpxmath.el style/pdfpages.el
+  style/newpxtext.el style/newpxmath.el style/pdfpages.el \
+  style/mnras.el
 
 STYLEELC = $(STYLESRC:.el=.elc)
 
diff --git a/style/mnras.el b/style/mnras.el
new file mode 100644
index 000..9f2ab33
--- /dev/null
+++ b/style/mnras.el
@@ -0,0 +1,176 @@
+;;; mnras.el --- AUCTeX style for `mnras.cls' version 3.0.
+
+;; Copyright (C) 2015 Free Software Foundation, Inc.
+
+;; Maintainer: auctex-devel@gnu.org
+;; Author: Mosè Giordano m...@gnu.org
+;; Keywords: tex
+
+;; This file is part of AUCTeX.
+
+;; AUCTeX is free software; you can redistribute it and/or modify it
+;; under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 3, or (at your option)
+;; any later version.
+
+;; AUCTeX is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+;; General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with AUCTeX; see the file COPYING.  If not, write to the Free
+;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+;; 02110-1301, USA.
+
+;;; Commentary:
+
+;; This file adds support for `mnras.cls' version 3.0.
+
+;;; Code:
+
+(TeX-add-style-hook
+ mnras
+ (lambda ()
+   (if (LaTeX-provided-class-options-member mnras usegraphicx)
+   (TeX-run-style-hooks graphicx))
+   (if (LaTeX-provided-class-options-member mnras usenatbib)
+   (TeX-run-style-hooks natbib))
+   (if (LaTeX-provided-class-options-member mnras usedcolumn)
+   (TeX-run-style-hooks dcolumn))
+   (TeX-run-style-hooks
+geometry
+fixltx2e

Re: [AUCTeX-devel] TeX-next-error pdflatex and latex

2015-06-15 Thread Mosè Giordano
Hi Uwe,

2015-06-15 12:18 GMT+02:00 Uwe Brauer o...@mat.ucm.es:
 Mos == Mos  Mos writes:

 Hi Uwe,
 2015-06-14 22:05 GMT+02:00 Uwe Brauer o...@mat.ucm.es:

 Hello

 Why does TeX-next-error work so much better with simple latex than it
 does with pdflatex?

 Could you please explain in which way `TeX-next-error' works better
 with latex than with pdflatex?  I use pdflatex and I've never seen
 anything wrong.

 Ok, here are several examples. The first file does not cause any
 problems, TeX-next-error jumps in pdflatex and in latex to the place
 where the error is located.

 The second file which contains much more package behaves differently,
 the log correctly reports the error but TeX-next-error jumps to a file
 in /usr/share/texmf/tex/context/base/sup-pdf.mkii

Ok, now I understand.  The problem with
/usr/share/texmf/tex/context/base/sup-pdf.mkii happens from time to
time also to me on GNU Emacs (I didn't understand you were referring
to it) and it has to do with error log parsing.  Tassilo tried to
address this problem in his simplify-TeX-parse-error branch of the
AUCTeX repository.  Last time I checked it out it did fix some of the
problems.  You may want to give it a look.

Bye,
Mosè

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] [PATCH 2/2] New style pdfpages.el.

2015-06-14 Thread Mosè Giordano
Hi Arash,

2015-06-13 21:06 GMT+02:00 Arash Esbati esb...@gmx.de:
 Any comment?

Yes: patch applied, thank you ;-)

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. 0efe67851762d1f9c00124629d5984b23cf37bd7

2015-06-14 Thread Mosè Giordano
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  0efe67851762d1f9c00124629d5984b23cf37bd7 (commit)
  from  8052cd57efa81f826916e588a8b08fb35c4110ed (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 0efe67851762d1f9c00124629d5984b23cf37bd7
Author: Arash Esbati esb...@gmx.de
Date:   Sun Jun 14 16:34:48 2015 +0200

Improve completion of includepdf macro.

* style/pdfpages.el (pdfpages): Restrict suggested files to
*.pdf files.  File name should be relative to master file
directory.

Signed-off-by: Mosè Giordano m...@gnu.org

diff --git a/ChangeLog b/ChangeLog
index 599dbfa..c64649b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2015-06-14  Arash Esbati  esb...@gmx.de
+
+   * style/pdfpages.el (pdfpages): Restrict suggested files to
+   *.pdf files.  File name should be relative to master file
+   directory.
+
 2015-06-13  Mosè Giordano  m...@gnu.org
 
* tex-buf.el (TeX-LaTeX-sentinel-has-warnings, TeX-parse-error):
diff --git a/style/pdfpages.el b/style/pdfpages.el
index 8957cf7..d034668 100644
--- a/style/pdfpages.el
+++ b/style/pdfpages.el
@@ -98,8 +98,12 @@
   [TeX-arg-key-val LaTeX-pdfpages-key-val-options]
   (TeX-arg-eval
(lambda ()
-(let ((pdffile (file-relative-name
-(read-file-name File to include: 
+ (let ((pdffile (file-relative-name
+(read-file-name
+ File to include:  nil nil nil nil
+ (lambda (pdfs)
+   (string-match \\.pdf$ pdfs)))
+(TeX-master-directory
   (format %s pdffile)
 
 ;; \includepdfmerge[options]{file-page-list}

---

Summary of changes:
 ChangeLog |6 ++
 style/pdfpages.el |8 ++--
 2 files changed, 12 insertions(+), 2 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] TeX-next-error pdflatex and latex

2015-06-14 Thread Mosè Giordano
Hi Uwe,

2015-06-14 22:05 GMT+02:00 Uwe Brauer o...@mat.ucm.es:

 Hello

 Why does TeX-next-error work so much better with simple latex than it
 does with pdflatex?

Could you please explain in which way `TeX-next-error' works better
with latex than with pdflatex?  I use pdflatex and I've never seen
anything wrong.

Bye,
Mosè

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] [PATCH 2/2] New style pdfpages.el.

2015-06-14 Thread Mosè Giordano
2015-06-14 21:32 GMT+02:00 Arash Esbati esb...@gmx.de:
 Mosè Giordano m...@gnu.org writes:

 Hi Mosè,

 2015-06-13 21:06 GMT+02:00 Arash Esbati esb...@gmx.de:
 Any comment?

 Yes: patch applied, thank you ;-)

 Hmm, actually, I was thinking about comments about the code, I would
 have made a proper patch.  But thanks for also doing that work ;-)

Yes, I know, but the patch was fine with me, so I had only to thank you :-)

 While we're at it, there is a small typo in your last ChangeLog entry:

 ,
 | 2015-06-13  Mosè Giordano  m...@gnu.org
 |
 |   * tex-buf.el (TeX-LaTeX-sentinel-has-warnings, TeX-parse-error):
 |   Cater for packages with digits in their names (e.g., fixltx2e,
 |   wich emits a warning from TeX Live 2015).
 |   ^^ `h' is missing
 `

 Maybe you want to fix that as well ;-)

Thanks, I've seen that right after committing your patch.  I don't
think it's worth a commit itself, maybe I'll fix it with another
change.

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. 8052cd57efa81f826916e588a8b08fb35c4110ed

2015-06-13 Thread Mosè Giordano
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  8052cd57efa81f826916e588a8b08fb35c4110ed (commit)
  from  8426ca5cd225f2aac37532802afc60a30f2e6c89 (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 8052cd57efa81f826916e588a8b08fb35c4110ed
Author: Mosè Giordano m...@gnu.org
Date:   Sat Jun 13 16:50:32 2015 +0200

Find warnings emitted by a package with digits in its name.

* tex-buf.el (TeX-LaTeX-sentinel-has-warnings, TeX-parse-error):
Cater for packages with digits in their names (e.g., fixltx2e,
wich emits a warning from TeX Live 2015).

diff --git a/ChangeLog b/ChangeLog
index 2230519..599dbfa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2015-06-13  Mosè Giordano  m...@gnu.org
+
+   * tex-buf.el (TeX-LaTeX-sentinel-has-warnings, TeX-parse-error):
+   Cater for packages with digits in their names (e.g., fixltx2e,
+   wich emits a warning from TeX Live 2015).
+
 2015-06-09  Tassilo Horn  t...@gnu.org
 
* tex.el (TeX-evince-dbus-p): Explicitly bind dbus-debug to nil in
diff --git a/tex-buf.el b/tex-buf.el
index c61ffaf..0e412cc 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -1014,7 +1014,7 @@ Warnings can be indicated by LaTeX or packages.
   (save-excursion
 (goto-char (point-min))
 (re-search-forward
- ^\\(LaTeX [A-Za-z]*\\|Package [A-Za-z]+ \\)Warning: nil t)))
+ ^\\(LaTeX [A-Za-z]*\\|Package [A-Za-z0-9]+ \\)Warning: nil t)))
 
 (defun TeX-LaTeX-sentinel-has-bad-boxes ()
   Return non-nil, if LaTeX output indicates overfull or underfull boxes.
@@ -1748,7 +1748,7 @@ Return non-nil if an error or warning is found.
  ^\\(\\(?:Overfull\\|Underfull\\|Tight\\|Loose\\)\
  .*?[0-9]+--[0-9]+\\)\\|
  ;; LaTeX warning
- ^\\(LaTeX [A-Za-z]*\\|Package [A-Za-z]+ \\)Warning:.*))
+ ^\\(LaTeX [A-Za-z]*\\|Package [A-Za-z0-9]+ \\)Warning:.*))
(error-found nil))
 (while
(cond

---

Summary of changes:
 ChangeLog  |6 ++
 tex-buf.el |4 ++--
 2 files changed, 8 insertions(+), 2 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] problems with Xemacs 21.4.22 Mule on Mac, xdvi

2015-06-10 Thread Mosè Giordano
Hi Uwe,

2015-06-10 8:41 GMT+02:00 Uwe Brauer o...@mat.ucm.es:
 Hello

 Although I use Linux most of the time (with Xemacs 21.5.34 and auctex
 11.83 without problems), I found the following problem
 when I used Xemacs 21.4.22 Mule on Mac OS Yosmite. Xemacs 21.4.22 is
 shipped by port (Xcode installed) so upgrading to 21.5.34 means
 compiling which turned out a bit difficult. Here are the problems
 concerning 21.4.22:

 -  xdvi does not dwell in /usr/bin/xdvi as expected but in
   /usr/texbin/xdvi, where auctex does not find it.

Well, AUCTeX (actually *Emacs) expects a program to be in a PATH
directory, not necessarily /usr/bin.  If /usr/texbin is not in the
PATH, AUCTeX cannot find xdvi, did you expect something else?

 - I could set either a symbolic link of xdvi or customize the
   Tex command list.

 - When I do the later I don't know how to make forward and
   backward search to work.

Can you use forward/inverse search on GNU/Linux instead?

Bye,
Mosè

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] problem with formatting and marking in auctex 11.88

2015-06-05 Thread Mosè Giordano
Hi Tassilo,

2015-06-05 11:47 GMT+02:00 Tassilo Horn t...@gnu.org:
 IMO, it's about time to increment the supported emacs versions to 22 and
 above.  I think emacs 22 might still be widely used because that ships
 with Mac OS X but at least all GNU/Linux distros I know ship at least
 some Emacs 23 version.  And on Windows where the user has to retrieve
 and install Emacs on his own, there is also no reason to stick to 21.

I tend to agree.  I've always thought that supporting XEmacs meant
supporting Emacs 21 as well (with small extra effort), but Ikumi
showed that this is not (no more?) the case.

Bye,
Mosè

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


<    1   2   3   4   5   6   7   8   >