I tried it with emacs -Q
on version 26.3 and it works for me: it moves the cursor for a second to the matching opening brace if that is visible and it prints the matching line in the echo area if it is not.
Check the value of post-self-insert-hook
with C-h v post-self-insert-hook RET
- my setting is:
(electric-indent-post-self-insert-function blink-paren-post-self-insert-function)
If yours is missing the blink-paren-...
function, you can add it with
(add-hook 'post-self-insert-hook #'blink-paren-post-self-insert-function)
somewhere in your init file. But you should investigate why you are not getting that: AFAICT, it should be the out-of-the-box default.
The OP indicates that this is already the case in their setup, so we'll have to dig one level deeper. The variable blink-paren-function
is used by blink-paren-post-self-insert-function
- doing C-h v blink-paren-function RET
shows:
Its value is ‘blink-matching-open’
in my case. Now if I place my cursor after the closing brace and do M-x blink-matching-open RET
I see the matching line in the echo area.
So check that the variable is set to the function - if not, set it:
(setq blink-paren-function #'blink-matching-open)
and also execute blink-matching-open
with the invocation above and check that it produces the appropriate indications
BTW, all of the above was done in a GUI instance of emacs: I did not test in terminal emacs.