From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kaushal Newsgroups: gmane.emacs.bugs Subject: bug#19839: 24.4; ffap does not detect file paths with curly braced shell variables Date: Wed, 11 Feb 2015 14:23:14 -0500 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a113447f2b47e5a050ed4f12d X-Trace: ger.gmane.org 1423682724 10395 80.91.229.3 (11 Feb 2015 19:25:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 11 Feb 2015 19:25:24 +0000 (UTC) To: 19839@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Feb 11 20:25:12 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YLcuO-0008Hc-FN for geb-bug-gnu-emacs@m.gmane.org; Wed, 11 Feb 2015 20:25:12 +0100 Original-Received: from localhost ([::1]:46737 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YLcuN-0005Ka-UK for geb-bug-gnu-emacs@m.gmane.org; Wed, 11 Feb 2015 14:25:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42570) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YLcuK-0005IO-Eu for bug-gnu-emacs@gnu.org; Wed, 11 Feb 2015 14:25:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YLcuE-00059I-SG for bug-gnu-emacs@gnu.org; Wed, 11 Feb 2015 14:25:08 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:49102) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YLcuE-000599-PS for bug-gnu-emacs@gnu.org; Wed, 11 Feb 2015 14:25:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YLcuE-0007X8-BR for bug-gnu-emacs@gnu.org; Wed, 11 Feb 2015 14:25:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Kaushal Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 11 Feb 2015 19:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 19839 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.142368265628884 (code B ref -1); Wed, 11 Feb 2015 19:25:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 11 Feb 2015 19:24:16 +0000 Original-Received: from localhost ([127.0.0.1]:40340 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YLctT-0007Vm-JO for submit@debbugs.gnu.org; Wed, 11 Feb 2015 14:24:16 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:40555) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YLctR-0007VZ-V3 for submit@debbugs.gnu.org; Wed, 11 Feb 2015 14:24:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YLctJ-0004nl-Bf for submit@debbugs.gnu.org; Wed, 11 Feb 2015 14:24:08 -0500 Original-Received: from lists.gnu.org ([208.118.235.17]:54724) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YLctJ-0004nd-8F for submit@debbugs.gnu.org; Wed, 11 Feb 2015 14:24:05 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42266) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YLctD-0004nK-BC for bug-gnu-emacs@gnu.org; Wed, 11 Feb 2015 14:24:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YLct9-0004lt-T4 for bug-gnu-emacs@gnu.org; Wed, 11 Feb 2015 14:23:59 -0500 Original-Received: from mail-ie0-f173.google.com ([209.85.223.173]:41679) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YLct9-0004lR-Mm for bug-gnu-emacs@gnu.org; Wed, 11 Feb 2015 14:23:55 -0500 Original-Received: by iecrd18 with SMTP id rd18so6425332iec.8 for ; Wed, 11 Feb 2015 11:23:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=t4wfwUQ4Z0fxofo7huWh9Xvs6g8aCP3y3TEQAV+jFYc=; b=DGnZTb4Z6qL/d6pIStjuyoCkYIGmD+Ta5BfTqdlPu3riF5tP/sHfF6tddU5iT9H8Po VoqWUnkRpMIS8YtnqaWAaAkbfoNVDxTwNPUvcyDqzPcgxVjXtJ9eOXKbdyX9kGwupDwY I/VNjxoGQEtKy95t+sm8PX+MsplAmQ/1P9EZ4RHUjpiwkiQEI8qRA5lYkrx6WQ/O2fPt 93pOY2KQjKc1niN1IL8/unRwuWuMHGEBCfnVcTmvWrMKK5OxkHhBtZxL667Q3t2a+xNf nl9Yi/xOYa98WE6EuvUF7XkFKPnznz933N3GezSHgAf0rNvaYvRpMyRsA2ofjEiN6GPJ 9ooA== X-Received: by 10.50.222.44 with SMTP id qj12mr32232013igc.48.1423682634544; Wed, 11 Feb 2015 11:23:54 -0800 (PST) Original-Received: by 10.42.93.12 with HTTP; Wed, 11 Feb 2015 11:23:14 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:99259 Archived-At: --001a113447f2b47e5a050ed4f12d Content-Type: text/plain; charset=ISO-8859-1 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 --001a113447f2b47e5a050ed4f12d Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi,

The ffap gives an error if I try to do =3DC-x C-f=3D = 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=A0ffap-string-at= -point-mode-alist variable in lisp/ffap.el.

The fix is to replace=A0

=A0 = =A0 (file "--:\\\\$+<>@-Z_[:alpha:]~*?" "<@" &= quot;@>;.,!:") ; broken

wi= th

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

<= font face=3D"arial, helvetica, sans-serif">
I added &qu= ot;\\{\\}" to the regexp for 'file'.

---

*Original* lisp/ffap= .el in emacs 24.4

(defvar ffap-string-at-point-mode-alist
=A0 '(
=A0 =A0 ;; The default, used when the `major-mode' is not found.
=A0 =A0 ;; Slightly controversial decisions:
=A0 =A0 ;; = * strip trailing "@" and ":"
=A0 =A0 ;; * no = commas (good for latex)
=A0 =A0 (file "--:\\\\$+<>@-Z_= [:alpha:]~*?" "<@" "@>;.,!:")
=A0 = =A0 ;; An url, or maybe a email/news message-id:
=A0 =A0 (url &qu= ot;--:=3D&?$+@-Z_[:alpha:]~#,%;*()!'" "^[0-9a-zA-Z]"= ":;.,!?")
=A0 =A0 ;; Find a string that does *not* con= tain a colon:
=A0 =A0 (nocolon "--9$+<>@-Z_[:alpha:]~&= quot; "<@" "@>;.,!?")
=A0 =A0 ;; A mach= ine:
=A0 =A0 (machine "-[:alnum:]." "" "= .")
=A0 =A0 ;; Mathematica paths: allow backquotes
=A0 =A0 (math-mode ",-:$+<>@-Z_[:lower:]~`" "<&quo= t; "@>;.,!?`:")
=A0 =A0 )


In GNU Emacs 24.4.2 (x= 86_64-unknown-linux-gnu, GTK+ Version 2.10.4)
=A0of 201= 5-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 rel= ease 5.10 (Tikanga)

Configured using:<= /font>
=A0`configure --prefix=3D/home/kmodi/usr_local/apps/emacs/2= 4.4
=A0CPPFLAGS=3D-fgnu89-inline'

<= /font>
Important settings:
=A0 value of $LANG: en_= US.UTF-8
=A0 locale-coding-system: utf-8-unix
<= div class=3D"gmail_default" style>
Major mode: Emacs-Lisp

<= /div>


--
Kaushal Modi
--001a113447f2b47e5a050ed4f12d--