Variable: TeX-view-program-list

TeX-view-program-list is a customizable variable defined in tex.el.

Value

nil

Documentation

List of viewer specifications.

This variable can be used to specify how a viewer is to be invoked and thereby add new viewers on top of the built-in list of viewers defined in TeX-view-program-list-builtin or override entries in the latter which also serves as an example for usage.

The car of each item is a string with a user-readable name. The second element can be a command line to be run as a process or a Lisp function to be executed. The command line can either be specified as a single string or a list of strings and two-part lists. The first element of the two-part lists is a symbol or a list of symbols referring to one or more of the predicates in TeX-view-predicate-list or TeX-view-predicate-list-builtin. The second part of the two-part lists is a command line part. The command line for the viewer is constructed by concatenating the command line parts. Parts with a predicate are only considered if the predicate was evaluated with a positive result. Note that the command line can contain placeholders as defined in the variable TeX-expand-list(var)/TeX-expand-list(fun) or in TeX-expand-list-builtin which are expanded before the viewer is called. The third element of the item is optional and 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 the variable TeX-expand-list(var)/TeX-expand-list(fun) or in TeX-expand-list-builtin can be used here. This element is used to check whether the viewer is actually available on the system.

The use of a function as the second element only works if the View command in TeX-command-list makes use of the hook TeX-run-discard-or-function.

Note: Predicates defined in the current Emacs session will only show up in the customization interface for this variable after restarting Emacs.

Source Code

;; Defined in ~/.emacs.d/elpa/auctex-14.1.2/tex.el
(defcustom TeX-view-program-list nil
  "List of viewer specifications.
This variable can be used to specify how a viewer is to be invoked and
thereby add new viewers on top of the built-in list of viewers defined
in `TeX-view-program-list-builtin' or override entries in the latter
which also serves as an example for usage.

The car of each item is a string with a user-readable name.  The second
element can be a command line to be run as a process or a Lisp function
to be executed.  The command line can either be specified as a single
string or a list of strings and two-part lists.  The first element of
the two-part lists is a symbol or a list of symbols referring to one or
more of the predicates in `TeX-view-predicate-list' or
`TeX-view-predicate-list-builtin'.  The second part of the two-part
lists is a command line part.  The command line for the viewer is
constructed by concatenating the command line parts.  Parts with a
predicate are only considered if the predicate was evaluated with a
positive result.  Note that the command line can contain placeholders as
defined in the variable `TeX-expand-list' or in
`TeX-expand-list-builtin' which are expanded before the viewer is
called.  The third element of the item is optional and 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 the
variable `TeX-expand-list' or in `TeX-expand-list-builtin' can be used
here.  This element is used to check whether the viewer is actually
available on the system.

The use of a function as the second element only works if the View
command in `TeX-command-list' makes use of the hook
`TeX-run-discard-or-function'.

Note: Predicates defined in the current Emacs session will only show up
in the customization interface for this variable after restarting Emacs."
  :group 'TeX-view
  :type
  `(repeat
    (list
     (string :tag "Name")
     (choice
      (group :tag "Command" (string :tag "Command"))
      (group :inline t :tag "Command parts"
             (repeat
              :tag "Command parts"
              (choice
               (string :tag "Command part")
               (list :tag "Predicate and command part"
                     ,(let (list)
                        ;; Build the list of available predicates.
                        (mapc (lambda (spec)
                                (cl-pushnew `(const ,(car spec)) list :test #'equal))
                              (append TeX-view-predicate-list
                                      TeX-view-predicate-list-builtin))
                        ;; Sort the list alphabetically.
                        (setq list (sort list
                                         (lambda (a b)
                                           (string<
                                            (downcase (symbol-name (cadr a)))
                                            (downcase (symbol-name (cadr b)))))))
                        `(choice
                          (choice :tag "Predicate" ,@list)
                          (repeat :tag "List of predicates"
                                  (choice :tag "Predicate" ,@list))))
                     (string :tag "Command part")))))
      (group :tag "Function" function))
     (choice :tag "Viewer executable(s)"
             (string :tag "One executable")
             (repeat :tag "List of executables" (string :tag "Name"))
             (const :tag "No executable" nil)))))