Comments (6)
Can you reproduce this by starting emacs without your config (emacs -Q
) and loading a basic configuration for which-key like
(require 'which-key)
(which-key-setup-side-window-right)
(which-key-mode)
?
from emacs-which-key.
My apologies for the slow response.
I tried loading which-key
via emacs -Q
, with (which-key-setup-side-window-right)
. The paging display for C-x
now fits within the side-window, without any cutting off (see screenshots below).
I then enabled my usual Emacs theme (from the package monokai-theme
), and things seemed to be fine.
I was able to reproduce the issue when I made the default frame face larger (to be compatible with my display and eye comfort):
(add-to-list 'default-frame-alist '(font . "Ubuntu Mono-14:antialising=True") )
So it seems to me that one solution for this would be to make the default which-key
face smaller, but I haven't been able to do that in a uniform way – i.e. some of the faces become smaller but others don't, so that the completion list is still obscured/cut off, but at a different location to the previous situation.
from emacs-which-key.
First off, the intention is for the window to scale appropriately if the font is larger. I just checked that mine does even for larger font sizes than the one you're using.
From the pictures above, it seems like the character widths are not being handled properly. Can you try the following? First,
(setq which-key--debug-buffer-name "wk-debug")
That will dump out some of the calculations to the buffer "wk-debug". I'd like to see what it spits out for one of the problematic cases, preferably like you have here starting from emacs -Q
. If possible it would be nice to have a screenshot that corresponds to the data from "wk-debug". Does that make sense?
from emacs-which-key.
OK, I tried the following: after loading which-key
via straight in
emacs -Q
,
(require 'which-key)
(which-key-setup-side-window-right)
(which-key-mode)
(add-to-list 'default-frame-alist '(font . "Ubuntu Mono-14:antialising=True") )
(setq which-key--debug-buffer-name "wk-debug")
(Note: this time I didn't load a theme, I just changed the default frame face.)
Opening a new frame (so that the larger font is applied), and hitting C-x
produces the following output in wk-debug
:
Frame height: 45
Minibuffer height: 1
Max dimensions: (43,56)
Available for bindings: (42,56)
Actual lines: 43
On prefix "C-x" which-key took 113 ms.
Below is the associated screenshot of the first page for the C-x
commands:
I also tried C-h
to see if there is any difference:
Frame height: 45
Minibuffer height: 1
Max dimensions: (43,56)
Available for bindings: (42,56)
Actual lines: 43
On prefix "C-h" which-key took 43 ms.
I hadn't implemented any special paging for C-h
so I couldn't see the remaining options, but the list of commands doesn't look as though it is cut off in the way C-x
is:
from emacs-which-key.
Sorry, I meant for you to update which-key first because I added some more information to the debug output. Do you mind doing what you did again after updating which-key?
from emacs-which-key.
I tried it again after updating – it's still version 3.6.0 but it has the new =which-key--debug-message= changes.
The problem remains, here is the output to the wk-debug
buffer:
Frame height: 45
Frame pixel width: 1920
Frame char width: 10
Frame width: 192
Which-key initial width: 64
Which-key adjusted width: 59
Minibuffer height: 1
Max dimensions: (43, 56)
Available for bindings: (42, 56)
Popup type info: (side-window, right, 0.333)
Computed page widths: (33 35 32)
Actual lines: 43
Allow imprecise fit: nil
Display window alist: ((window-width . which-key--fit-buffer-to-window-horizontally) (window-height lambda (w) (fit-window-to-buffer w nil 1)) (side . right) (slot . 0))
On prefix "C-x" which-key took 94 ms.
from emacs-which-key.
Related Issues (20)
- which-key crashes when trying to display term-raw-map HOT 1
- How to switch among different pages of keys conveniently in which-key mode? HOT 1
- which-key can’t show keys: There is not enough space based on your settings and frame size HOT 2
- Customize which-key-C-h-dispatch prompt HOT 1
- Make "<prefix> C-h" display which key and prompt for command at the same time HOT 3
- The texts for the same key in different keymaps are overridden each other HOT 2
- Question about `which-key-undo` HOT 1
- which-key is good enough to be built-into Emacs HOT 1
- Question about full description popups HOT 3
- Automatic expansion of unnamed prefixes
- misoperation
- Once which-key popup is triggered via which-key-show-early-on-C-h all delays are ignored afterwards HOT 1
- Which-key shows wrong labels from inactive keymaps HOT 1
- Side window is too narrow HOT 1
- Scrolling/ moving the screen
- How can I hide keys from the which-key popup? HOT 2
- Paging hint suggests C-h even when it's bound under given prefix and won't work HOT 1
- Does paging work for `<escape>-` key sequences? HOT 2
- Error running timer ‘which-key--update’: (void-function take) HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from emacs-which-key.