syl20bnr / spacemacs

A community-driven Emacs distribution - The best editor is neither Emacs nor Vim, it's Emacs *and* Vim!
http://spacemacs.org
GNU General Public License v3.0
23.67k stars 4.89k forks source link

default spacemacs config has bound C-c C-w keybinding to eyebrowse rather than org-mode refile. #10729

Closed rnwolf closed 4 years ago

rnwolf commented 6 years ago

Description :octocat:

The default spacemacs config has bound C-c C-w to eyebrowse rather than org-mode refile.

I tried azzamsa suggestion in defun dotspacemacs/user-config () section of .spacemacs but it has not worked.

In order to get org-refile working I excluded it with.

dotspacemacs-excluded-packages '(eyebrowse)

Reproduction guide :beetle:

Observed behaviour:

Expected behaviour:

System Info :computer:

Compro-Prasad commented 6 years ago

You can probably override the keybinding in your dotspacemacs/user-config too.

CeleritasCelery commented 6 years ago

This is really an eyebrowse issue. We could either override the keybindings in the capture buffer at @Compro-Prasad suggested or add a "Spacemacsesque" binding of , w to refile.

bmag commented 6 years ago

In Emacs, minor-mode keymaps have higher priority than major-mode keymaps. In this case, C-c C-w 1/2/etc. that are bound in eyebrowse's (a minor mode) keymap shadow the C-c C-w binding in org's (a major mode) keymap.

Eyebrowse's key prefix is controlled by eyebrowse-keymap-prefix, so setting it in user-init to something other than (kbd "C-c C-w") would solve the issue. You could set it to (kbd "C-c C-W") (notice capital W), for example.

bmag commented 6 years ago

We already have org-refile under , s r, by the way. ("s" stands for "subtree")

Miciah commented 6 years ago

C-c C-w is the same key as C-c C-W (at least on Emacs with GTK; I'd be surprised if it weren't the case on other platforms), so setting eyebrowse-keymap-prefix to the latter makes no difference.

Ideally, I want to disable eyebrowse's binding entirely. I tried setting eyebrowse-keymap-prefix to nil in dotspacemacs/user-init, but eyebrowse doesn't check for a nil value, so it gave the following error:

Error (use-package): eyebrowse/:init: Wrong type argument: arrayp, nil
Error (use-package): eyebrowse/:catch: Wrong type argument: arrayp, nil

Ultimately I found a solution based on some information on Stack Overflow (Disabling minor mode key bindings), namely putting the following in dotspacemacs/user-config:

(assq-delete-all 'eyebrowse-mode minor-mode-map-alist)

That removed the eyebrowse binding for me.


In my case, I want to be able to use C-c C-w in rcirc, which binds it to the rcirc-cmd-whois. Because Spacemacs puts all eyebrowse functions under SPC l w, it seems unnecessary to keep its C-c C-w binding. Since it interferes with multiple minor modes, would it be reasonable to disable it by default?

bmag commented 6 years ago

C-c C-w is the same key as C-c C-W

Right, C-c C-S-w does what I meant.

would it be reasonable to disable it by default?

We have to remember also users of emacs editing style, but I think even so it's reasonable to change the prefix to something less used. Disabling it entirely will be more complicated. without real advantages over just changing it. (the change will need to be mentioned in the documentation, of course)

syl20bnr commented 6 years ago

My suggestion is to use the corresponding key bindings defined in Spacemacs via its leader keys.

It is virtually impossible to resolve conflicts between all the packages as authors choose their key bindings as they want. Only the Spacemacs key bindings can be reasonably set to limit conflicts to almost null.

So better use the Spacemacs bindings, if a binding does not exist yet then please open a PR and propose a binding that makes sense, ideally under the major mode prefix.

I prefer we don't vanilla Emacs key bindings and package key bindings.

Rudiger Wolf notifications@github.com writes:

Description :octocat:

The default spacemacs config has bound C-c C-w to eyebrowse rather than org-mode refile.

I tried azzamsa suggestion in defun dotspacemacs/user-config () section of .spacemacs but it has not worked.

In order to get org-refile working I excluded it with.

dotspacemacs-excluded-packages '(eyebrowse)

Reproduction guide :beetle:

  • Start Emacs
  • open and org file.
  • Navigate to heading
  • press C-c Cw
  • The command menu for eyebrowse opens up
  • Expected rather than helm navigation for org-refile

Observed behaviour:

  • The command menu for eyebrowse opens up

Expected behaviour:

  • helm navigation for org-refile

System Info :computer:

  • OS: gnu/linux
  • Emacs: 25.2.2
  • Spacemacs: 0.200.13
  • Spacemacs branch: master (rev. c7a103a7)
  • Graphic display: t
  • Distribution: spacemacs
  • Editing style: vim
  • Completion: helm
  • Layers:
    (html python helm emacs-lisp asciidoc git markdown org
      (org :variables org-enable-github-support t org-enable-reveal-js-support t)
      spell-checking yaml)
  • System configuration features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11

-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/syl20bnr/spacemacs/issues/10729

github-actions[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!

alwyn commented 4 years ago

We already have org-refile under , s r, by the way. ("s" stands for "subtree")

When using Holy mode, how do I access the equivalent of the , leader key?

It sometimes feels, at least to me, like Holy users are treated like 2nd class citizens just because people assume most users use evil mode.

Miciah commented 4 years ago

When using Holy mode, how do I access the equivalent of the , leader key?

I believe it's M-m m.

alwyn commented 4 years ago

When using Holy mode, how do I access the equivalent of the , leader key?

I believe it's M-m m.

Seems to be configured as C-M-m in the .spacemacs, but that doesn't seem to do anything except in org-mode where it seems to behave like M-Ret.

alwyn commented 4 years ago

Ok, it seems that C-M-m works on the develop branch, but not master. I'll just use develop on all my machines, Thanks.

Sorry for the rant.