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.56k stars 4.9k forks source link

M-x broken in the magit status buffer (and potentially others too) #16395

Closed sankalp-khare closed 1 month ago

sankalp-khare commented 1 month ago

Description :octocat:

M-x broken in the magit-status buffer (or everywhere??) M-m broken in the spacemacs buffer (or everywhere??)

this issue has been filed by copying the template text generated in emacs after reverting spacemacs to last commit I was at (a58a7d79b) before updating my .emacs.d spacemacs git repo today. The broken latest dev branch of spacemacs doesn't permit me to do M-m h I because of the same issue being reported here.

Reproduction guide :beetle:

You can also try to file a bug report with M-m h I with the latest version of spacemacs i.e. ca8b99552 and see the same issue.

Observed behaviour: :eyes: :broken_heart: There's a warning that says "Key sequence M-m h d m starts with non-prefix key M-m"

Expected behaviour: :heart: :smile: The Helm M-x buffer opens up and I can begin to type the name of the function I want to invoke, e.g. magit-branch-and-checkout

System Info :computer:

Backtrace :paw_prints:

<<BACKTRACE IF RELEVANT>>
sankalp-khare commented 1 month ago

Looks like the issue was introduced in 0d670aff0653cb708889913c6bf90251172c342e:

  0 git … pull origin develop
From https://github.com/syl20bnr/spacemacs
 * branch                develop    -> FETCH_HEAD
Already up to date.

  0 git … bisect start develop a58a7d79b3713bcf693bb61d9ba83d650a6aba86
Bisecting: 9 revisions left to test after this (roughly 3 steps)
[2fb41e7c4c208354b02ae37dc3a012450d55e240] improve ess loading and fix `ess-inferior-r-mode-map` bug

  0 git … bisect good
Bisecting: 4 revisions left to test after this (roughly 2 steps)
[3feb80bce68326ba11e2eda955912c82ed667af7] Fix helm-ls-git overrides (#16373)

  0 git … bisect bad
Bisecting: 2 revisions left to test after this (roughly 1 step)
[0d670aff0653cb708889913c6bf90251172c342e] Add some missing help key bindings to spacemacs-defaults (#16368)

  0 git … bisect bad
Bisecting: 0 revisions left to test after this (roughly 0 steps)
[afe8afc19d527a7c8e0c8f07755fb1d99efe169e] [spacemacs-editing-visual] Disable vhl occur extension in Emacs 28+

  0 git … bisect good
0d670aff0653cb708889913c6bf90251172c342e is the first bad commit
commit 0d670aff0653cb708889913c6bf90251172c342e
Author: Aaron Zeng <me@bcc32.com>
Date:   Sat May 11 17:07:01 2024 -0400

    Add some missing help key bindings to spacemacs-defaults (#16368)

    * [spacemacs-defaults] Add SPC h d F for describe-face

    This key binding is already used for counsel-describe-face in the ivy
    layer.

    * [spacemacs-defaults] Move some help keys from the compleseus layer

    These key bindings are for built-in commands (which compleseus
    enhances, but does not rename).  It would be useful to have these key
    bindings available even if no completion layer is enabled.

 layers/+completion/compleseus/packages.el           | 3 ---
 layers/+spacemacs/spacemacs-defaults/keybindings.el | 4 ++++
 2 files changed, 4 insertions(+), 3 deletions(-)
sankalp-khare commented 1 month ago

Yep. I cannot reproduce the issue in afe8afc (parent of 0d670af)

fnussbaum commented 1 month ago

Setting a global keybinding starting with M-m to describe-mode before Helm is loaded seems to break Helm:

    (define-key map (kbd "M-m")        #'helm-toggle-all-marks)
    ...
    ;; Use `describe-mode' key in `global-map'.
    (dolist (k (where-is-internal #'describe-mode global-map))
      (define-key map k #'helm-help))

(from https://github.com/emacs-helm/helm/blob/master/helm-core.el#L392-L490)

The Ivy layer already implements a workaround which could be moved and used here as well: https://github.com/syl20bnr/spacemacs/blob/develop/layers/%2Bcompletion/ivy/funcs.el#L346-L362

vitaminace33 commented 1 month ago

I am suffering of this problem in home buffer. I can't do much, not even visiting a file.

I have pulled Spacemacs last updates and updated packages.

Upon start, I receive the following errors.

⛔ Error (use-package): popwin/:config: Wrong type argument: listp, window-purpose/save-dedicated-windows
⛔ Error (use-package): window-purpose/:config: Assertion failed: (listp args)

M-m f f gives

Key sequence M-m h d m starts with non-prefix key M-m
vitaminace33 commented 1 month ago

After checking out afe8afc , key bindings work again. However, the aforementioned errors (use-package) persist.

rawenous commented 1 month ago

Maybe @bcc32 wants to take a look

fnussbaum commented 1 month ago

Upon start, I receive the following errors.

⛔ Error (use-package): popwin/:config: Wrong type argument: listp, window-purpose/save-dedicated-windows
⛔ Error (use-package): window-purpose/:config: Assertion failed: (listp args)

It might be best to open a separate issue for this including system info. I cannot reproduce the errors on my setup.

sankalp-khare commented 1 month ago

@fnussbaum thanks for pouncing on this quick and addressing it!