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

org-brain doesn't have SPC menu #13548

Closed
srgkoshelev opened this issue May 4, 2020 · 8 comments
Closed

org-brain doesn't have SPC menu #13548

srgkoshelev opened this issue May 4, 2020 · 8 comments

Comments

@srgkoshelev
Copy link

Description :octocat:

This might be a feature request rather than a bug.
org-brain doesn't recognize default spacemacs key bindings, e.g. SPC menu.

Reproduction guide 🪲

  • Start Emacs
  • Start org-brain
  • Press SPC
  • Be sad you can't switch to the other window

Observed behaviour: 👀 💔
End of buffer

Expected behaviour: ❤️ 😄
SPC menu!

System Info 💻

  • OS: darwin
  • Emacs: 26.2
  • Spacemacs: 0.300.0
  • Spacemacs branch: develop (rev. d95d41f)
  • Graphic display: t
  • Distribution: spacemacs
  • Editing style: vim
  • Completion: helm
  • Layers:
(html markdown csv helm auto-completion emacs-lisp multiple-cursors treemacs finance python git org spell-checking syntax-checking latex)
  • System configuration features: NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES THREADS
@zeneofa
Copy link

zeneofa commented Jun 5, 2020

I found something that works for me, though I am not sure if this will generalize.

In .spacemacs I added the following to the user config area

(with-eval-after-load 'org
    (evil-set-initial-state 'org-brain-visualize-mode 'hybrid))

When running org-brain-visualize, I get dropped into insert-mode. This allows me to use the org-brain keybindings from the documentation. To get the SPC commands working again, I just ESC insert-mode. To get back to the org-brain-visualize keybindings, I just use i to get back to insert-mode.

I am not sure if this breaks anything downstream though.

@duianto
Copy link
Collaborator

duianto commented Jun 22, 2020

The reason why SPC doesn't work by default is because org-brain-visualize-mode is started in emacs state:

(evil-set-initial-state 'org-brain-visualize-mode 'emacs))))

possibly because it's suggested in the org-brain setup section:
https://github.com/Kungsgeten/org-brain#setup-and-requirements

If you’re an evil user, you’ll want to add (evil-set-initial-state 'org-brain-visualize-mode 'emacs) to your org-brain configuration.

In emacs state the Spacemacs menu is opened by pressing: M-m

A possible workaround:

Add this to the dotspacemacs/user-config section:

  (with-eval-after-load 'org-brain
    (define-key org-brain-visualize-mode-map (kbd "SPC") 'spacemacs-cmds))

@srgkoshelev
Copy link
Author

srgkoshelev commented Jun 22, 2020 via email

@fosskers
Copy link
Contributor

The workaround does indeed work. Should it / can it be upstreamed to the default setup for the org layer?

duianto added a commit to duianto/spacemacs that referenced this issue Feb 26, 2021
@duianto
Copy link
Collaborator

duianto commented Feb 26, 2021

A PR has been opened with a possible solution:
[org][org-brain] Add SPC menu (vim or hybrid style) #14429

smile13241324 pushed a commit that referenced this issue Feb 28, 2021
Fixes: org-brain doesn't have SPC menu
#13548
@duianto
Copy link
Collaborator

duianto commented Mar 1, 2021

The PR's changes have been applied to the develop branch.

@srgkoshelev Can you test that it works as expected.
If it does, then you can close this thread.

@srgkoshelev
Copy link
Author

Thank you, guys!

I have removed the lines from the config && updated everything. It works!

@fosskers
Copy link
Contributor

fosskers commented Mar 1, 2021

Yup, works great!

aam-at pushed a commit to aam-at/spacemacs that referenced this issue Mar 23, 2021
wang-d pushed a commit to wang-d/spacemacs that referenced this issue Jul 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants