Comments (11)
Not sure yet, but here's some more information. There seems to be something different about how iso-transl-ctl-x-8-map
works that I haven't figured out yet.
This suggests the map should be quoted: http://www.emacswiki.org/emacs/PrefixKey
When I use global-set-key
like this it works fine
(require 'iso-transl)
(define-key iso-transl-ctl-x-8-map (kbd ">") nil)
(defun success () (interactive) (message "Typed C-x 8 >>"))
(global-set-key (kbd "C-x 8 > >") 'success)
I'll do more digging later.
from emacs-which-key.
I have always been using keymap vars without quotes and they have worked.
But here is what I tried:
- The
>
"maps" didn't get expanded with or without the quotes. - It expands fine in
guide-key
(But now I cannot go back to that. Thanks to your work, I am spoiled by how beautifullywhich-key
is rendering the key maps :))
I can later try looking in guide-key
code if it handles such bindings in a special manner.
from emacs-which-key.
If it works in guide-key, that should give me enough clues to see what's happening. I'll check it out when I get a chance
from emacs-which-key.
Found the issue but I'm not sure how I want to fix it yet. The problem is that (key-binding (kbd "C-x 8 >"))
is returning nil in your setup when it should be returning a keymap. This has been working well in all the other prefix cases I've tested so I don't know why it's different here yet.
from emacs-which-key.
Hmm, I am setting it to nil
first
(">" . nil) ; First unbind ">" from the map
But then I am rebinding >=
, >>
, etc to other things. I cannot do the below bindings unless I unbind its existing binding.
(">=" . [?≥]) ; greater than or equal to
(">>" . [?≫]) ; much greater than
(">\"" . [?»]) ; right-pointing double angle quotation mark
(">'" . [?›]) ; single right-pointing angle quotation mark
(">h" . [?☛]) ; black right pointing index
from emacs-which-key.
I don't think that's the problem exactly
On Wed, Jul 15, 2015 at 4:40 PM Kaushal Modi [email protected]
wrote:
Hmm, I am setting it to nil first
(">" . nil) ; First unbind ">" from the map
But then I am rebinding >=, >>, etc to other things. I cannot do the
below bindings unless I unbind its existing binding.(">=" . [?≥]) ; greater than or equal to (">>" . [?≫]) ; much greater than (">\"" . [?»]) ; right-pointing double angle quotation mark (">'" . [?›]) ; single right-pointing angle quotation mark (">h" . [?☛]) ; black right pointing index
—
Reply to this email directly or view it on GitHub
#39 (comment)
.
from emacs-which-key.
Can you check your code now? It should work. Had to add another test against the key-translation-map
because iso-transl-ctl-x-8-map
is stored there and not in the "regular" keymaps
from emacs-which-key.
By the way you can use something like this to fix the spacing issue (It just changes how the key is shown). Replace "ZWS" with whatever you want to display there.
(which-key-add-key-based-replacements "C-x 8 0" "ZWS")
from emacs-which-key.
Thanks! This is now fixed for me.
Also thanks for the "ZWS" tip. I was already using which-key-key-based-description-replacement-alist
but it didn't occur to me that I can use that for stuff other than simply putting descriptive prefix names :)
from emacs-which-key.
I like those arrows. I wanted to use more unicode characters as replacements, but I was worried about all the different fonts people may be using and all of the bug reports I'd get.
I was thinking that we could compile a list of nice unicode replacements and then include them as an option that you have to explicitly turn on.
from emacs-which-key.
Thanks! You can try using char-displayable-p
function as used in pdf-tools
.
I use this in my init to take care of unicodes:
- Check if unicode font is available (Symbola in my case)
- Set backup lighters if symbola not available
from emacs-which-key.
Related Issues (20)
- Composition not being used in which-key buffer HOT 2
- BUG: conflict between which-key-window and avy-goto-char-2. HOT 2
- which-key menu misalignment with ellipsis char HOT 1
- Setting which-key-show-operator-state-maps to true "breaks" outer and inner evil maps HOT 1
- 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
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.