2

I used to work with find-file-at-point to open files, URLs etc. My .emacs contains

(require 'ffap)
(ffap-bindings)

I discovered ido-mode and I tried to use it with

(ido-mode 1); enable ido-mode
(setq ido-enable-flex-matching t); flexibly match names
(setq ido-everywhere t); use ido-mode everywhere, in buffers and for finding files
(setq ido-use-filename-at-point 'guess); for find-file-at-point

It turns out that C-x C-f for finding a file does not activate ido-mode (I do not see the typical suggestions of file names as I do for buffers when doing C-x b). When I comment out the two lines related to ffap, it works as expected, however, I would like to use ffap as well.

Is this possible?

Assume the point is on an URL. It would be great if C-x C-f C-f (the fallback to the "old" completion style) would activate ffap and thus offer to open the URL.

Marius Hofert
  • 6,546
  • 10
  • 48
  • 102

1 Answers1

2

Yes -- you need to rebind the functions that you use.

You look inside ffap at the functions that you need , and rebind them like that:

(global-set-key [end] 'function)

(you change the end key with your combination).

There are many ways to rebind a key, but first of all start looking at the functions that are useful for you inside ffap.

alinsoar
  • 15,386
  • 4
  • 57
  • 74
  • 2
    Thanks. I realized I only needed `find-file-at-point` which used to be `C-x C-f`. I used `(setq ffap-require-prefix t)` to get it via `C-u C-x C-f` if required. – Marius Hofert Jul 15 '12 at 20:35