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

multi-term / term-mode keybinds don't kick in #1554

Closed
ct-emil opened this issue Jul 10, 2019 · 4 comments
Closed

multi-term / term-mode keybinds don't kick in #1554

ct-emil opened this issue Jul 10, 2019 · 4 comments
Labels
is:upstream Originates from outside the project and cannot be fully addressed here module:editor/evil Pertains to Doom's :editor evil module status:resolved Issue was addressed internally

Comments

@ct-emil
Copy link
Contributor

ct-emil commented Jul 10, 2019

Hello,

I am having a problem applying custom keybinds to multi-term and term-mode. I am currently using this approach though I have tried others (including def-package-hook with all pre-config, post-config and post-init):

(map! ...
      :map term-mode-map
      :i "C-y" #'term-paste
      :map term-raw-map
      :i "C-y" #'term-paste)

However, on init of multi-term, the binding is not set. I also tried this:

(map! ...
     (:after multi-term
          :map term-mode-map
          :i "C-y" #'term-paste
          :map term-raw-map
          :i "C-y" #'term-paste))

But it doesn't catch. However, if I evaluate this after init directly in the config file, then it works.

Sorry if there is something obvious I've overlooked, but I tried :after multi-term, term-mode, term, etc, with no luck. I've tried using term-mode-hook and disregarding the doom configuration macros, but that also didn't work (On startup, without evaluating the settings above).

Can anyone offer me advice or a hint on how I am supposed to set these keyboard bindings without manually evaluating the code?

Thank you for reading.

@hlissner
Copy link
Member

hlissner commented Jul 10, 2019

Have you tried (:after term ...)?

EDIT: Just noticed you mention that, but I tried it myself and it worked.

EDIT 2: found the issue. A fix'll be up shortly.

@hlissner hlissner added is:upstream Originates from outside the project and cannot be fully addressed here module:editor/evil Pertains to Doom's :editor evil module labels Jul 10, 2019
@ct-emil
Copy link
Contributor Author

ct-emil commented Jul 10, 2019

I did try it, in my org literate config. I have just one map! command.

Then, if I run multi-term as the first thing after starting Emacs, and C-h k "C-y", I get term-send-raw.

This is my relevant map! section now:

      (:after term
        :map term-mode-map
        :i "C-y" #'term-paste
        :map term-raw-map
        :i "C-y" #'term-paste))

Ah I see your edit - thank you @hlissner. Do you have a Patreon or a "coffee me pls" site?

hlissner added a commit that referenced this issue Jul 10, 2019
Since multi-term loads term, this is redundant, and ends up overwriting
users' after! term or after! multi-term blocks.
@ct-emil
Copy link
Contributor Author

ct-emil commented Jul 10, 2019

It worked - thank you very much.

@ct-emil ct-emil closed this as completed Jul 10, 2019
hlissner added a commit that referenced this issue Jul 10, 2019
@hlissner
Copy link
Member

Great! Happy to help!

Do you have a Patreon or a "coffee me pls" site?

Thank you, I appreciate the sentiment! I just added a sponsor button to the project (top of the page).

@hlissner hlissner added the status:resolved Issue was addressed internally label Jul 10, 2019
uelei pushed a commit to uelei/doom-emacs that referenced this issue Aug 9, 2019
Since multi-term loads term, this is redundant, and ends up overwriting
users' after! term or after! multi-term blocks.
uelei pushed a commit to uelei/doom-emacs that referenced this issue Aug 9, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
is:upstream Originates from outside the project and cannot be fully addressed here module:editor/evil Pertains to Doom's :editor evil module status:resolved Issue was addressed internally
Projects
None yet
Development

No branches or pull requests

2 participants