From fd195b66e1ee84397fcca062773b848a3653c794 Mon Sep 17 00:00:00 2001 From: "Philipp G. Haselwarter" Date: Tue, 4 Jul 2023 13:03:44 +0200 Subject: [PATCH] [pdf-sync] use absolute line number to work in narrowed buffer `line-number-at-pos` should be called with second argument `absolute` set to `t` in order for `pdf-sync-forward-correlate` to work in buffers with active narrowing. --- lisp/pdf-sync.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/pdf-sync.el b/lisp/pdf-sync.el index cfbc2a3b..68de3b90 100644 --- a/lisp/pdf-sync.el +++ b/lisp/pdf-sync.el @@ -670,7 +670,7 @@ Returns a list \(PDF PAGE X1 Y1 X2 Y2\), where PAGE, X1, Y1, X2 and Y2 may be nil, if the destination could not be found." (unless (fboundp 'TeX-master-file) (error "This function works only with AUCTeX")) - (unless line (setq line (line-number-at-pos))) + (unless line (setq line (line-number-at-pos nil t))) (unless column (setq column (current-column))) (let* ((pdf (expand-file-name