From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Thibault Kruse" Newsgroups: gmane.emacs.bugs Subject: bug#7229: Aw: Re: bug#7229: Re: Re: Re: bug#7229: 23.1; ido guess and ffap bug Date: Sat, 13 Jul 2013 20:38:25 +0200 (CEST) Message-ID: References: <20101016200828.264940@gmx.net> , NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 X-Trace: ger.gmane.org 1373740753 29970 80.91.229.3 (13 Jul 2013 18:39:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 13 Jul 2013 18:39:13 +0000 (UTC) To: 7229@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jul 13 20:39:14 2013 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 1Uy4iv-0003Nr-Jc for geb-bug-gnu-emacs@m.gmane.org; Sat, 13 Jul 2013 20:39:13 +0200 Original-Received: from localhost ([::1]:41830 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uy4iv-0005RH-45 for geb-bug-gnu-emacs@m.gmane.org; Sat, 13 Jul 2013 14:39:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43307) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uy4ip-0005Qw-8C for bug-gnu-emacs@gnu.org; Sat, 13 Jul 2013 14:39:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uy4im-0007GF-Op for bug-gnu-emacs@gnu.org; Sat, 13 Jul 2013 14:39:07 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:58783) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uy4im-0007GB-Lh for bug-gnu-emacs@gnu.org; Sat, 13 Jul 2013 14:39:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Uy4im-0006NR-5b for bug-gnu-emacs@gnu.org; Sat, 13 Jul 2013 14:39:04 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Thibault Kruse" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 13 Jul 2013 18:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7229 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 7229-submit@debbugs.gnu.org id=B7229.137374071423670 (code B ref 7229); Sat, 13 Jul 2013 18:39:02 +0000 Original-Received: (at 7229) by debbugs.gnu.org; 13 Jul 2013 18:38:34 +0000 Original-Received: from localhost ([127.0.0.1]:53099 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Uy4iH-00069b-SX for submit@debbugs.gnu.org; Sat, 13 Jul 2013 14:38:34 -0400 Original-Received: from mout.gmx.net ([212.227.15.18]:63841) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Uy4iF-00069G-NJ for 7229@debbugs.gnu.org; Sat, 13 Jul 2013 14:38:32 -0400 Original-Received: from 3capp-gmx-bs25.server.lan ([172.19.170.77]) by mrigmx.server.lan (mrigmx001) with ESMTP (Nemesis) id 0MCeui-1UprEZ1uU6-009Svf for <7229@debbugs.gnu.org>; Sat, 13 Jul 2013 20:38:25 +0200 Original-Received: from [92.229.152.222] by 3capp-gmx-bs25.server.lan with HTTP; Sat Jul 13 20:38:25 CEST 2013 Importance: normal Sensitivity: Normal In-Reply-To: X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K0:dm919CUprGBgyCa5BIydIWi+mdxf0K6jL4WWBSwc96a WBwkyK1LeUr0nr+qjqE58RX68mIIK4ITN7lTZLzMzorzjhDUvQ t8aJmzhPOdaOc/lyUgw8mgmTpwHgz+EvSbGMv73iBm60INS0LE yXN2Y8eNfj5gb+Bu9aC0WLDilzNJ0qHSv8Xj9yjXEmWqLGCGc1 7+OKqJq4fR/kz5HvPsYfxZFz2eTVPS+YiBft73srvnXyOcoR9L KPz/b2oNmwrT2RhGWB5Y09RqKJTOorkrUUcmfKDITxy3PsTzFZ t6j2D4= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x 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:76332 Archived-At:
I agree to this being an issue in ffap rather than ido. Trying to recognize filenames for the user in arbitrary files is not a clean problem, so I don't ever expect a clean solution to this problem.
 
A somewhat cleaner solution could maybe be to define for each major mode it's own prefix filter for filename-at-point, taking into account the DSL used. Like I restricted my workaround to XML major modes. That way a rule concerning one kind of DSL would not affect other DSLs. And within a DSL, special cases can very well be defined.
 
However, ffap generally discarding '//' or '/**' as filenames does not strike me as something any user would ever be annoyed about. If your filesystem looks like that, you're doomed in any case. So I am not too passionate about cleanlyness for this case.

As an example for DSL specific behavior, another extension I did for myself for C/C++major modes is that if point is at the *beginning* of any line like:
#include <foo.h>
ffap will suggest "foo.h". Things like that have no place in ffap for arbitrary files, but for C/C++ it is okay I believe. Similar rules may work for similar import statements in other languages.
 
 
 
Gesendet: Samstag, 13. Juli 2013 um 19:31 Uhr
Von: "Leo Liu" <sdl.web@gmail.com>
An: "Thibault Kruse" <thibault.kruse@gmx.de>
Cc: 7229@debbugs.gnu.org
Betreff: Re: bug#7229: Aw: Re: Re: Re: bug#7229: 23.1; ido guess and ffap bug
On 2013-07-13 16:01 +0800, Thibault Kruse wrote:
> Again, it is a design decision, not a bug. I believe emacs users will
> be happier if C-x C-f with ido-ffap uses heuristics to avoid common
> false positives, rather than having to learn another shortcut.

I consider this not a bug/flaw in ido but ffap. Special-case particular
file names doesn't look like a good solution.

Leo