Subject: [feature/native-comp] pdf-tools missing arrow tooltip

From: Nicola Manca <[email-masked]>
Date: Wed, 30 Sep 2020 09:37:02 +0200

* General problem:

   I'm using auctex and pdf-tools for live preview. Between them it is
   possible to do direct and reverse text lookup: in pdf tools by
   C-<mouse 1> and in the latex source by C-c C-v. In the latter case, a
   red arrow is usually placed on the left side of the pdf document to
   highlight the line containing the text in the source. This arrow does
   not appear in the native-compiled branch.

* Related errors (from message buffer):

   pdf-util-tooltip-arrow: Invalid function: pdf-view-current-overlay

* Related .emacs config

   (setq TeX-view-program-selection '((output-pdf "PDF Tools"))
         TeX-view-program-list '(("PDF Tools" TeX-pdf-tools-sync-view))
         TeX-source-correlate-start-server t)
   (add-hook 'TeX-after-compilation-finished-functions
         #'TeX-revert-document-buffer)

* To reproduce

   - Install auctex and pdf-tools packages.
   - Create a latex document.
   - Compile it with sequential C-c until the generated pdf is opened in
     a window on the side of the source.
   - Try C-<mouse 1> on any text in the pdf and check if the cursor jumps
     in the corresponding position of the latex source.
   - Type C-c C-v in the source and check if the pdf view is updated.
   - If native-compiled the view is updated but the red arrow marking the
     position does not appear.

In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.23, cairo 
version 1.16.0)
  of 2020-09-24 built on thinkdeep
Repository revision: e5b052d60d905209c6cefcf18c620167ed946301
Repository branch: feature/native-comp
Windowing system distributor 'The X.Org Foundation', version 11.0.12008000
System Description: Debian GNU/Linux bullseye/sid

Configured using:
  'configure --with-nativecomp --without-gconf --with-rsvg --with-x
  --with-xwidgets --without-xaw3d --without-gsettings --with-mailutils'

Configured features:
XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND GPM DBUS GLIB NOTIFY INOTIFY
LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES NATIVE_COMP THREADS
XWIDGETS PDUMPER LCMS2

Important settings:
   value of $LC_COLLATE: it_IT.UTF-8
   value of $LC_TIME: it_IT.UTF-8
   value of $LANG: en_GB.UTF-8
   locale-coding-system: utf-8-unix

Major mode: PDFView

Minor modes in effect:
   TeX-PDF-mode: t
   TeX-source-correlate-mode: t
   pdf-sync-minor-mode: t
   pdf-annot-minor-mode: t
   pdf-outline-minor-mode: t
   pdf-links-minor-mode: t
   pdf-history-minor-mode: t
   show-paren-mode: t
   global-ede-mode: t
   ede-minor-mode: t
   pdf-occur-global-minor-mode: t
   pdf-isearch-minor-mode: t
   pdf-misc-context-menu-minor-mode: t
   pdf-misc-menu-bar-minor-mode: t
   pdf-misc-size-indication-minor-mode: t
   pdf-misc-minor-mode: t
   pdf-cache-prefetch-minor-mode: t
   global-company-mode: t
   company-mode: t
   pyvenv-mode: t
   shell-dirtrack-mode: t
   global-undo-tree-mode: t
   undo-tree-mode: t
   which-key-mode: t
   override-global-mode: t
   beacon-mode: t
   icomplete-mode: t
   fido-mode: t
   tooltip-mode: t
   global-eldoc-mode: t
   electric-indent-mode: t
   mouse-wheel-mode: t
   menu-bar-mode: t
   file-name-shadow-mode: t
   global-font-lock-mode: t
   font-lock-mode: t
   blink-cursor-mode: t
   auto-composition-mode: t
   auto-encryption-mode: t
   auto-compression-mode: t
   buffer-read-only: t
   transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug sendmail ffap gnutls network-stream
