[OS X Emacs] How to rebind the "recentf" key (C-x C-r)?
Alan Schmitt
alan.schmitt at polytechnique.org
Sun Nov 27 10:54:47 EST 2011
On 26 nov. 2011, at 14:28, Nathaniel Cunningham wrote:
> Hello Alan,
>
> On Thu, Nov 24, 2011 at 10:17 AM, Alan Schmitt <alan.schmitt at polytechnique.org> wrote:
>
> I tried putting the following in both my .emacs or my Preferences.el, but when I start Aquamacs, C-x C-r is always bound to the default value (I think it's recentf-open-files).
>
> (defun recentf-ido-find-file ()
> "Find a recent file using Ido."
> (interactive)
> (let ((file (ido-completing-read "Choose recent file: " recentf-list nil t)))
> (when file
> (find-file file))))
>
> (global-set-key "\C-x\C-r" 'recentf-ido-find-file)
>
> If I evaluate the last line, then everything goes well.
>
> Where should I put the rebinding so that it overrides the default one?
>
> Putting your new function & binding command at the end of Preferences.el works fine for me. Aquamacs 2.4.
I'm also using Aquamacs 2.4. I tried again, and when I do C-x C-r I get the menu and not my function.
Is there a way to debug the startup sequence of Aquamacs so that I find how the binding gets overridden?
Thanks,
Alan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://email.esm.psu.edu/pipermail/macosx-emacs/attachments/20111127/4383b2ad/attachment.html>
More information about the MacOSX-Emacs
mailing list