Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatible with eldoc in mode-line #36

Closed
DamienCassou opened this issue Apr 18, 2022 · 6 comments · Fixed by #38
Closed

Incompatible with eldoc in mode-line #36

DamienCassou opened this issue Apr 18, 2022 · 6 comments · Fixed by #38

Comments

@DamienCassou
Copy link
Contributor

When nano-modeline is at the top, eldoc stops showing eldoc messages.

How to reproduce:

  1. Start Emacs with emacs -Q
  2. type M-: (string-trim
  3. the mode-line contains the signature of the string-trim function
  4. load nano-modeline and enable it
  5. do step 2 again

expected: the signature of the string-trim function appears somewhere
actual: no signature appears

This is because eldoc-minibuffer-message changes mode-line-format but nano-modeline (when nano-modeline-position is top) only displays the header-line.

Possible solutions:

  1. temporarily displaying the mode-line in this scenario and letting eldoc shows its stuff in it
  2. copying the value that eldoc writes in the mode-line to the header-line

I can investigate a PR if you tell me what solution you have in mind.

@rougier
Copy link
Owner

rougier commented Apr 21, 2022

I confirm the behavior but I think it is an abuse of the modeline. Why not emitting a message that would appear next to the command line?

@DamienCassou
Copy link
Contributor Author

I think it is an abuse of the modeline

could be but this is how Emacs maintainers have implemented it. Fortunately, there is a eldoc-message-function variable that nano-modeline could override to show the information in a different place (but where?).

Why not emitting a message that would appear next to the command line?

What do you mean by "the command line"?

@rougier
Copy link
Owner

rougier commented Apr 22, 2022

I meant the minibuffer. When you display a message when the minbuffer is active, it is displayed next to the text.

@DamienCassou
Copy link
Contributor Author

When you display a message when the minbuffer is active, it is displayed next to the text.

I forgot about that. Then the solution is simple:

(setq eldoc-message-function #'message)

It seems to work well.

@rougier
Copy link
Owner

rougier commented Apr 24, 2022

Can you make a PR to set it or do we let the user do it?

@DamienCassou
Copy link
Contributor Author

What do you think about PR #38?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants