Subject: bug#7229: Aw: Re: bug#7229: Re: Re: Re: bug#7229: 23.1; ido guess and ffap bug

From: "Thibault Kruse" <[email-masked]>
Date: Sat, 13 Jul 2013 20:38:25 +0200 (CEST)

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" <[email-masked]>
An: "Thibault Kruse" <[email-masked]>
Cc: [email-masked]
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