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

emacs --daemon causes which-key popup to have improper vertical size #1335

Open
adql opened this issue Jul 22, 2021 · 6 comments
Open

emacs --daemon causes which-key popup to have improper vertical size #1335

adql opened this issue Jul 22, 2021 · 6 comments

Comments

@adql
Copy link
Contributor

adql commented Jul 22, 2021

Expected behavior

Normal display of which-key popup when connecting with emacsclient -c to a server started with emacs --daemon.

Actual behavior

The which-key popup has an issue with the vertical size which, apart from making it somewhat smaller, often cuts the bottom line in a way that make it unreadable. Scrolling to the next page doesn't display that line, so it's "lost".

The problem doesn't occur when just running emacs, or when running emacsclient -c to connect to a server that was started with M-x server-start.

prelude-whichkey-problem

On the left is a client connected to a server-start-type server, displaying properly. On the right is a client connected to a daemon. As can be seen, there's a line beneath that of the d and r keys which is barely visible (should be for e and s). Scrolling with C-h n goes directly to the f and t line, so two key bindings are not displayed (on a full screen it would be four on my display).

Testing on a vanilla Emacs with only which-key installed doesn't reproduce the problem, which suggests that it's in Prelude.

Steps to reproduce the problem

  1. Start emacs daemon: emacs --daemon
  2. Connect to the daemon: emacsclient -c
  3. Press a prefix key such as C-c or C-x

Environment & Version information

Emacs version

27.2

Operating system

Manjaro Linux (rolling) with i3 WM.

@adql
Copy link
Contributor Author

adql commented Jul 22, 2021

There was a similar issue opened for which-key years ago, but it seems to be related to golden-ratio which is not used in Prelude, and not related to daemon.

@bbatsov
Copy link
Owner

bbatsov commented Sep 29, 2021

I haven't observed this issue, but if you find a solution do let me know. Likely it's an issue with which-key, that's unrelated to Prelude.

@adql
Copy link
Contributor Author

adql commented Nov 25, 2021

@bbatsov true, no idea how I had missed that one, since I clearly remember testing it on vanilla Emacs and checking the issues on which-key's repo... sorry!

Anyway, I've made a couple of tests and (require 'which-key) at initialization is enough to reproduce the bug, even when holding enabling the mode until a client is started. It's easily solvable with a dirty-ish workaround until the bug is fixed upstream, I'll submit a pull request soon.

@stale
Copy link

stale bot commented Apr 16, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution and understanding!

@stale stale bot added the stale label Apr 16, 2022
@adql
Copy link
Contributor Author

adql commented Apr 16, 2022

elats

@adql
Copy link
Contributor Author

adql commented Apr 19, 2022

The recent commit adds a workaround which can be removed when the upstream issue is resolved.

stefankeidel pushed a commit to stefankeidel/emacs-config that referenced this issue Oct 4, 2022
stefankeidel added a commit to stefankeidel/emacs-config that referenced this issue Oct 4, 2022
* upstream/master: (25 commits)
  Add magit-section to pinned packages
  Update installation.md
  Ignore eln-cache directory
  Minor typo fix
  [Docs] Mention flycheck-ocaml
  [Docs] Document the OCaml support
  Fix warning
  Add basic support for Literate Programming (bbatsov#1370)
  add last change to changelog
  Disable super-save on go-mode
  Document a workaround for fixing C-a in term-mode
  Bump the copyright years
  [bbatsov#1335] Workaround for which-key display bug (bbatsov#1349)
  Move go doc to new location (bbatsov#1366)
  GitHub actions CI (bbatsov#1362)
  Update of prelude-go to replace gocode backend with lsp-mode and gopls (bbatsov#1363)
  Fix contribute.md minor issues
  [DOCS] change pages to nav
  [DOCS] Add module for Rust language
  [DOCS] Add missing modules
  ...
suutari-ai added a commit to suutari-ai/prelude that referenced this issue Jan 10, 2023
* 'master' of github.com:bbatsov/prelude:
  Remove helm-config.
  Update rust module (bbatsov#1388)
  Search sample/prelude-modules.el in prelude-dir during init
  Documentation for prelude orgmode
  Enable cleaner org-habits
  [Docs] Update the cheatsheet output (png and pdf).
  Fix copypasta in ruby.md
  Add magit-section to pinned packages
  Update installation.md
  Ignore eln-cache directory
  Minor typo fix
  [Docs] Mention flycheck-ocaml
  [Docs] Document the OCaml support
  Fix warning
  Add basic support for Literate Programming (bbatsov#1370)
  add last change to changelog
  Disable super-save on go-mode
  Document a workaround for fixing C-a in term-mode
  Bump the copyright years
  [bbatsov#1335] Workaround for which-key display bug (bbatsov#1349)
  Move go doc to new location (bbatsov#1366)
  GitHub actions CI (bbatsov#1362)
  Update of prelude-go to replace gocode backend with lsp-mode and gopls (bbatsov#1363)
  Fix contribute.md minor issues
  [DOCS] change pages to nav
  [DOCS] Add module for Rust language
  [DOCS] Add missing modules
  [DOCS] Formating text to 80 char lines and update available modules
  [DOCS] Update the Changelog
  [DOCS] Fix problem with Edit in github link
  [DOCS] Keep index.md to 80 char lines and a couple of minor edits
  Fix "Symbol's value as variable is void: kill-region" errors in Emacs 29.0.50 (bbatsov#1356)
mklvr pushed a commit to mklvr/prelude that referenced this issue Apr 11, 2023
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

No branches or pull requests

2 participants