Since I have setup SumatraPDF to automatically refresh PDFs when they change, how can I suppress "view" (resulting in opening a new instance of the pdf) when using the shortcut
M-n P (running pdfLaTeX) in Emacs with AucTeX installed.
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.Sign up to join this community
M-n P calls
ess-swv-PDF (which is part of the ESS package), which includes a hard-coded call to your pdfviewer. However, you can customize the viewer it will use, which is stored in the variable
ess-pdf-viewer-pref. Setting this to a no-op, like ":", should effectively suppress the 'view' command.
M-x customize-variable ess-pdf-viewer-pref <RET> and set the value there.
ess-swv-PDF runs, it calls
"gets external PDF viewer to be used from ESS. Use
ess-pdf-viewer-pref when that is executably found by
M-x executable-find. Otherwise try a list of fixed known viewers."
In other words, even if the variable
ess-pdf-viewer-pref is set to
nil, a fixed known viewer is searched for. Unfortunately this means the only way to prevent
ess-swv-PDF from displaying the pdf is to redefine or modify the function.