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

Category headers throw errors when major/minor leader key in Spacemacs is pressed #112

Closed
fabrik42 opened this issue Oct 18, 2019 · 6 comments
Closed

Comments

@fabrik42
Copy link

@fabrik42 fabrik42 commented Oct 18, 2019

Hi!
First of all, thank you for this great package! I am using it every day!

I am not an Emacs expert, so I hope my explanation makes sense.

Most of my day, I use a super agenda with scheduled tasks for this day that looks like this:

_Org_Agenda__org

The problem is that I can't use the spacemacs leader keys when the cursor is over a line that represents one of super agenda's generated category headers.

It is very irritating, because normally you can use these commands from every buffer. It also works with the single lines of the agenda entries or blank lines, only the category headers cause errors.

, causes user-error: Command not allowed in this line
SPACE or TAB causes command-execute: Wrong type argument: commandp, spacemacs-cmds

I was not able to find a fix for this, but would be happy to help!

Best,
Christian

@alphapapa

This comment has been minimized.

Copy link
Owner

@alphapapa alphapapa commented Oct 19, 2019

Hi Christian,

I'm glad this package is useful to you.

I don't use Spacemacs or EVIL, so I can't offer specific support for them. Other users have mentioned similar problems, so you may find help by searching older issue reports here. Also, the package evil-collection tries to work around such issues; if necessary, you might report this issue there, and they might be able to add a fix in it.

In general, the issue is the keymaps, which you can adjust in your config. So, e.g. you could just set the header keymap in this package to nil.

@alphapapa

This comment has been minimized.

Copy link
Owner

@alphapapa alphapapa commented Oct 19, 2019

By the way, thanks for sharing the screenshot. I'm curious, where does that pushpin come from? Is it an emoji, or a composed-region, or...?

@fabrik42

This comment has been minimized.

Copy link
Author

@fabrik42 fabrik42 commented Oct 27, 2019

Hi! Thank you for the hints, I am still not sure where the error originates from. It is kind of strange since this only happens for headlines generated by super-agenda, not by headlines in standalone agendas.

The pushpin is just an emoji! :) I basically only use one "work day" agenda that is described here.

@alphapapa

This comment has been minimized.

Copy link
Owner

@alphapapa alphapapa commented Oct 27, 2019

Hi! Thank you for the hints, I am still not sure where the error originates from. It is kind of strange since this only happens for headlines generated by super-agenda, not by headlines in standalone agendas.

The headers made by org-super-agenda use a different keymap:

(defvar org-super-agenda-header-map (copy-keymap org-agenda-mode-map)
  "Keymap applied to agenda group headers.
This is initialized to a copy of `org-agenda-mode-map'; changes
made to that map after this variable is defined will not be
included.  This map is useful for binding commands which apply
only with point on the group headers (e.g. use `origami' to fold
group headings by binding a key to `origami-toggle-node' in this
map).")
@bleggett

This comment has been minimized.

Copy link

@bleggett bleggett commented Oct 31, 2019

Can confirm that with evil-mode and evil-org-agenda the following fixes this issue:

(setq org-super-agenda-header-map nil)

@fabrik42

This comment has been minimized.

Copy link
Author

@fabrik42 fabrik42 commented Oct 31, 2019

Yes, this works for me as well!

@fabrik42 fabrik42 closed this Oct 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.