GNU bug report logs - #26190
25.1; ffap problem with curly braces

Previous Next

Package: emacs;

Reported by: wyousef <at> fcih.net

Date: Mon, 20 Mar 2017 11:53:01 UTC

Severity: minor

Tags: fixed

Found in version 25.1

Fixed in version 27.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: wyousef <at> fcih.net
Cc: 26190 <at> debbugs.gnu.org, Dmitry Gutov <dgutov <at> yandex.ru>
Subject: bug#26190: 25.1; ffap problem with curly braces
Date: Fri, 26 Jul 2019 13:38:03 +0200
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> This was intended to make ffap work better with files that have curly
> braces in the file names.  I guess "{/etc}" could be a valid file name?
> But it's an odd one, and I'd guess that it would more commonly refer to
> /etc.  So I think the right thing here is to revert this patch and just
> accept that we can't guess right on file names with weird characters in
> them.

On the other hand, we could just strip the "{" from the front and "}"
from the end, which will restore the previous behaviour and possibly
still work with other files?  I've installed this on the trunk:

diff --git a/lisp/ffap.el b/lisp/ffap.el
index 47ceed47e3..33854a6c0d 100644
--- a/lisp/ffap.el
+++ b/lisp/ffap.el
@@ -1081,9 +1081,9 @@ ffap-string-at-point-mode-alist
   '(
     ;; The default, used when the `major-mode' is not found.
     ;; Slightly controversial decisions:
-    ;; * strip trailing "@" and ":"
+    ;; * strip trailing "@", ":" and enclosing "{"/"}".
     ;; * no commas (good for latex)
-    (file "--:\\\\${}+<>@-Z_[:alpha:]~*?" "<@" "@>;.,!:")
+    (file "--:\\\\${}+<>@-Z_[:alpha:]~*?" "{<@" "@>;.,!:}")
     ;; An url, or maybe an email/news message-id:
     (url "--:=&?$+@-Z_[:alpha:]~#,%;*()!'" "^[0-9a-zA-Z]" ":;.,!?")
     ;; Find a string that does *not* contain a colon:


-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 5 years and 306 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.