diff options
author | JSDurand <mmemmew@gmail.com> | 2023-05-30 13:33:58 +0800 |
---|---|---|
committer | JSDurand <mmemmew@gmail.com> | 2023-05-30 13:33:58 +0800 |
commit | a7eff915e6691d1fc412c8d6df01e1906e8e9b38 (patch) | |
tree | 46d22f4eeea87aab203e5c680aa6d04dcb8e8cca /tex-conf.el | |
parent | dd7c9b1d1ac7d6dbbdaa5759ef8292d5e11eabb4 (diff) |
TeX: If the pdf is already displayed, reuse that window.
Sometimes I want to display the pdf side-by-side with the source file,
in which case it would be natural and convenient to reuse the same
window for displaying the pdf file, instead of switching to the pdf
file in the window that was displaying the source file.
Diffstat (limited to 'tex-conf.el')
-rw-r--r-- | tex-conf.el | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tex-conf.el b/tex-conf.el index 0c90a48..4cf5ac0 100644 --- a/tex-conf.el +++ b/tex-conf.el @@ -61,10 +61,12 @@ #'TeX-revert-document-buffer) (setq pdf-sync-forward-display-action - (list (list 'display-buffer-same-window))) + (list (list #'display-buffer-reuse-window + #'display-buffer-same-window))) (setq pdf-sync-backward-display-action - (list (list 'display-buffer-same-window))) + (list (list #'display-buffer-reuse-window + #'display-buffer-same-window))) (advice-add #'TeX-pdf-tools-sync-view :override #'durand-TeX-pdf-tools-sync-view-a) |