[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: FFAP
From: |
Juri Linkov |
Subject: |
Re: FFAP |
Date: |
Fri, 06 Nov 2009 23:19:45 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu) |
> By "integration" I mostly mean the functionality, not necessarily
> the code. But if it means preloading ffap.el, that's not necessarily
> a bad thing, although I think that by integrating it, we can make it
> a lot simpler, so I expect that a complete rewrite will be preferable
> (especially since we probably wouldn't provide every single last detail
> of ffap's functionality).
I forgot that we already have a clean and small counterpart of ffap
that can be preloaded instead of ffap.el. It is thingatpt.el.
With (thing-at-point 'filename) it returns the filename at point,
and with (thing-at-point 'url) it returns the URL at point.
>> The idea is to put a file/URL from the text around the point into
>> the minibuffer's default values list. So typing `C-x C-f M-n'
>> on a file name will bring in it from the current buffer into the
>> minibuffer.
>
> I thought about it but M-n is already used in some file prompts for
> other purposes,
Let's see what currently M-n does in file prompts (0. means the default
input, and 1. - the minibuffer's content after one M-n):
`C-x C-f' in a non-file buffer:
0. current directory name
`C-x C-f' in a file buffer:
0. current directory name
1. file name of the current buffer
`C-x C-v' in a file buffer:
0. file name of the current buffer
1. file name of the current buffer
(the last case has duplicates)
> so the user would then have to hit M-n more than once to get the
> file-at-point, which makes it cumbersome.
After adding a file name at point:
`C-x C-f' in a non-file buffer:
0. current directory name
1. file name at point
`C-x C-f' in a file buffer:
0. current directory name
1. file name of the current buffer
2. file name at point
`C-x C-v' in a file buffer:
0. file name of the current buffer
1. file name at point
So M-n more than once is only in a file buffer,
where we could add a file name at point before
the file name of the current buffer:
`C-x C-f' in a file buffer:
0. current directory name
1. file name at point
2. file name of the current buffer
> I think a dedicated keybinding would be better.
Of course, a dedicated keybinding would be good as well.
IIRC, the last time this has been discussed where Drew
proposed `M-.' to yank text at point into the minibuffer in:
http://thread.gmane.org/gmane.emacs.devel/50372
--
Juri Linkov
http://www.jurta.org/emacs/
- find-file-literally-at-point, Edward O'Connor, 2009/11/05
- Re: find-file-literally-at-point, Juri Linkov, 2009/11/05
- Re: FFAP, Stefan Monnier, 2009/11/06
- Re: FFAP,
Juri Linkov <=
- Re: FFAP, Stefan Monnier, 2009/11/06
- Re: FFAP, Juri Linkov, 2009/11/08
- Re: FFAP, Stefan Monnier, 2009/11/09
- read-file-name (was: FFAP), Juri Linkov, 2009/11/09
- Re: read-file-name, Stefan Monnier, 2009/11/09
- Re: read-file-name, Juri Linkov, 2009/11/09
- Re: read-file-name, Stefan Monnier, 2009/11/10
- dired-read-dir-and-switches (was: FFAP), Juri Linkov, 2009/11/09
- find-file-read-args (was: FFAP), Juri Linkov, 2009/11/09
- Re: find-file-read-args, Stefan Monnier, 2009/11/09