emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#19839: closed (24.4; ffap does not detect file pat


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#19839: closed (24.4; ffap does not detect file paths with curly braced shell variables)
Date: Wed, 08 Apr 2015 00:23:02 +0000

Your message dated Wed, 08 Apr 2015 03:22:09 +0300
with message-id <address@hidden>
and subject line Re: bug#19839: 24.4; ffap does not detect file paths with 
curly braced shell variables
has caused the debbugs.gnu.org bug report #19839,
regarding 24.4; ffap does not detect file paths with curly braced shell 
variables
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
19839: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19839
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 24.4; ffap does not detect file paths with curly braced shell variables Date: Wed, 11 Feb 2015 14:23:14 -0500
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 "--:=&address@hidden: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

--- End Message ---
--- Begin Message --- Subject: Re: bug#19839: 24.4; ffap does not detect file paths with curly braced shell variables Date: Wed, 08 Apr 2015 03:22:09 +0300 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:36.0) Gecko/20100101 Thunderbird/36.0
On 04/07/2015 05:26 AM, Kaushal wrote:
I was able to recreate this consistently in master branch.

Ok, me too.

Also I noticed that no error is thrown any more (it probably changed
24.4 onwards) but ffap still does not work over paths with curly braces.
My fix fixes that.

Previously, I stopped looking after seeing no error. Didn't actually expect that the expansion works.

              '(file "--:\\\\$\\{\\}+<>@-Z_[:alpha:]~*?" "<@" "@>;.,!:"))

Thank you, the suggested change in now on master.

Let me know if you also can repeat these steps.

Seems to work now.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]