GNU bug report logs -
#8439
[PATCH] ffap.el -- detect paths with spaces
Previous Next
Reported by: Jari Aalto <jari.aalto <at> cante.net>
Date: Thu, 7 Apr 2011 15:25:02 UTC
Severity: minor
Tags: fixed, patch
Merged with 6695,
13087
Found in versions 23.2+1-7, 24.0.50, 24.3.50
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> Date: Fri, 19 Oct 2012 13:05:56 +0300
> From: jari <jari.aalto <at> cante.net>
> Cc: 8439 <at> debbugs.gnu.org, hochberg <at> dmhsoftware.com
>
> | What will this do to text such as the one below?
> |
> | C:\emacs\bin\prog1.exe on Windows or /usr/bin/prog1 on Unix.
>
> User can enable/disable if spaces are taken into account. If enabled,
> the result is:
>
> "C:\emacs\bin\prog1.exe on Windows or /usr/bin/prog1"
Why would it exclude the " on Unix." part?
> If you have strategiy to make it better, please suggest.
(I don't use ffap, so take the below with a grain of salt.)
Several things come to mind:
. You could modify the heuristics depending on the major mode. E.g.,
if it's Text or anything derived from text, file names with spaces
will generally be delimited by quotes.
. You could by default stop "skipping" when you see common words like
"on", "and", "or", "and/or", etc.
. You could by default stop when the slash flavor changes, like first
\, then / (see my example).
. At least in text modes, punctuation (with the notable exception of
a period) will not normally be part of a file name.
> | > 3. In Cygwin Emacs the paths are expected to be in "/cygdrive/<letter>/"
> | > format.
> |
> | What about Posix-standard /foo/bar/baz, which is the usual case on
> | Cygwin?
>
> Only "<drive letter>:" is converted into "/cygdrive/<drive letter>" under
> Cygwin.
Sorry, I don't follow. You said "In Cygwin Emacs the paths are
_expected_ to be", so I assumed you mean the file names on Cygwin are
_required_ to be in the /cygdrive/x/foo form. Maybe I misunderstood
what you meant.
This bug report was last modified 4 years and 285 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.