From cea86c1d147eeb1630477b76f37a635c94eedd04 Mon Sep 17 00:00:00 2001 From: jao Date: Thu, 6 Oct 2022 20:17:12 +0100 Subject: better matching of existing zathura windows --- lib/doc/jao-pdf.el | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/doc') diff --git a/lib/doc/jao-pdf.el b/lib/doc/jao-pdf.el index 5ab3f24..78d5196 100644 --- a/lib/doc/jao-pdf.el +++ b/lib/doc/jao-pdf.el @@ -72,6 +72,9 @@ (let ((page (if page (format "-P %s" page) ""))) (format "zathura %s %s %s" file page (or suffix "")))) +(defun jao-pdf-zathura-title-rx (file) + (concat (file-name-nondirectory file) " \\[.+\\]")) + ;; e.g. "~/org/doc/write-yourself-a-scheme-in-48-hours.pdf [96 (96/138)]" (defun jao-pdf-zathura-file-info (title) (when (string-match "\\(.+\\) \\[\\(.+\\) (\\([0-9]+\\)/\\([0-9]+\\))\\]" -- cgit v1.2.3