From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 11 14:24:16 2015 Received: (at submit) by debbugs.gnu.org; 11 Feb 2015 19:24:16 +0000 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 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 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 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_20,FREEMAIL_FROM, HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 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 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 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 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 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) MIME-Version: 1.0 Received: by 10.42.93.12 with HTTP; Wed, 11 Feb 2015 11:23:14 -0800 (PST) From: Kaushal Date: Wed, 11 Feb 2015 14:23:14 -0500 Message-ID: Subject: 24.4; ffap does not detect file paths with curly braced shell variables To: bug-gnu-emacs@gnu.org Content-Type: multipart/alternative; boundary=001a113447f2b47e5a050ed4f12d 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-Received-From: 208.118.235.17 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) --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-- From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 06 15:14:03 2015 Received: (at 19839) by debbugs.gnu.org; 6 Apr 2015 19:14:03 +0000 Received: from localhost ([127.0.0.1]:46527 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YfCTC-0006HS-FR for submit@debbugs.gnu.org; Mon, 06 Apr 2015 15:14:02 -0400 Received: from mail-ie0-f182.google.com ([209.85.223.182]:35803) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YfCT9-0006Gs-Nk for 19839@debbugs.gnu.org; Mon, 06 Apr 2015 15:14:00 -0400 Received: by ierf6 with SMTP id f6so28781905ier.2 for <19839@debbugs.gnu.org>; Mon, 06 Apr 2015 12:13:54 -0700 (PDT) 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=IEvaX4s5cfmG07uKgIQOlBSY+M8cD40FyUK8pPMsrvQ=; b=A1l/1AJox4CFTqHmicrxD2m7U0PAkGoD3aRk4pygivSO4x2d0nNjutjKMB/3V63fvH wc2Thq8o2yiJPF8T53s4zlcwDiJwwCaummhRdQbbv1C78ubfTGkX6hv8X+/e7eTNJ2AV BPr8zYWwmgivUOkmNgkiS136WNJWAxEl49cKLzxfHAkliM/NvJX4dwKmkcpTKulBWQSp xs4FkdCn5uZUzxo+zwPb3+F7Eoumk7V2sED0Pke3RHBBzVloXlh4vDy6jUNN+P8EduP9 J6gpSGt7Qu5MnEZq0acBj034WXMBlpuT7hAkFaNApjgQdT/pQ/G+TCKu6YgM5pTS1hJT ZDlQ== X-Received: by 10.50.78.199 with SMTP id d7mr2887169igx.18.1428347634304; Mon, 06 Apr 2015 12:13:54 -0700 (PDT) MIME-Version: 1.0 From: Kaushal Date: Mon, 06 Apr 2015 19:13:53 +0000 Message-ID: Subject: 24.4; ffap does not detect file paths with curly braced shell variables To: 19839@debbugs.gnu.org Content-Type: multipart/alternative; boundary=089e013c6ee45bcf57051313191d X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 19839 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --089e013c6ee45bcf57051313191d Content-Type: text/plain; charset=ISO-8859-1 Did anyone get a chance to review this? Thanks. --089e013c6ee45bcf57051313191d Content-Type: text/html; charset=ISO-8859-1
Did anyone get a chance to review this?

Thanks.
--089e013c6ee45bcf57051313191d-- From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 06 19:53:24 2015 Received: (at 19839) by debbugs.gnu.org; 6 Apr 2015 23:53:25 +0000 Received: from localhost ([127.0.0.1]:46685 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YfGpY-00051Q-Fh for submit@debbugs.gnu.org; Mon, 06 Apr 2015 19:53:24 -0400 Received: from mail-wi0-f182.google.com ([209.85.212.182]:37071) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YfGpW-00051D-5A for 19839@debbugs.gnu.org; Mon, 06 Apr 2015 19:53:22 -0400 Received: by wiaa2 with SMTP id a2so2494701wia.0 for <19839@debbugs.gnu.org>; Mon, 06 Apr 2015 16:53:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=QNyfy6nGzcCq4E/ShJajr1p7Ma15NMKCYYAjB+gYBtU=; b=KIqIZ+0thr0djaeBNN96RnpDzNvz9ndhUMCvw+mQqLQObE1W3rmno2QtJJ3z2LLC1Y 8aG5gAFMbfLAXGyQP+80dtkJOfALLhH00rE3gLw+FlDxlBSsmFfx+l4Iyo9Jc7gZmGUa 6eYbIwZi6fAWlrHj8qbyL4oHiPmo/P89xPJMdAsQQLsk9rjp3aaN1f/FJzenQE05/gTa PhG3SUJebB3Vt04jkObq5ZNG8QH8zApKvnTreLOVjmGZ2f/+I0/7XS1tQgPTHLs95zdK EFIoHAso2DSmrHT1Mv2+ucR60yW//EdtXCo+ImUO+6OJ/ULAw0CRP9v25YUVUVAe9HG9 YtWg== X-Received: by 10.180.8.34 with SMTP id o2mr1248260wia.18.1428364396555; Mon, 06 Apr 2015 16:53:16 -0700 (PDT) Received: from [192.168.1.3] ([82.102.93.54]) by mx.google.com with ESMTPSA id z13sm8415616wjr.44.2015.04.06.16.53.15 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Apr 2015 16:53:16 -0700 (PDT) Message-ID: <55231C6A.50101@yandex.ru> Date: Tue, 07 Apr 2015 02:53:14 +0300 From: Dmitry Gutov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:36.0) Gecko/20100101 Thunderbird/36.0 MIME-Version: 1.0 To: Kaushal , 19839@debbugs.gnu.org Subject: Re: bug#19839: 24.4; ffap does not detect file paths with curly braced shell variables References: In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 19839 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Hi! On 02/11/2015 09:23 PM, Kaushal wrote: > 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. What kind of error? I don't see any errors doing `M-x ffap' or `C-x C-f', it just doesn't find anything. > I added "\\{\\}" to the regexp for 'file'. What's the thinking here? We don't expand env variables in `find-file', right? So there will be no match anyway? From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 06 20:00:28 2015 Received: (at 19839) by debbugs.gnu.org; 7 Apr 2015 00:00:28 +0000 Received: from localhost ([127.0.0.1]:46689 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YfGwN-0005D7-JT for submit@debbugs.gnu.org; Mon, 06 Apr 2015 20:00:27 -0400 Received: from mail-wi0-f178.google.com ([209.85.212.178]:37920) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YfGwL-0005Cs-NZ for 19839@debbugs.gnu.org; Mon, 06 Apr 2015 20:00:26 -0400 Received: by wiun10 with SMTP id n10so2581825wiu.1 for <19839@debbugs.gnu.org>; Mon, 06 Apr 2015 17:00:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=2nRnn0vzST7+5yAzLlnyrxrlmDPkH3oSWQq1+Enptkw=; b=b23A1U1q//7UhsWBCTK84OtygSXtyvpZsGZxqgCQOENaIj7qHlPa0J18zdV5EFo/yB Jbf0IS59M3neFrXef42fVj78JmFNu4uIEl9pVSIgSQK4XQSjXJPbow/ZVDr9dAicXGuy 22Ghbw/HHUIWIuVicD08SB1Y5yWmQ4cYBJWG11IwxI3wnR7MOis2HHvnelWkHj/+vXeF S+txwbq5MotsTX14W9RFv5iE0Iw/jfBkqnkzwPwoymFGPc/+kmb64DCf0/jPbDI4sy4S WU2FnMrqAtvvRhRxZRo7WifE4PQsbYiXvwvnWhpxVyJbS6H76U2j5ReglGZp47gsADnS bR/A== X-Received: by 10.194.222.197 with SMTP id qo5mr34269531wjc.142.1428364820061; Mon, 06 Apr 2015 17:00:20 -0700 (PDT) Received: from [192.168.1.3] ([82.102.93.54]) by mx.google.com with ESMTPSA id i10sm8436656wja.40.2015.04.06.17.00.19 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Apr 2015 17:00:19 -0700 (PDT) Message-ID: <55231E12.5050303@yandex.ru> Date: Tue, 07 Apr 2015 03:00:18 +0300 From: Dmitry Gutov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:36.0) Gecko/20100101 Thunderbird/36.0 MIME-Version: 1.0 To: Kaushal , 19839@debbugs.gnu.org Subject: Re: bug#19839: 24.4; ffap does not detect file paths with curly braced shell variables References: <55231C6A.50101@yandex.ru> In-Reply-To: <55231C6A.50101@yandex.ru> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 19839 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 04/07/2015 02:53 AM, Dmitry Gutov wrote: > I don't see any errors doing `M-x ffap' or `C-x C-f', it just doesn't > find anything. ...in Emacs built from the master branch (forgot to mention that). From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 06 22:26:45 2015 Received: (at 19839) by debbugs.gnu.org; 7 Apr 2015 02:26:45 +0000 Received: from localhost ([127.0.0.1]:46725 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YfJDw-0000H6-LT for submit@debbugs.gnu.org; Mon, 06 Apr 2015 22:26:45 -0400 Received: from mail-ig0-f179.google.com ([209.85.213.179]:38715) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YfJDu-0000Gt-8e for 19839@debbugs.gnu.org; Mon, 06 Apr 2015 22:26:43 -0400 Received: by igbqf9 with SMTP id qf9so966257igb.1 for <19839@debbugs.gnu.org>; Mon, 06 Apr 2015 19:26:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :content-type; bh=fh0DrtSPt4CYRDTyfwTIK1P+LuUbYj26Wc69UEJNos8=; b=D8oNb4Psv7gqQsmPtwAfpwmCdQoWoPmnwvNk+oRbcW6TEhJVbE0qaBiD5EAp/JlqaC 9gA4zz5dg+VG7mo13lC/mJ09r8hT80W4Qpilkv1eTeBUxZO7faXsMAhfcjenD77U7G4c YaDYYrK+jbWZioBCJDNbeLHTUu0ta9sX2gl1A2NOKc5ksxoZswv+X3eNRvh5owhO9n11 YHbZUO57qdLa+dAZHgKHQDqwuRPMNpd4lfdkq3rRQ9x708hKUA1szheClw3EZHow400l WQvjwkzXnWz4KkTEiI34Xn7t6Weo3Me9SAZf3EmU9noEQ5a+v0zwfYOt0bUmxWG81jzT Xlug== X-Received: by 10.42.238.140 with SMTP id ks12mr15450035icb.12.1428373596706; Mon, 06 Apr 2015 19:26:36 -0700 (PDT) MIME-Version: 1.0 References: <55231C6A.50101@yandex.ru> <55231E12.5050303@yandex.ru> In-Reply-To: <55231E12.5050303@yandex.ru> From: Kaushal Date: Tue, 07 Apr 2015 02:26:35 +0000 Message-ID: Subject: Re: bug#19839: 24.4; ffap does not detect file paths with curly braced shell variables To: Dmitry Gutov , 19839@debbugs.gnu.org Content-Type: multipart/alternative; boundary=047d7bacc4bad6a48a051319245b X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 19839 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --047d7bacc4bad6a48a051319245b Content-Type: text/plain; charset=KOI8-R I was able to recreate this consistently in master branch. You need to enable the ido ffap feature for this to work. 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. * Copy the below content to *scratch* buffer on an emacs -Q session and follow the steps. * ;; STEP 1: Enable ido ffap (require 'ido) (setq ido-use-filename-at-point 'guess) (ido-mode 1) ;; STEP 2: Test that when you put the point over the below link and do `M-x ido-find-file', it does not try to open that particular file ;; ${HOME}/.emacs.d/init.el ;; Change the above link to ${HOME}/.emacs or the where you save your emacs config file for the sake of this example It did not work because the following call order returns nil by default (before the below fix in STEP 3) ido-find-file > ido-file-internal > ffap-guesser > ffap-file-at-point > ffap-string-at-point ;; STEP 3: ;; Patch `ffap-string-at-point-mode-alist' to support file paths with curly braces: (require 'ffap) ;; Delete from `ffap-string-at-point-mode-alist' all elements whose `car' is `file' (setq ffap-string-at-point-mode-alist (assq-delete-all 'file ffap-string-at-point-mode-alist)) ;; and then add a new list `(file ..)' that supports the curly braces. (add-to-list 'ffap-string-at-point-mode-alist '(file "--:\\\\$\\{\\}+<>@-Z_[:alpha:]~*?" "<@" "@>;.,!:")) ;; STEP 4: Repeat STEP 2. Now when you do `M-x ido-find-file` over that path, emacs will try to open the file in that path (it auto expands the environment variable $HOME) Let me know if you also can repeat these steps. On Mon, Apr 6, 2015 at 8:00 PM Dmitry Gutov wrote: > On 04/07/2015 02:53 AM, Dmitry Gutov wrote: > > > I don't see any errors doing `M-x ffap' or `C-x C-f', it just doesn't > > find anything. > > ...in Emacs built from the master branch (forgot to mention that). > --047d7bacc4bad6a48a051319245b Content-Type: text/html; charset=KOI8-R Content-Transfer-Encoding: quoted-printable
I was able to recreate this consistently in master branch.=

You need to enable the ido ffap feature for this to work.

<= /div>
Also I noticed that no error is thrown any more (it probably chan= ged 24.4 onwards) but ffap still does not work over paths with curly braces= . My fix fixes that.


* Copy the below con= tent to *scratch* buffer on an emacs -Q session and follow the steps. *

;; STEP 1: Enable ido ffap

<= div>(require 'ido)
(setq ido-use-filename-at-point 'guess= )
(ido-mode 1)

;; STEP 2: Test that when= you put the point over the below link and do `M-x ido-find-file', it d= oes not try to open that particular file
;; ${HOME}/.emacs.d/init.el
=
;; = Change the above link to ${HOME}/.emacs or the where you save your emacs co= nfig file for the sake of this example

It d= id not work because the following call order returns nil by default (before= the below fix in STEP 3)

ido-find-file > ido-f= ile-internal > ffap-guesser > ffap-file-at-point > ffap-string-at-= point

;; STEP 3:=9A
;; Patch `ffap-strin= g-at-point-mode-alist' to support file paths with curly braces:
(requ= ire 'ffap)
;; Delete from `ffap-string-at-point-mo= de-alist' all elements whose `car' is `file'
(setq ff= ap-string-at-point-mode-alist
=9A =9A =9A (assq-delete-all 'f= ile ffap-string-at-point-mode-alist))
;; and then add a new list = `(file ..)' that supports the curly braces.
(add-to-list '= ;ffap-string-at-point-mode-alist
=9A =9A =9A =9A =9A =9A =9A'= (file "--:\\\\$\\{\\}+<>@-Z_[:alpha:]~*?" "<@"= "@>;.,!:"))

;; STEP 4: Repeat = STEP 2. Now when you do `M-x ido-find-file` over that path, emacs will try = to open the file in that path (it auto expands the environment variable $HO= ME)


Let me know if you also can rep= eat these steps. =9A


On Mon, Apr 6, 2015 at 8:00 PM Dmitry Gutov <dgutov@yandex.ru> wrote:
On 04/07/2015 02:53 AM, Dmitry Gutov wrote:

=9A> I don't see any errors doing `M-x ffap' or `C-x C-f', i= t just doesn't
> find anything.

...in Emacs built from the master branch (forgot to mention that).
--047d7bacc4bad6a48a051319245b-- From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 07 20:22:18 2015 Received: (at 19839-done) by debbugs.gnu.org; 8 Apr 2015 00:22:18 +0000 Received: from localhost ([127.0.0.1]:48599 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yfdl4-000220-FK for submit@debbugs.gnu.org; Tue, 07 Apr 2015 20:22:18 -0400 Received: from mail-wi0-f170.google.com ([209.85.212.170]:34444) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yfdl3-00021b-Bz for 19839-done@debbugs.gnu.org; Tue, 07 Apr 2015 20:22:17 -0400 Received: by widjs5 with SMTP id js5so21705069wid.1 for <19839-done@debbugs.gnu.org>; Tue, 07 Apr 2015 17:22:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=MAbq0cg1aIPj8uFjObxd/I423JbvLKLhAk4N7IS1nW0=; b=kFxM6f83wgVRW7qAltCqEH03UgI7IQYdqgI9SuyoQthoqQ7Tzr5MK3aivp0t8anLDU er/3M+qldk97WrUHNMlVww6o4PYVQdDNXCuHl0zhNiS5PrCQ73uZvnEV+XLPnhQ7VwGh nAC+EzUmm7WyxFPEY+2UfQWoQc5TKbK7gyee6EKfz5M618jPkWoUlOpmRyW71eK62Lak rdiATzg9gYWgWKH+J3bXGlvvJLJP65F4QRyNONOoPRyvvIcaAwbkyX/OZapF5AbgZpXY X4bzt/ffiVGZmVRudbYIF/uemEfkYzlGHo1MJVq9Wp5FjZGewv4yKiB6jp45G8acW9h0 1rTg== X-Received: by 10.180.104.33 with SMTP id gb1mr9172973wib.33.1428452531832; Tue, 07 Apr 2015 17:22:11 -0700 (PDT) Received: from [192.168.1.3] ([82.102.93.54]) by mx.google.com with ESMTPSA id ey10sm13230204wib.2.2015.04.07.17.22.10 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Apr 2015 17:22:11 -0700 (PDT) Message-ID: <552474B1.2060403@yandex.ru> Date: Wed, 08 Apr 2015 03:22:09 +0300 From: Dmitry Gutov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:36.0) Gecko/20100101 Thunderbird/36.0 MIME-Version: 1.0 To: Kaushal , 19839-done@debbugs.gnu.org Subject: Re: bug#19839: 24.4; ffap does not detect file paths with curly braced shell variables References: <55231C6A.50101@yandex.ru> <55231E12.5050303@yandex.ru> In-Reply-To: Content-Type: text/plain; charset=koi8-r; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 19839-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) 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. From unknown Wed Jun 18 23:04:35 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 06 May 2015 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator