Hi auctex-devel,

I've recently been using the sioyek viewer:
https://github.com/ahrm/sioyek. This small patch adds a
configuration for calling sioyek to the built-in list.

I originally wrote this for my own use, but it seems like sioyek
is getting reasonably popular, so I thought that it may be useful
to others.

Thanks,
Eshan
From bcd0c353687b2153639aa83b10e4d872adf1b1c1 Mon Sep 17 00:00:00 2001
From: Eshan Ramesh <[email protected]>
Date: Thu, 16 Jun 2022 19:29:51 -0400
Subject: [PATCH] Add support for the Sioyek document viewer

* tex.el (TeX-view-program-list-builtin): Add support for sioyek
* doc/changes.texi (News since last release): Entry for this change
---
 doc/changes.texi |  3 +++
 tex.el           | 10 +++++++++-
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/doc/changes.texi b/doc/changes.texi
index 69ef47d6..c0294716 100644
--- a/doc/changes.texi
+++ b/doc/changes.texi
@@ -11,6 +11,9 @@
 @heading News since last release
 
 @itemize @bullet
+@item
+Support for the Sioyek document viewer is added.
+
 @item
 @AUCTeX{} now requires GNU Emacs 25.1 or higher.
 
diff --git a/tex.el b/tex.el
index 209639ea..6bf75498 100644
--- a/tex.el
+++ b/tex.el
@@ -1293,7 +1293,15 @@ viewer."
        ("zathura %o"
         (mode-io-correlate
          " --synctex-forward %n:0:\"%b\" -x \"emacsclient +%{line} %{input}\""))
-       "zathura"))))
+       "zathura")
+      ("Sioyek"
+       ("sioyek %o"
+        (mode-io-correlate
+         ,(concat
+           " --forward-search-file \"%b\""
+           " --forward-search-line %n"
+           " --inverse-search \"emacsclient +%2 %1\"")))
+       "sioyek"))))
   "Alist of built-in viewer specifications.
 This variable should not be changed by the user who can use
 `TeX-view-program-list' to add new viewers or overwrite the
-- 
2.36.1

Reply via email to