[OS X Emacs] Question about completion, minibuffer, and Aquamacs
Robert Goldman
rpgoldman at sift.info
Fri Nov 25 21:35:10 EST 2022
A quick follow-up because with the help of the sly developer, I have
figured out what's wrong. It's both (a) simpler and (b) more puzzling.
So it turns out that the completion mode is *not* broken! Instead, what
is broken is the *prompt* that goes in the minibuffer!
On a normal emacs, as I said before, the buffer gives this prompt:
```
"Use C-n and C-p to navigate completions...."
```
But on Aquamacs I see:
```
"Use <right> and <left> to navigate completions..."
```
What's simple, but puzzling, is that if I use the keystrokes that are
advertised normally (C-n and C-p), then the completion works properly.
I thought it was not working because if I use the keys that Aquamacs
tells me to, completion doesn't work. But that's because Aquamacs is
doing the right thing, but telling me the wrong thing: somehow it is
writing an incorrect string into the minibuffer.
AFAICT, the key bits of code in sly completion mode are the following.
First, this defvar:
```
(defvar sly--completion-explanation
(concat
"Use \\[sly-next-completion] and \\[sly-prev-completion] to navigate
completions."
" \\[sly-choose-completion] or [mouse-1] selects a completion."
"\n\nAnnotation flags: (b)oundp (f)boundp (g)eneric-function (c)lass
(m)acro (s)pecial-operator\n\n"
```
And then this function call goes wrong:
```
(substitute-command-keys
sly--completion-explanation)
```
So I was wondering: does Aquamacs do anything funky with
`substitute-command-keys`? I have no idea why I am getting `"<right>"`
and `"<left>"` instead of `"C-n"` and `"C-p"`.
Thanks,
R
On 25 Nov 2022, at 9:51, Robert Goldman wrote:
> I have been having an oddity with completion in the SLY (enhanced
> Common Lisp) mode. Full details are
> [here](https://github.com/joaotavora/sly/issues/547). 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://email.esm.psu.edu/pipermail/macosx-emacs/attachments/20221125/4088678f/attachment.htm>
More information about the MacOSX-Emacs
mailing list