From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#8439: [PATCH] ffap.el -- detect paths with spaces (v2) Date: Fri, 19 Oct 2012 21:45:25 -0400 Message-ID: References: <87pqoyaxu0.fsf@blue.sea.net> <874nlq9ah3.fsf@picasso.cante.net> <83a9vi23mi.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1350697604 3832 80.91.229.3 (20 Oct 2012 01:46:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 20 Oct 2012 01:46:44 +0000 (UTC) Cc: hochberg@dmhsoftware.com, 8439@debbugs.gnu.org, Jari Aalto To: "Andrew W. Nosenko" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Oct 20 03:46: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 1TPO9D-0001T7-I2 for geb-bug-gnu-emacs@m.gmane.org; Sat, 20 Oct 2012 03:46:43 +0200 Original-Received: from localhost ([::1]:51327 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TPO96-0001nU-D3 for geb-bug-gnu-emacs@m.gmane.org; Fri, 19 Oct 2012 21:46:36 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:42016) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TPO93-0001mf-On for bug-gnu-emacs@gnu.org; Fri, 19 Oct 2012 21:46:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TPO90-0006Io-B2 for bug-gnu-emacs@gnu.org; Fri, 19 Oct 2012 21:46:33 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:42192) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TPO90-0006Ib-7z for bug-gnu-emacs@gnu.org; Fri, 19 Oct 2012 21:46:30 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TPOAU-0006tg-Dc for bug-gnu-emacs@gnu.org; Fri, 19 Oct 2012 21:48:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 20 Oct 2012 01:48: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.135069762526437 (code B ref 8439); Sat, 20 Oct 2012 01:48:02 +0000 Original-Received: (at 8439) by debbugs.gnu.org; 20 Oct 2012 01:47:05 +0000 Original-Received: from localhost ([127.0.0.1]:52443 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TPO9Y-0006sM-W4 for submit@debbugs.gnu.org; Fri, 19 Oct 2012 21:47:05 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:39630) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TPO9Y-0006rt-57 for 8439@debbugs.gnu.org; Fri, 19 Oct 2012 21:47:04 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAG6Zu09MCoeh/2dsb2JhbABEtBGBCIIVAQEEAVYcBwULCzQSFBgNEAETiBwFugmQRAOjM4FYgwU X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="202350768" Original-Received: from 76-10-135-161.dsl.teksavvy.com (HELO ceviche.home) ([76.10.135.161]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 19 Oct 2012 21:45:25 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 9079D660E0; Fri, 19 Oct 2012 21:45:25 -0400 (EDT) In-Reply-To: (Andrew W. Nosenko's message of "Sat, 20 Oct 2012 00:47:55 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) 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:65771 Archived-At: >> C:\emacs\bin\prog1.exe on Windows or /usr/bin/prog1 on Unix. > Eli, excuse me very much, but you cheating. I don't see the relationship with cheating. Yes, his example is probably not too important, but I think if we want to add support for spaces we first need to decide which cases we want to handle, since the general case is simply impossible. Here are some disorganized thoughts: - many of the examples shown in this thread have to do with "one file name per line". But if noone tells us beforehand that the file name goes to EOL, handling these well will unavoidably end up with too many false positives. - we should think of good hints for beginning/end of file names. E.g. I think if we find something that matches "['\">,.][ \n]", we should probably assume it's the end of the file name (EOFN). Or " /" is probably a BOFN, whereas "/ " is an EOFN. - maybe if the separators are forward slashes, we should assume that there's no space in the file name. > But, if there no way to make false positives amount small enough, I > would to propose an idea for extension: find-file-at-region(). You > just select a region of text, and Emacs tries to interprets it as > default value for find-file(). M-w C-x C-f C-y already handles this case. Stefan