url-http url-gw nsm url-cache url-auth eww xdg url-queue mm-url cl-print
debug backtrace reftex-parse server preview prv-emacs company-math
math-symbol-lists reftex-dcr reftex reftex-loaddefs reftex-vars tex-buf
font-latex texmathp latex latex-flymake tex-ispell tex-style tex crm
tex-mode latexenc misearch multi-isearch dired-aux ede/dired vc-mtn
vc-hg vc-git diff-mode vc-bzr vc-src vc-sccs vc-svn vc-cvs vc-rcs vc
vc-dispatcher dired-sidebar face-remap dired-subtree dired-hacks-utils
dash two-column iso-transl battery time cua-base display-line-numbers
arc-mode archive-mode pdf-sync pdf-annot pdf-outline pdf-links
pdf-history org-superstar image-file image-converter org-element
avl-tree ol-eww ol-rmail ol-mhe ol-irc ol-info ol-gnus nnselect nnir
gnus-art mm-uu mml2015 mm-view mml-smime smime dig gnus-sum shr kinsoku
svg dom gnus-group gnus-undo gnus-start gnus-dbus dbus xml gnus-cloud
nnimap nnmail mail-source utf7 netrc nnoo gnus-spec gnus-int gnus-range
message rmc puny rfc822 mml mml-sec mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader gnus-win gnus
nnheader gnus-util rmail rmail-loaddefs rfc2047 rfc2045 ietf-drums
mail-utils mm-util mail-prsvr ol-docview ol-bibtex bibtex ol-bbdb ol-w3m
org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-footnote
org-src ob-comint org-pcomplete org-list org-faces org-entities noutline
outline org-version ob-emacs-lisp ob-core ob-eval org-table ol org-keys
org-compat org-macs org-loaddefs cal-menu calendar cal-loaddefs desktop
frameset company-oddmuse company-keywords company-etags company-gtags
company-dabbrev-code company-dabbrev company-files company-clang
company-cmake company-semantic company-template company-bbdb .emacs
sanityinc-tomorrow-night-theme color-theme-sanityinc-tomorrow comp rx
paren ede/speedbar ede/files ede ede/detect ede/base ede/auto ede/source
eieio-base eieio-speedbar speedbar ezimage dframe eieio-custom
latex-preview-pane doc-view pdf-occur ibuf-ext ibuffer ibuffer-loaddefs
tablist tablist-filter semantic/wisent/comp semantic/wisent
semantic/wisent/wisent semantic/util-modes semantic/util semantic
semantic/tag semantic/lex semantic/fw mode-local find-func cedet
pdf-isearch let-alist pdf-misc imenu pdf-tools pdf-view bookmark
text-property-search pp jka-compr pdf-cache pdf-info tq pdf-util
image-mode dired dired-loaddefs exif skeleton google-translate-smooth-ui
google-translate google-translate-default-ui google-translate-core-ui
color google-translate-core google-translate-tk google-translate-backend
url url-proxy url-privacy url-expand url-methods url-history url-cookie
url-domsuf url-util mailcap flyspell-correct-popup popup
flyspell-correct flyspell ispell yasnippet highlight-indentation
flymake-proc flymake warnings thingatpt company-capf company pcase
help-fns radix-tree elpy elpy-rpc pyvenv eshell esh-cmd esh-ext esh-opt
esh-proc esh-io esh-arg esh-module esh-groups esh-util elpy-shell
elpy-profile elpy-django s elpy-refactor python tramp-sh tramp
tramp-loaddefs trampver tramp-integration tramp-compat shell pcomplete
parse-time iso8601 time-date ls-lisp format-spec ido grep compile comint
ansi-color files-x etags fileloop generator xref project ring cus-edit
cus-start cus-load wid-edit undo-tree diff which-key advice edmacro
kmacro cl-extra help-mode use-package-ensure use-package-bind-key
bind-key easy-mmode use-package-core epa-file epa derived epg epg-config
beacon icomplete finder-inf tex-site info package easymenu browse-url
url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs
eieio-loaddefs password-cache json subr-x map url-vars seq byte-opt gv
bytecomp byte-compile cconv cl-loaddefs cl-lib tooltip eldoc electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese composite charscript charprop case-table epa-hook
jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button
loaddefs faces cus-face macroexp files window text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote threads xwidget-internal dbusbind
inotify lcms2 dynamic-setting font-render-setting cairo move-toolbar gtk
x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 882207 127824)
  (symbols 48 48417 2)
  (strings 32 242604 18013)
  (string-bytes 1 23551156)
  (vectors 16 80957)
  (vector-slots 8 2139409 195574)
  (floats 8 14400 1487)
  (intervals 56 12097 4408)
  (buffers 992 48))