[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] ffap.el: Exclude angle brackets from file names in XML
From: |
Eli Zaretskii |
Subject: |
Re: [PATCH] ffap.el: Exclude angle brackets from file names in XML |
Date: |
Sun, 10 Mar 2024 07:48:27 +0200 |
> 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.
- [PATCH] ffap.el: Exclude angle brackets from file names in XML, StrawberryTea, 2024/03/09
- Re: [PATCH] ffap.el: Exclude angle brackets from file names in XML,
Eli Zaretskii <=
- Re: [PATCH] ffap.el: Exclude angle brackets from file names in XML, LemonBreezes, 2024/03/10
- Re: [PATCH] ffap.el: Exclude angle brackets from file names in XML, Eli Zaretskii, 2024/03/10
- Re: [PATCH] ffap.el: Exclude angle brackets from file names in XML, Yuri Khan, 2024/03/10
- Re: [PATCH] ffap.el: Exclude angle brackets from file names in XML, Eli Zaretskii, 2024/03/10
- Re: [PATCH] ffap.el: Exclude angle brackets from file names in XML, Yuri Khan, 2024/03/10
- Re: [PATCH] ffap.el: Exclude angle brackets from file names in XML, Eli Zaretskii, 2024/03/10
- Re: [PATCH] ffap.el: Exclude angle brackets from file names in XML, Yuri Khan, 2024/03/10
- Re: [PATCH] ffap.el: Exclude angle brackets from file names in XML, Eli Zaretskii, 2024/03/10
- Re: [PATCH] ffap.el: Exclude angle brackets from file names in XML, Yuri Khan, 2024/03/10
- Re: [PATCH] ffap.el: Exclude angle brackets from file names in XML, Lynn Winebarger, 2024/03/10