Re: [AUCTeX-devel] [Patch] support xreader

2017-06-16 Thread Mosè Giordano
Hi Antoine,

2017-06-15 15:11 GMT+02:00 Antoine Levitt :
> So apparently forking GNOME once was not enough, and now the linux mint
> people have a new name for their pdf viewer, xreader (see e.g.
> https://www.linuxmint.com/rel_sarah_cinnamon_whatsnew.php).

Oh my gosh.

> Here's a
> patch for auctex to support it. I had to remove a check for the
> executable, because xreader has DE "x" and APP "reader" while the
> executable is named "xreader", but I don't think that check was useful
> in the first place (might as well try to register with dbus, even if the
> executable does not exist). I also reworded the doc to speak of
> "evince-compatible viewers" (who knows how many of these there will be
> in the future...)

Thanks for the patch!  Looks good to me, I installed it.  I see that
you already assigned copyright for Emacs, that's good for AUCTeX as
well.

For next contributions, git patches with proper commit message (with
ChangeLog-like body) would be much appreciated ;-)

Bye,
Mosè

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


[AUCTeX-diffs] GNU AUCTeX branch, master, updated. 42aa58cf338b9084cc4c81e747e6adc39dbba00b

2017-06-16 Thread Mosè Giordano
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  42aa58cf338b9084cc4c81e747e6adc39dbba00b (commit)
  from  fbbb17bec6ff1b9f1d57b6944124cb69dffb67a1 (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 42aa58cf338b9084cc4c81e747e6adc39dbba00b
Author: Antoine Levitt 
Date:   Sat Jun 17 01:18:07 2017 +0200

Add support for xreader viewer

* tex.el (TeX-evince-dbus-p):
(TeX-evince-sync-view-1):
(TeX-view-program-select-evince):
(TeX-raise-frame-function):
(TeX-source-correlate-mode): Adapt functions and docstrings to xreader.
(TeX-xreader-sync-view): New function.
(TeX-view-program-list-builtin): Add xreader.

Signed-off-by: Mosè Giordano 

diff --git a/tex.el b/tex.el
index aeaf67c..3932379 100644
--- a/tex.el
+++ b/tex.el
@@ -1234,33 +1234,31 @@ The following built-in predicates are available:
   :group 'TeX-view
   :type '(alist :key-type symbol :value-type (group sexp)))
 
-;; XXX: Atril is a fork of Evince and shares an almost identical interface with
-;; it.  Instead of having different functions for each program, we keep the
-;; original *-evince-* functions and make them accept arguments to specify the
-;; actual name of the program and the desktop environment, that will be used to
-;; set up DBUS communication.
+;; XXX: Atril and xreader are forks of Evince and share an almost
+;; identical interface with it. Instead of having different functions
+;; for each program, we keep the original *-evince-* functions and
+;; make them accept arguments to specify the actual name of the
+;; program and the desktop environment, that will be used to set up
+;; DBUS communication.
 
 ;; Require dbus at compile time to prevent errors due to `dbus-ignore-errors'
 ;; not being defined.
 (eval-when-compile (and (featurep 'dbusbind)
(require 'dbus nil :no-error)))
 (defun TeX-evince-dbus-p (de app  options)
-  "Return non-nil, if atril or evince are installed and accessible via DBUS.
+  "Return non-nil, if an evince-compatible reader is accessible via DBUS.
 Additional OPTIONS may be given to extend the check.  If none are
 given, only the minimal requirements needed by backward search
 are checked.  If OPTIONS include `:forward', which is currently
 the only option, then additional requirements needed by forward
 search are checked, too.
 
-DE is the name of the desktop environment, either \"gnome\" or
-\"mate\", APP is the name of viewer, either \"evince\" or
-\"atril\"."
+DE is the name of the desktop environment, APP is the name of viewer."
   (let ((dbus-debug nil))
 (and (featurep 'dbusbind)
 (require 'dbus nil :no-error)
 (dbus-ignore-errors (dbus-get-unique-name :session))
 (dbus-ping :session (format "org.%s.%s.Daemon" de app))
-(executable-find app)
 (or (not (memq :forward options))
 (let ((spec (dbus-introspect-get-method
  :session (format "org.%s.%s.Daemon" de app)
@@ -1308,12 +1306,11 @@ entry in `TeX-view-program-list-builtin'."
 (defun TeX-evince-sync-view-1 (de app)
   "Focus the focused page/paragraph in Evince with the position
 of point in emacs by using Evince's DBUS API.  Used by default
-for the Atril or Evince entries in
+for the Evince-compatible entries in
 `TeX-view-program-list-builtin' if the requirements are met.
 
-DE is the name of the desktop environment, either \"gnome\" or
-\"mate\", APP is the name of viewer, either \"evince\" or
-\"atril\"."
+DE is the name of the desktop environment, APP is the name of
+viewer."
   (require 'url-util)
   (let* ((uri (concat "file://" (url-encode-url
 (expand-file-name
@@ -1354,12 +1351,15 @@ DE is the name of the desktop environment, either 
\"gnome\" or
   "Run `TeX-evince-sync-view-1', which see, set up for Evince."
   (TeX-evince-sync-view-1 "gnome" "evince"))
 
+(defun TeX-xreader-sync-view ()
+  "Run `TeX-evince-sync-view-1', which see, set up for Evince."
+  (TeX-evince-sync-view-1 "x" "reader"))
+
 (defun TeX-view-program-select-evince (de app)
   "Select how to call the Evince-like viewer.
 
-DE is the name of the desktop environment, either \"gnome\" or
-\"mate\", APP is the name of viewer, either \"evince\" or
-\"atril\"."
+DE is the name of the desktop environment, APP is the name of
+viewer."
   (if (TeX-evince-dbus-p de app :forward)
   (intern (format "TeX-%s-sync-view" app))
 `(,app (mode-io-correlate
@@ -1418,6 +1418,7 @@ DE is the name of the desktop environment, either 
\"gnome\" or
   ("xpdf" ("xpdf -remote %s -raise %o" (mode-io-correlate 

[AUCTeX-commit] GNU AUCTeX branch, master, updated. 42aa58cf338b9084cc4c81e747e6adc39dbba00b

2017-06-16 Thread Mos� Giordano
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  42aa58cf338b9084cc4c81e747e6adc39dbba00b (commit)
  from  fbbb17bec6ff1b9f1d57b6944124cb69dffb67a1 (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 42aa58cf338b9084cc4c81e747e6adc39dbba00b
Author: Antoine Levitt 
Date:   Sat Jun 17 01:18:07 2017 +0200

Add support for xreader viewer

* tex.el (TeX-evince-dbus-p):
(TeX-evince-sync-view-1):
(TeX-view-program-select-evince):
(TeX-raise-frame-function):
(TeX-source-correlate-mode): Adapt functions and docstrings to xreader.
(TeX-xreader-sync-view): New function.
(TeX-view-program-list-builtin): Add xreader.

Signed-off-by: Mosè Giordano 

---

Summary of changes:
 tex.el | 44 +++-
 1 file changed, 23 insertions(+), 21 deletions(-)


hooks/post-receive
-- 
GNU AUCTeX

___
auctex-commit mailing list
auctex-com...@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-commit