My bad, it doesn't actually say <file>, it says <recorddeds>, <bagdescription>, <lookupFolder>, etc. 

StrawberryTea

On Sat, Mar 9, 2024, at 11:48 PM, Eli Zaretskii wrote:
> From: StrawberryTea <look@strawberrytea.xyz>
> Date: Sat, 9 Mar 2024 15:37:44 -0600

> In my company's code base, we have a lot of XML files that contain file
> names in tags.  For example:

>   <file>foo/bar.txt</file>

> Currently, ffap.el does not recognize these file names as such, because
> it recognizes the angle brackets as part of the file name.  This patch
> fixes that.
> ---
>  lisp/ffap.el | 3 +++
>  1 file changed, 3 insertions(+)

> diff --git a/lisp/ffap.el b/lisp/ffap.el
> index 5383f743878..b2b681b7c44 100644
> --- a/lisp/ffap.el
> +++ b/lisp/ffap.el
> @@ -1065,6 +1065,9 @@ ffap-string-at-point-mode-alist
>      ;; (La)TeX: don't allow braces
>      (latex-mode "--:\\\\$+<>@-Z_[:alpha:]~*?" "<@" "@>;.,!:")
>      (tex-mode "--:\\\\$+<>@-Z_[:alpha:]~*?" "<@" "@>;.,!:")
> +    ;; XML: don't allow angle brackets
> +    (xml-mode "--:\\\\${}+@-Z_[:alpha:]~*?#" "{<@" "@>;.,!:}")
> +    (nxml-mode "--:\\\\${}+@-Z_[:alpha:]~*?#" "{<@" "@>;.,!:}")
>      )

Wouldn't it be better to teach ffap.el to use the <file>...</file>
markup directly in XML?  XML actually tells us this is a file name, so
why do we need to guess using regexps?

Thanks.