From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#8439: [PATCH] ffap.el -- detect paths with spaces (v2) Date: Fri, 19 Oct 2012 13:22:10 +0200 Message-ID: <83391a1zbx.fsf@gnu.org> References: <87pqoyaxu0.fsf@blue.sea.net> <874nlq9ah3.fsf@picasso.cante.net> <83a9vi23mi.fsf@gnu.org> <20121019100556.GT19374@picasso.cante.net> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1350645823 23005 80.91.229.3 (19 Oct 2012 11:23:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 19 Oct 2012 11:23:43 +0000 (UTC) Cc: hochberg@dmhsoftware.com, 8439@debbugs.gnu.org To: jari Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Oct 19 13:23:50 2012 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 1TPAgA-0006Ag-87 for geb-bug-gnu-emacs@m.gmane.org; Fri, 19 Oct 2012 13:23:50 +0200 Original-Received: from localhost ([::1]:46259 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TPAg3-0008MO-32 for geb-bug-gnu-emacs@m.gmane.org; Fri, 19 Oct 2012 07:23:43 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:54948) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TPAg0-0008MI-0G for bug-gnu-emacs@gnu.org; Fri, 19 Oct 2012 07:23:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TPAft-00012w-0V for bug-gnu-emacs@gnu.org; Fri, 19 Oct 2012 07:23:39 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:40906) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TPAfs-00012q-TK for bug-gnu-emacs@gnu.org; Fri, 19 Oct 2012 07:23:32 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TPAhJ-0001Uf-Tk for bug-gnu-emacs@gnu.org; Fri, 19 Oct 2012 07:25:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 19 Oct 2012 11:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8439 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 8439-submit@debbugs.gnu.org id=B8439.13506458875723 (code B ref 8439); Fri, 19 Oct 2012 11:25:01 +0000 Original-Received: (at 8439) by debbugs.gnu.org; 19 Oct 2012 11:24:47 +0000 Original-Received: from localhost ([127.0.0.1]:51157 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TPAh5-0001UG-4h for submit@debbugs.gnu.org; Fri, 19 Oct 2012 07:24:47 -0400 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:32827) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TPAh2-0001U1-LB for 8439@debbugs.gnu.org; Fri, 19 Oct 2012 07:24:46 -0400 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0MC500E000WJUY00@a-mtaout22.012.net.il> for 8439@debbugs.gnu.org; Fri, 19 Oct 2012 13:22:22 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MC500E720X9R640@a-mtaout22.012.net.il>; Fri, 19 Oct 2012 13:22:22 +0200 (IST) In-reply-to: <20121019100556.GT19374@picasso.cante.net> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) 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:65731 Archived-At: > Date: Fri, 19 Oct 2012 13:05:56 +0300 > From: jari > Cc: 8439@debbugs.gnu.org, hochberg@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//" > | > format. > | > | What about Posix-standard /foo/bar/baz, which is the usual case on > | Cygwin? > > Only ":" is converted into "/cygdrive/" 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.