0

The org-agenda-transient mode in spacemacs is mapped by default to M-SPC. Since I am running spacemacs in a wsl-g setup, this key is not available, since this is a default key mapping of windows and is not available in wsl-g windows.

I found the configuration of this transient mode in the setup of spacemacs for org, but I could not understand, how it works and how I would remap this. Normally I would remap a key by using a function, but the transient mode is not declared using a function..

Any idea how this could be done without redefining the whole hydra for the transient mode?

1 Answer 1

0

After searching org-agenda-transient in Spacemacs, I find that M-SPC is bound to spacemacs/org-agenda-transient-state/body, see these lines.

So spacemacs|define-transient-state will generate a function that ends with /body to activate the transient state. I think you may remap like this (untested):

(with-eval-after-load 'org-agenda
  (evilified-state-evilify-map org-agenda-mode-map
      :mode org-agenda-mode
      :bindings
      (kbd "M-SPC") nil
      (kbd "s-M-SPC") nil
      (kbd "x-x-x") 'spacemacs/org-agenda-transient-state/body))
5
  • That does not seem to work. I get the following error: "wrong type argument: commandp, spacemacs/org-agenda-transient-state/body"
    – bombadil
    Dec 19, 2022 at 16:54
  • @bombadil Where the config did you put in? Could you try putting it in with-eval-after-load? Dec 20, 2022 at 11:01
  • Yes. I did try this in multiple ways including with-eval-after-load and they all fail in the same way
    – bombadil
    Dec 22, 2022 at 12:02
  • emm, this is weird. Dec 22, 2022 at 13:34
  • this actually works. I had another issue creating problems
    – bombadil
    Jan 20 at 9:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.