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

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

bug#24057: 25.1.50; ffap interprets comments beginning with "//" as file


From: Eli Zaretskii
Subject: bug#24057: 25.1.50; ffap interprets comments beginning with "//" as file path
Date: Sat, 23 Jul 2016 16:05:41 +0300

> From: Kaushal Modi <kaushal.modi@gmail.com>
> Date: Sat, 23 Jul 2016 11:56:40 +0000
> Cc: 24057@debbugs.gnu.org, Noam Postavsky <npostavs@users.sourceforge.net>
> 
>  I see no reason to assume that file names cannot appear in comments.
> 
> I have already tested with these use cases and now it seems to 
> do-the-right-thing:
> 
> In the below table, 'x' represents the point (the cursor would be on the 
> character to its right).
> The second column shows the value that ffap-string-at-point is set to on 
> doing C-x C-f (with the ido setup
> explained in the first email).
> 
> |-----------------------------------+---------------------------------|
> | Example string in `c-mode' buffer | Returned `ffap-string-at-point' |
> |-----------------------------------+---------------------------------|
> | x//tmp | "tmp" |
> | //xtmp | "tmp" |
> | x////tmp | "tmp" |
> | ////xtmp | "tmp" |
> | x// //tmp | "" |
> | // //xtmp | "//tmp" |
> |-----------------------------------+---------------------------------|
> 
> To try this out, paste the below in a new buffer and M-x c-mode.
> 
> //tmp
> ////tmp
> // //tmp
> 
> Now do C-x C-f with cursor at those 6 different points and you will see that 
> an attempt to read /tmp happens
> only in the case of "// //tmp" when the point is anywhere in the "//tmp" 
> portion following "// ".

Did you try this on some system where "//tmp" is a valid file name,
which is different from "/tmp"?





reply via email to

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