[OS X Emacs] If you are using ivy/counsel/swiper with Aquamacs

Win Treese treese at acm.org
Tue Nov 26 00:34:06 EST 2019

If you use ivy, counsel, and swiper with Aquamacs, you might run into the error "void-function file-local-name”. Those packages are now using the Lisp function file-local-name, which is new in Emacs 26. There’s a GitHub issue on it at https://github.com/abo-abo/swiper/issues/2329, which gives the following code as a simple workaround:

unless (fboundp 'file-local-name)
 (defun file-local-name (file)
   "backport from emacs v26, Return the local name component of FILE.
This function removes from FILE the specification of the remote host
and the method of accessing the host, leaving only the part that
identifies FILE locally on the remote system.
The returned file name can be used directly as argument of
`process-file', `start-file-process', or `shell-command'."
   (or (file-remote-p file 'localname) file)))

There’s no need to worry about this if you don’t run into the problem.

At some point we will have Aquamacs migrated to Emacs 26; it’s a big merge.

- Win

More information about the MacOSX-Emacs mailing list