GNU bug report logs -
#19839
24.4; ffap does not detect file paths with curly braced shell variables
Previous Next
Reported by: Kaushal <kaushal.modi <at> gmail.com>
Date: Wed, 11 Feb 2015 19:25:01 UTC
Severity: minor
Found in version 24.4
Done: Dmitry Gutov <dgutov <at> yandex.ru>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Hi,
The ffap gives an error if I try to do =C-x C-f= while the path is on a
path containing curly braces wrapped shell variable.
e.g. ${PRJ_HOME}/dir1/file1.el
I traced the problem to the ffap-string-at-point-mode-alist variable in
lisp/ffap.el.
The fix is to replace
(file "--:\\\\$+<>@-Z_[:alpha:]~*?" "<@" "@>;.,!:") ; broken
with
(file "--:\\\\$\\{\\}+<>@-Z_[:alpha:]~*?" "<@" "@>;.,!:") ; fixed
I added "\\{\\}" to the regexp for 'file'.
---
*Original* lisp/ffap.el in emacs 24.4
(defvar ffap-string-at-point-mode-alist
'(
;; The default, used when the `major-mode' is not found.
;; Slightly controversial decisions:
;; * strip trailing "@" and ":"
;; * no commas (good for latex)
(file "--:\\\\$+<>@-Z_[:alpha:]~*?" "<@" "@>;.,!:")
;; An url, or maybe a email/news message-id:
(url "--:=&?$+@-Z_[:alpha:]~#,%;*()!'" "^[0-9a-zA-Z]" ":;.,!?")
;; Find a string that does *not* contain a colon:
(nocolon "--9$+<>@-Z_[:alpha:]~" "<@" "@>;.,!?")
;; A machine:
(machine "-[:alnum:]." "" ".")
;; Mathematica paths: allow backquotes
(math-mode ",-:$+<>@-Z_[:lower:]~`" "<" "@>;.,!?`:")
)
In GNU Emacs 24.4.2 (x86_64-unknown-linux-gnu, GTK+ Version 2.10.4)
of 2015-01-29 on ulcf20.cld.MYCOMPANY.com
Windowing system distributor `The X.Org Foundation', version 11.0.60900000
System Description: Red Hat Enterprise Linux Client release 5.10 (Tikanga)
Configured using:
`configure --prefix=/home/kmodi/usr_local/apps/emacs/24.4
CPPFLAGS=-fgnu89-inline'
Important settings:
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix
Major mode: Emacs-Lisp
--
Kaushal Modi
[Message part 2 (text/html, inline)]
This bug report was last modified 10 years and 46 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.