Subject: bug#71376: 14.0.5; find-file-at-point doesn't work in LaTeX-mode

From: Бабушкин Максим Владимирович<[email-masked]>
Date: Wed, 5 Jun 2024 11:51:24 +0300

Hello,

Emacs has a built-in function 'find-file-at-point' (or 'ffap'), which works
great with the standard latex-mode. For example, putting cursor on the
argument of the command
\input{~/Downloads/myfile.tex}
and calling 'M-x find-file-at-point' causes visiting the file under the
cursor. It works similarly with the \usepackage command.

The AUCTeX package comes with LaTeX-mode which does not support this
functionality. But it seems that the older versions of AUCTeX did.

As a workaround I put these lines in my .emacs

(eval-after-load "ffap"
  '(progn
     (add-to-list 'ffap-alist '(LaTeX-mode . ffap-latex-mode)) ; same as
for latex-mode
     (add-to-list 'ffap-string-at-point-mode-alist '(LaTeX-mode
"--:\\\\$+<>@-Z_[:alpha:]~*?" "<@" "@>;.,!:")) ; same as for latex-mode
     )
  )

Emacs  : GNU Emacs 29.3 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.24.41, cairo version 1.18.0)
Package: 14.0.5
--
Maksim Babushkin