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.
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.