From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Yigal Hochberg Newsgroups: gmane.emacs.bugs Subject: bug#8439: [PATCH] ffap.el -- detect paths with spaces (v2) Date: Fri, 19 Oct 2012 07:15:00 -0400 Message-ID: References: <87pqoyaxu0.fsf@blue.sea.net> <874nlq9ah3.fsf@picasso.cante.net> <83a9vi23mi.fsf@gnu.org> <20121019100556.GT19374@picasso.cante.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=14dae93b651a5ff4ad04cc679d99 X-Trace: ger.gmane.org 1350661421 4015 80.91.229.3 (19 Oct 2012 15:43:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 19 Oct 2012 15:43:41 +0000 (UTC) Cc: Yigal Hochberg , 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 17:43:48 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 1TPEjj-00020d-M1 for geb-bug-gnu-emacs@m.gmane.org; Fri, 19 Oct 2012 17:43:47 +0200 Original-Received: from localhost ([::1]:35809 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TPEjc-0005JQ-En for geb-bug-gnu-emacs@m.gmane.org; Fri, 19 Oct 2012 11:43:40 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:51707) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TPEjY-0005IA-Ky for bug-gnu-emacs@gnu.org; Fri, 19 Oct 2012 11:43:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TPEjU-0004KH-Ct for bug-gnu-emacs@gnu.org; Fri, 19 Oct 2012 11:43:36 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:41625) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TPEjU-0004KD-9e for bug-gnu-emacs@gnu.org; Fri, 19 Oct 2012 11:43:32 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TPEkw-0000kU-6Y for bug-gnu-emacs@gnu.org; Fri, 19 Oct 2012 11:45:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Yigal Hochberg Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 19 Oct 2012 15:45:02 +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.13506614642798 (code B ref 8439); Fri, 19 Oct 2012 15:45:02 +0000 Original-Received: (at 8439) by debbugs.gnu.org; 19 Oct 2012 15:44:24 +0000 Original-Received: from localhost ([127.0.0.1]:51864 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TPEkJ-0000j4-JU for submit@debbugs.gnu.org; Fri, 19 Oct 2012 11:44:24 -0400 Original-Received: from mail-ob0-f172.google.com ([209.85.214.172]:59504) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TPAZB-0001IB-AR for 8439@debbugs.gnu.org; Fri, 19 Oct 2012 07:16:38 -0400 Original-Received: by mail-ob0-f172.google.com with SMTP id v19so282543obq.3 for <8439@debbugs.gnu.org>; Fri, 19 Oct 2012 04:15:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-originating-ip:in-reply-to:references:date :message-id:subject:from:to:cc:content-type:x-gm-message-state; bh=m3jp4U44it1GKlkIrGccNP/+V27MReO6H04+JspsHrQ=; b=aSNUYl3PUoYkDJvAxy1BV+p2cjihHD7QA9UOQs9c5aX7wwVtQ/9ZqOyyos/DO4bp4l lB0xbpEx07R5gjK98LUO+DflEA91RXlNu1W9XjAHuypHWubQs9nGLLRRNYNT55eG3OOv xYBOEdIQ+2EXV+aLS4fyNwoLI99kz20X3H2u8QpKcZBmq7Dv6vkB+lQAcI+Q2I8S9f68 igysUC8j+tW5OMlYWaDT22dQU10elh+sVE0DwTHNGb8JQv4XUwVhPKkBd5+RZRstteOw oxvLQHVRn6LymTKZZXPY/Ax3NGkf7A9wbLageosOiKOVkGW8ZcWtY8oQ47q+U/HWB57t XwGQ== Original-Received: by 10.182.69.73 with SMTP id c9mr84868obu.33.1350645300851; Fri, 19 Oct 2012 04:15:00 -0700 (PDT) Original-Received: by 10.76.12.70 with HTTP; Fri, 19 Oct 2012 04:15:00 -0700 (PDT) X-Originating-IP: [98.110.150.168] In-Reply-To: <20121019100556.GT19374@picasso.cante.net> X-Gm-Message-State: ALoCoQnHEIZNZIWbauxLGb4SN+vwpT0c0rI6sYikJ3HzNnCq5WKVPxW7P1gNyGt9uKm1uQWY3vqh X-Mailman-Approved-At: Fri, 19 Oct 2012 11:44:20 -0400 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:65743 Archived-At: --14dae93b651a5ff4ad04cc679d99 Content-Type: text/plain; charset=ISO-8859-1 Hi Jari, Eli: A thank you note for Jari. I asked Jari if he could improve ffap to match these Windows paths like this: c:/Program Files/Freescale/CW for MPC55xx and MPC56xx 2.10/PowerPC_EABI_Tools/Command_Line_Tools/CLT_EABI_PPC_Tools_Notes.txt c:\Program Files\Freescale\CW for MPC55xx and MPC56xx 2.10\PowerPC_EABI_Tools\Command_Line_Tools\CLT_Usage_Notes.txt c:/Program Files/Open Text Evaluation Media/Open Text Exceed 14 x86/Program Files/Hummingbird/Connectivity/14.00/Default User/PerUser Settings.ini c:\Program Files\Open Text Evaluation Media\Open Text Exceed 14 x86\Program Files\Hummingbird\Connectivity\14.00\Default User\PerUser Settings.ini c:/Program Files/Open Text Evaluation Media/Open Text Exceed 14 x86/Program Files/Hummingbird/ c:\Program Files\Open Text Evaluation Media\Open Text Exceed 14 x86\Program Files\Hummingbird\ >From a user view this is a very helpful and useful solution to get to these files/dirs in one keystroke. Thanks to Jari for the hard work. I will report if I find issues. Regards, Yigal On Fri, Oct 19, 2012 at 6:05 AM, jari wrote: > On 2012-10-19 11:49, Eli Zaretskii wrote: > | > > | > 1. New variable ffap-paths-with-spaces controls if the behavior is > in use. > | > By default it is set to "t" in Windows/Cygwin where spaces in > paths > | > are encountered. > | > | GNU Coding Standards frown upon using "path" for anything except > | PATH-style lists of directories. Use "file name" or "leading > | directories" instead. > | > | > 2. The "path skipping" is based on finding longest distance: > | > > | > - from first "drive letter", "/" or "\" > | > - until last "/", "\" followed by last > non-matching-char-not-usually-found-in-file-names > | > | 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" > > If disabled, depending on cursor position: > > "C:\emacs\bin\prog1.exe" > "/usr/bin/prog1" > > If you have strategiy to make it better, please suggest. > > | > 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. > > Jari > -- Yigal --14dae93b651a5ff4ad04cc679d99 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi Jari, Eli:

A thank you note for Jari.

I asked Jari if he c= ould improve ffap to match these Windows paths like this:

c:/Program= Files/Freescale/CW for MPC55xx and MPC56xx 2.10/PowerPC_EABI_Tools/Command= _Line_Tools/CLT_EABI_PPC_Tools_Notes.txt
c:\Program Files\Freescale\CW for MPC55xx and MPC56xx 2.10\PowerPC_EABI_Too= ls\Command_Line_Tools\CLT_Usage_Notes.txt
c:/Program Files/Open Text Eva= luation Media/Open Text Exceed 14 x86/Program Files/Hummingbird/Connectivit= y/14.00/Default User/PerUser Settings.ini
c:\Program Files\Open Text Evaluation Media\Open Text Exceed 14 x86\Program= Files\Hummingbird\Connectivity\14.00\Default User\PerUser Settings.ini
= c:/Program Files/Open Text Evaluation Media/Open Text Exceed 14 x86/Program= Files/Hummingbird/
c:\Program Files\Open Text Evaluation Media\Open Text Exceed 14 x86\Program= Files\Hummingbird\

From a user view this is a very helpful and usef= ul solution to get to these files/dirs in one keystroke.

Thanks to J= ari for the hard work.

I will report if I find issues.

Regards,

Yigal



On Fri, Oct 19, 2012 at 6:05 AM, jari <= span dir=3D"ltr"><jari.aalto@cante.net> wrote:
On 2012-10-19 11:49, Eli Z= aretskii wrote:
| >
| > =A0 1. New variable ffap-paths-with-spaces controls if the behavior = is in use.
| > =A0 =A0 =A0By default it is set to "t" in Windows/Cygwin w= here spaces in paths
| > =A0 =A0 =A0are encountered.
|
| GNU Coding Standards frown upon using "path" for anything excep= t
| PATH-style lists of directories. =A0Use "file name" or "le= ading
| directories" instead.
|
| > =A0 2. The "path skipping" is based on finding longest dis= tance:
| >
| > =A0 =A0 =A0- from first "drive letter", "/" or &= quot;\"
| > =A0 =A0 =A0- until last "/", "\" followed by las= t non-matching-char-not-usually-found-in-file-names
|
| What will this do to text such as the one below?
|
| =A0C:\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:

=A0 "C:\emacs\bin\prog1.exe on Windows or /usr/bin/prog1"

If disabled, depending on cursor position:

=A0 "C:\emacs\bin\prog1.exe"
=A0 "/usr/bin/prog1"

If you have strategiy to make it better, please suggest.

| > =A0 3. In Cygwin Emacs the paths are expected to be in "/cygdri= ve/<letter>/"
| > =A0 =A0 =A0format.
|
| What about Posix-standard /foo/bar/baz, which is the usual case on
| Cygwin?

Only "<drive letter>:" is converted into "/cygdr= ive/<drive letter>" under
Cygwin.

Jari



--
Yigal
=
--14dae93b651a5ff4ad04cc679d99--