general.el icon indicating copy to clipboard operation
general.el copied to clipboard

which-key doesn't show overrided descriptions when binded key and simulated key is different.

Open AmaiKinono opened this issue 6 years ago • 1 comments

Here's an example:

(general-def
  "C-c m" '(set-mark-command :wk "Set Mark"))

;; Remap C-c this way so it works as copy when a region is active
(general-def
  :keymaps 'override
  "C-c" (general-predicate-dispatch nil
          (region-active-p) 'kill-ring-save
          t (general-key "C-c" :setup (general-override-mode -1) :teardown (general-override-mode))))

;; Simulate C-c using another key
(general-def
  "C-x g" (general-key "C-c"))

When pressing C-c, the description of m is Set Mark; When pressing C-x g, the description of m is set-mark-command.

I'm not sure if this is a problem of general.el or which-key.

AmaiKinono avatar Dec 14 '19 17:12 AmaiKinono

I think this is a duplicate of #79 or at least related.

noctuid avatar Dec 20 '19 21:12 noctuid