auctex-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Mosè Giordano
Subject: [AUCTeX-diffs] GNU AUCTeX branch, master, updated. fe51d8ed3244691a5f0f6bd1d544963c26e2781e
Date: Tue, 01 Jul 2014 22:29:00 +0000

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  fe51d8ed3244691a5f0f6bd1d544963c26e2781e (commit)
       via  fc05c8e6a4f72a278f7c70b389331ea4773ccbde (commit)
      from  d58009b68dd654ed1fa3daf5e306d0626adbf2b9 (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 fe51d8ed3244691a5f0f6bd1d544963c26e2781e
Author: Mosè Giordano <address@hidden>
Date:   Wed Jul 2 00:26:39 2014 +0200

    Hide some entries of the Command menu when not available.
    
    * tex.el (TeX-mode-specific-command-menu-entries): Hide "Previous Error"
    and "Error Overview" entries when not available.

diff --git a/ChangeLog b/ChangeLog
index 265767b..d60d2da 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -13,6 +13,8 @@
        now deleted `TeX-source-correlate-method-active' variable.
        (TeX-source-specials-view-expand-options): Use the
        `TeX-source-correlate-method-active' function.
+       (TeX-mode-specific-command-menu-entries): Hide "Previous Error"
+       and "Error Overview" entries when not available.
 
        * context.el: Update copyright years.
        (ConTeXt-expand-options): Use the
diff --git a/tex.el b/tex.el
index 84d823b..3cb5411 100644
--- a/tex.el
+++ b/tex.el
@@ -4451,9 +4451,11 @@ Brace insertion is only done if point is in a math 
construct and
       ["Next Error" TeX-next-error
        :help "Jump to the next error of the last TeX run"]
       ["Previous Error" TeX-previous-error
-       :help "Jump to the previous error of the last TeX run"]
-      ["Error overview" TeX-error-overview
-       :help "Open an overview of errors occured in the last TeX run"]
+       :help "Jump to the previous error of the last TeX run"
+       :visible TeX-parse-all-errors]
+      ["Error Overview" TeX-error-overview
+       :help "Open an overview of errors occured in the last TeX run"
+       :visible (and TeX-parse-all-errors (fboundp 'tabulated-list-mode))]
       ["Quick View" TeX-view
        :help "Start a viewer without prompting"]
       "-"

commit fc05c8e6a4f72a278f7c70b389331ea4773ccbde
Author: Mosè Giordano <address@hidden>
Date:   Wed Jul 2 00:22:14 2014 +0200

    Improve selection of the forward/inverse search method.
    
    * tex.el (TeX-expand-list): Set
    `TeX-source-correlate-output-page-function' when necessary, in the
    "%(outpage)" expander.
    (TeX-source-correlate-method): Add an alist as a possible value
    and change the default.
    (TeX-source-correlate-method-active): Convert to a function.
    (TeX-source-correlate-expand-options): Use the
    `TeX-source-correlate-method-active' function.
    (TeX-source-correlate-mode): Remove setting of the
    `TeX-source-correlate-output-page-function' variable and of the
    now deleted `TeX-source-correlate-method-active' variable.
    (TeX-source-specials-view-expand-options): Use the
    `TeX-source-correlate-method-active' function.
    
    * context.el: Update copyright years.
    (ConTeXt-expand-options): Use the
    `TeX-source-correlate-method-active' function.
    
    * doc/auctex.texi (I/O Correlation): Update documentation of
    `TeX-source-correlate-method'.
    
    * doc/changes.texi: Mention change to the default value of
    `TeX-source-correlate-method'.

diff --git a/ChangeLog b/ChangeLog
index 683907d..265767b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,29 @@
+2014-07-02  Mosè Giordano  <address@hidden>
+
+       * tex.el (TeX-expand-list): Set
+       `TeX-source-correlate-output-page-function' when necessary, in the
+       "%(outpage)" expander.
+       (TeX-source-correlate-method): Add an alist as a possible value
+       and change the default.
+       (TeX-source-correlate-method-active): Convert to a function.
+       (TeX-source-correlate-expand-options): Use the
+       `TeX-source-correlate-method-active' function.
+       (TeX-source-correlate-mode): Remove setting of the
+       `TeX-source-correlate-output-page-function' variable and of the
+       now deleted `TeX-source-correlate-method-active' variable.
+       (TeX-source-specials-view-expand-options): Use the
+       `TeX-source-correlate-method-active' function.
+
+       * context.el: Update copyright years.
+       (ConTeXt-expand-options): Use the
+       `TeX-source-correlate-method-active' function.
+
+       * doc/auctex.texi (I/O Correlation): Update documentation of
+       `TeX-source-correlate-method'.
+
+       * doc/changes.texi: Mention change to the default value of
+       `TeX-source-correlate-method'.
+
 2014-06-29  Mosè Giordano  <address@hidden>
 
        * doc/todo.texi (Mid-term Goals): Remove "More flexible option and
diff --git a/context.el b/context.el
index ea333e5..3cc890f 100644
--- a/context.el
+++ b/context.el
@@ -1,6 +1,6 @@
 ;;; context.el --- Support for ConTeXt documents.
 
-;; Copyright (C) 2003-2006, 2008, 2010, 2012
+;; Copyright (C) 2003-2006, 2008, 2010, 2012, 2014
 ;;   Free Software Foundation, Inc.
 
 ;; Maintainer: Berend de Boer <address@hidden>
@@ -1586,7 +1586,7 @@ else.  There might be text before point."
      (format "--interface=%s " ConTeXt-current-interface))
    (when TeX-source-correlate-mode
      (format "--passon=\"%s\" "
-            (if (eq TeX-source-correlate-method-active 'synctex)
+            (if (eq (TeX-source-correlate-method-active) 'synctex)
                 TeX-synctex-tex-flags
               TeX-source-specials-tex-flags)))
    (unless TeX-interactive-mode
diff --git a/doc/auctex.texi b/doc/auctex.texi
index 85c19fe..48ffd0e 100644
--- a/doc/auctex.texi
+++ b/doc/auctex.texi
@@ -3041,16 +3041,26 @@ document parsing is enabled.  Customize the variable
 @defopt TeX-source-correlate-method
 Method to use for enabling forward and inverse search.  This can be
 @samp{source-specials} if source specials should be used, @samp{synctex}
-if SyncTeX should be used, or @samp{auto} if @AUCTeX{} should decide,
-this is the default.
+if SyncTeX should be used, or @samp{auto} if @AUCTeX{} should decide.
 
-When the variable is set to @samp{auto}, @AUCTeX{} will use SyncTeX if
-your @code{latex} processor supports it, source specials otherwise.  You
-must make sure your viewer supports the same method.
+When the variable is set to @samp{auto}, @AUCTeX{} will always use
+SyncTeX if your @code{latex} processor supports it, source specials
+otherwise.  You must make sure your viewer supports the same method.
 
-Setting this variable does not take effect if
address@hidden has already been active.  Restart Emacs
-in this case.
+It is also possible to specify a different method depending on the
+output, either DVI or PDF, by setting the variable to an alist of the
+kind
address@hidden
+((dvi . <source-specials or synctex>)
+ (pdf . <source-specials or synctex>))
address@hidden lisp
+in which the CDR of each entry is a symbol specifying the method to be
+used in the corresponding mode.  The default value of the variable is
address@hidden
+((dvi . source-specials)
+ (pdf . synctex))
address@hidden lisp
+which is compatible with the majority of viewers.
 @end defopt
 
 @findex TeX-view
diff --git a/doc/changes.texi b/doc/changes.texi
index d421833..903d42e 100644
--- a/doc/changes.texi
+++ b/doc/changes.texi
@@ -57,7 +57,8 @@ New user options @code{LaTeX-default-author},
 @code{TeX-insert-braces-alist}, @code{LaTeX-fontspec-arg-font-search},
 and @code{LaTeX-fontspec-font-list-default}.  A new possible value
 (@code{show-all-optional-args}) for
address@hidden was added.
address@hidden was added.  The default value of
address@hidden has been changed.
 
 @item
 @samp{biblatex} support was greatly expanded.  If parsing is enabled,
diff --git a/tex.el b/tex.el
index 6ac829f..84d823b 100644
--- a/tex.el
+++ b/tex.el
@@ -418,15 +418,15 @@ string."
 ;; to handle .ps files.
 
 (defcustom TeX-expand-list
-  '(("%p" TeX-printer-query)   ;%p must be the first entry
+  '(("%p" TeX-printer-query)           ;%p must be the first entry
     ("%q" (lambda ()
            (TeX-printer-query t)))
     ("%V" (lambda ()
            (TeX-source-correlate-start-server-maybe)
            (TeX-view-command-raw)))
     ("%vv" (lambda ()
-           (TeX-source-correlate-start-server-maybe)
-           (TeX-output-style-check TeX-output-view-style)))
+            (TeX-source-correlate-start-server-maybe)
+            (TeX-output-style-check TeX-output-view-style)))
     ("%v" (lambda ()
            (TeX-source-correlate-start-server-maybe)
            (TeX-style-check TeX-view-style)))
@@ -465,8 +465,16 @@ string."
     ("%dS" TeX-source-specials-view-expand-options)
     ("%cS" TeX-source-specials-view-expand-client)
     ("%(outpage)" (lambda ()
-                   (or (when TeX-source-correlate-output-page-function
-                         (funcall TeX-source-correlate-output-page-function))
+                   ;; When `TeX-source-correlate-output-page-function' is nil
+                   ;; and we are using synctex, fallback on
+                   ;; `TeX-synctex-output-page'.
+                   (and TeX-source-correlate-mode
+                        (null TeX-source-correlate-output-page-function)
+                        (eq (TeX-source-correlate-method-active) 'synctex)
+                        (setq TeX-source-correlate-output-page-function
+                              'TeX-synctex-output-page))
+                   (or (if TeX-source-correlate-output-page-function
+                           (funcall TeX-source-correlate-output-page-function))
                        "1")))
     ;; `file' means to call `TeX-master-file' or `TeX-region-file'
     ("%s" file nil t)
@@ -502,7 +510,7 @@ string."
                      (setq pos (+ (length TeX-command-text) 9)
                            TeX-command-pos
                            (and (string-match " "
-                                             (funcall file t t))
+                                              (funcall file t t))
                                 "\""))
                      (concat TeX-command-text " \"\\input\""))
                  (setq TeX-command-pos nil)
@@ -1400,21 +1408,39 @@ For available TYPEs, see variable `TeX-engine'."
 
 ;;; Forward and inverse search
 
-(defcustom TeX-source-correlate-method 'auto
+(defcustom TeX-source-correlate-method
+  '((dvi . source-specials) (pdf . synctex))
   "Method to use for enabling forward and inverse search.
 This can be `source-specials' if source specials should be used,
-`synctex' if SyncTeX should be used, or`auto' if AUCTeX should
+`synctex' if SyncTeX should be used, or `auto' if AUCTeX should
 decide.
 
-Setting this variable does not take effect if TeX Source
-Correlate mode has already been active.  Restart Emacs in this
-case."
-  :type '(choice (const auto) (const synctex) (const source-specials))
+The previous values determine the variable for both DVI and PDF
+mode.  This variable can also be an alist of the kind
+
+  ((dvi . <source-specials or synctex>)
+   (pdf . <source-specials or synctex>))
+
+in which the CDR of each entry is a symbol specifying the method
+to be used in the corresponding mode.
+
+Programs should not use this variable directly but the function
+`TeX-source-correlate-method-active' which returns the method
+actually used for forward and inverse search."
+  :type '(choice (const auto)
+                (const synctex)
+                (const source-specials)
+                (list :tag "Different method for DVI and PDF"
+                      (cons (const dvi)
+                            (choice :tag "Method for DVI mode"
+                                    (const synctex)
+                                    (const source-specials)))
+                      (cons (const pdf)
+                            (choice :tag "Method for PDF mode"
+                                    (const synctex)
+                                    (const source-specials)))))
   :group 'TeX-view)
 
-(defvar TeX-source-correlate-method-active nil
-  "Method actually used for forward and inverse search.")
-
 (defvar TeX-source-correlate-output-page-function nil
   "Symbol of function returning an output page relating to buffer position.
 The function should take no arguments and return the page numer
@@ -1487,12 +1513,24 @@ This is the case if 
`TeX-source-correlate-start-server-flag' is non-nil."
        'synctex
       'source-specials)))
 
+(defun TeX-source-correlate-method-active ()
+  "Return the method actually used for forward and inverse search."
+  (cond
+   ((eq TeX-source-correlate-method 'auto)
+    (TeX-source-correlate-determine-method))
+   ((listp TeX-source-correlate-method)
+    (if TeX-PDF-mode
+       (cdr (assoc 'pdf TeX-source-correlate-method))
+      (cdr (assoc 'dvi TeX-source-correlate-method))))
+   (t
+    TeX-source-correlate-method)))
+
 (defun TeX-source-correlate-expand-options ()
   "Return TeX engine command line option for forward search facilities.
 The return value depends on the value of `TeX-source-correlate-mode'.
 If this is nil, an empty string will be returned."
   (if TeX-source-correlate-mode
-      (if (eq TeX-source-correlate-method-active 'source-specials)
+      (if (eq (TeX-source-correlate-method-active) 'source-specials)
          (concat TeX-source-specials-tex-flags
                  (if TeX-source-specials-places
                      ;; -src-specials=WHERE: insert source specials
@@ -1571,16 +1609,8 @@ SyncTeX are recognized."
     (dbus-register-signal
      :session nil "/org/gnome/evince/Window/0"
      "org.gnome.evince.Window" "SyncSource"
-     'TeX-source-correlate-sync-source))
-  (unless TeX-source-correlate-method-active
-    (setq TeX-source-correlate-method-active
-         (if (eq TeX-source-correlate-method 'auto)
-             (TeX-source-correlate-determine-method)
-           TeX-source-correlate-method)))
-  (when (eq TeX-source-correlate-method-active 'synctex)
-    (setq TeX-source-correlate-output-page-function
-         (when TeX-source-correlate-mode
-           'TeX-synctex-output-page))))
+     'TeX-source-correlate-sync-source)))
+
 (defalias 'TeX-source-specials-mode 'TeX-source-correlate-mode)
 (make-obsolete 'TeX-source-specials-mode 'TeX-source-correlate-mode "11.86")
 (defalias 'tex-source-correlate-mode 'TeX-source-correlate-mode)
@@ -1668,7 +1698,7 @@ The return value depends on the values of
 `source-specials' respectively, an empty string will be
 returned."
   (if (and TeX-source-correlate-mode
-          (eq TeX-source-correlate-method-active 'source-specials))
+          (eq (TeX-source-correlate-method-active) 'source-specials))
       (concat TeX-source-specials-view-position-flags
              (when (TeX-source-correlate-server-enabled-p)
                (concat " " TeX-source-specials-view-editor-flags)))

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog        |   28 ++++++++++++++++
 context.el       |    4 +-
 doc/auctex.texi  |   26 ++++++++++-----
 doc/changes.texi |    3 +-
 tex.el           |   92 ++++++++++++++++++++++++++++++++++++-----------------
 5 files changed, 112 insertions(+), 41 deletions(-)


hooks/post-receive
-- 
GNU AUCTeX



reply via email to

[Prev in Thread] Current Thread [Next in Thread]