[OS X Emacs] Question about completion, minibuffer, and Aquamacs

Win Treese treese at acm.org
Fri Nov 25 16:22:08 EST 2022


Hi, Robert. The main problem here is that:

1. Aquamacs redefines C-n and C-p to be aquamacs-next-line and aquamacs-previous-line, respectively. I think this was originally done to make things more intuitive with certain configurations different than default Emacs, but I can’t reconstruct the details at the moment.

2. In defining the keymap for the Sly completions buffer, Sly remaps certain keys to next/prev. This makes sense, but doesn’t have the desired effect in Aquamacs.

To clean up the bindings and give the right hint about the keys to use, I think you can use the following code after Sly is loaded:

(define-key sly--completion-display-mode-map [right] nil)
(define-key sly--completion-display-mode-map [left] nil)
(define-key sly--completion-display-mode-map [up] nil)
(define-key sly--completion-display-mode-map [down] nil)
(define-key sly--completion-display-mode-map [remap previous-line] nil)
(define-key sly--completion-display-mode-map [remap next-line] nil)
(define-key sly--completion-display-mode-map [backtab] nil)
(define-key sly--completion-display-mode-map [remap aquamacs-next-line] #'sly-next-completion)
(define-key sly--completion-display-mode-map [remap aquamacs-previous-line] #'sly-prev-completion)

There may be some other rough edges.

I’m glad to know about Sly; I don’t recall having heard about it before. Now I just need more time for Common Lisp projects.

Win Treese
treese at acm.org
Aquamacs maintainer

> On Nov 25, 2022, at 10:51 AM, Robert Goldman <rpgoldman at sift.info> wrote:
> 
> I have been having an oddity with completion in the SLY (enhanced Common Lisp) mode. Full details are here. The issue persists when I start Aquamacs without customizations, so I suspect it is an interaction between SLY and some Aquamacs customization. But I have not been able to find any customization of completion behavior in /Applications/Aquamacs.app/Contents/Resources/lisp/
> 
> Here's what happens:
> 
> 	• Non-Aquamacs emacs: Press completion key. Minibuffer pops up with message "Use C-n and C-p to navigate completions...." I believe that in this case also the cursor is left in the minibuffer (having a little trouble getting clarity from other users).
> 
> 	• Aquamacs emacs: Minibuffer pops up with message "Use <right> and <left> to navigate completions..." Cursor is left in the source buffer, not the completion minibuffer. This has the bad effect of causing me to press <right> and then find that the cursor moves in the source buffer and the completion minibuffer is dismissed, which is quite annoying. (The fix is to switch buffers to navigate the set of completions, but this is cumbersome and annoying).
> 
> Any idea where this customization could be happening?
> 
> Thanks,
> R
> 
> 
> _____________________________________________________________
> MacOSX-Emacs mailing list
> MacOSX-Emacs at email.esm.psu.edu
> https://email.esm.psu.edu/mailman/listinfo/macosx-emacs
> List Archives: http://dir.gmane.org/gmane.emacs.macintosh.osx



More information about the MacOSX-Emacs mailing list