Selectrum: Quick keys: Pressing M-m/M-i twice should toggle without message

Created on 23 Mar 2021  路  13Comments  路  Source: raxod502/selectrum

When pressing the key twice the selection menu is shown first and then hidden again, but with the message "No matching key". Would it make sense to filter out the message for the currently used toggle key, M-m M-m and M-i M-i? Maybe you like it better as it is?

All 13 comments

The feedback message is skipped for those keys now, see 58e1ce4. Any you get feedback which char you pressed in case you its not a valid one.

Great!

I just tested it and the toggler is very nice. However I think the feedback message is misleading, why do you show the command if you press up/down for example?! I would prefer it if you simply show the keybinding. "No matching key:

:laughing: that was by accident! I can't show the keys reliably though, or do you know a way?

I just remembered I can use edmacro-format-keys for this.

key-description?

Ah nice, that works, too!

This works nicely for me:

~ elisp
(message "KEY: %S" (key-description (vector (read-char))))
~

key-description is the canonical way to transform [key vectors] and "key strings" to their readable representation.

Fixed by 2316259

Unfortunately it seems there is one more minor issue. When pressing M-m <down>, I get the following error message in the *Messages* buffer, which looks very user unfriendly. Would be good to fix this!

~~~

[0 300C301302303304305!306"307$216211310 240)207 [nil make-byte-code 0 300242302=2040303300242!?2050304305 )207 vconcat vector [selectrum--quick-fun 7 characterp nil selectrum--update] 2 read-char] 7]: Non-character input-event

~~~

For some reason I don't get this, I only get setq: Non-character input-event in the *Messages* buffer.

Ah, I see the message you get is when it is byte compiled, I will look into it tomorrow.

Fixed by 83b296c

Was this page helpful?
0 / 5 - 0 ratings

Related issues

WorldsEndless picture WorldsEndless  路  9Comments

revrari picture revrari  路  11Comments

thy6 picture thy6  路  8Comments

Luis-Henriquez-Perez picture Luis-Henriquez-Perez  路  11Comments

adrianparvino picture adrianparvino  路  4Comments