doomemacs / doomemacs

An Emacs framework for the stubborn martian hacker
MIT License
19.49k stars 3.06k forks source link

Can't access which-key help when a prefix has a `C-h` keybind #2772

Closed vigilancetech-com closed 3 years ago

vigilancetech-com commented 4 years ago

What did you expect to happen? see the next page of commands

What actually happened? closes available window commands and puts: "no window left of selected window" in the minibuffer

Steps to reproduce:

  1. in just about any buffer hit SPC-w
  2. now you'll see all the subcommands available under that key sequence pop up in the bottom of the frame (just above the minibuffer)
  3. It prompt's you to hit C-h to see a different one of the 4 pages of commands under SPC-w
  4. You hit C-h and instead of giving you the options to see the next/previous pages, it just closes the subcommands window and displays:

    "No window left from selected window" in the minibuffer

System information:

``` emacs version 26.2 features XPM JPEG TIFF GIF PNG RSVG SOUND GPM DBUS GLIB NOTIFY ACL GNUTLS LIBXML2 FREETYPE XFT ZLIB GTK3 X11 XDBE XIM THREADS LIBSYSTEMD LCMS2 build Jun 29, 2019 buildopts (--prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --disable-silent-rules --docdir=/usr/share/doc/emacs-26.2 --htmldir=/usr/share/doc/emacs-26.2/html --libdir=/usr/lib64 --program-suffix=-emacs-26 --includedir=/usr/include/emacs-26 --infodir=/usr/share/info/emacs-26 --localstatedir=/var --enable-locallisppath=/etc/emacs:/usr/share/emacs/site-lisp --without-compress-install --without-hesiod --without-pop --with-file-notification=inotify --enable-acl --with-dbus --without-modules --without-gameuser --with-gpm --with-kerberos --with-kerberos5 --with-lcms2 --with-xml2 --without-mailutils --without-selinux --with-gnutls --with-libsystemd --with-threads --without-wide-int --with-zlib --with-sound=alsa --with-x --without-ns --without-gconf --without-gsettings --without-toolkit-scroll-bars --with-gif --with-jpeg --with-png --with-rsvg --with-tiff --with-xpm --without-imagemagick --with-xft --without-cairo --without-libotf --without-m17n-flt --with-x-toolkit=gtk3 --without-xwidgets 'CFLAGS=-O2 -march=x86-64 -pipe' CPPFLAGS= 'LDFLAGS=-Wl,-O1 -Wl,--as-needed') windowsys x daemonp server-running doom version 2.0.9 build HEAD -> develop, origin/develop, origin/HEAD 4b20c7206 2020-03-13 17:34:44 -0400 dir ~/.doom.d/ system type gnu/linux config x86_64-pc-linux-gnu shell /bin/bash uname Linux 5.4.0-sabayon #1 SMP Tue Feb 25 22:46:38 UTC 2020 x86_64 path (~/bin ~/sbin ~/.npm-global/bin ~/.emacs.d/bin /usr/local/sbin /usr/local/bin /usr/sbin /usr/bin /sbin /bin /opt/bin /usr/lib/llvm/9/bin /usr/games/bin /usr/libexec/emacs/26.2/x86_64-pc-linux-gnu/) config envfile envvar-file elc-files 0 modules (:completion company ivy :ui doom doom-dashboard doom-quit hl-todo modeline nav-flash ophints (popup +defaults) vc-gutter vi-tilde-fringe window-select workspaces :editor (evil +everywhere) file-templates fold snippets :emacs dired electric vc :checkers syntax spell :tools (eval +overlay) lookup magit :lang clojure csharp data emacs-lisp fsharp javascript latex factor markdown (org +dragndrop +present) racket scheme sh :config (default +bindings +smartparens)) packages (n/a) unpin (n/a) elpa (n/a) ```
x61 commented 4 years ago

I have this same issue. Here is my doom info and why do I see

Package cl deprecated

warning.

~/.emacs.d/bin/doom info
fatal: destination path '/.emacs.d' already exists and is not an empty directory.
Package cl is deprecated
((emacs
  **(version . "28.0.50")**
  (features . "RSVG IMAGEMAGICK GLIB NOTIFY KQUEUE ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES THREADS JSON PDUMPER LCMS2 GMP")
  (build . "Mar 24, 2020")
  (buildopts "--enable-locallisppath=/usr/local/share/emacs/site-lisp --infodir=/usr/local/Cellar/emacs-head/HEAD-421eeff_1/share/info/emacs --prefix=/usr/local/Cellar/emacs-head/HEAD-421eeff_1 --without-x --without-dbus --with-imagemagick --with-json --with-modules --with-gnutls --with-rsvg --with-xml2 --with-harfbuzz --with-ns --disable-ns-self-contained")
  (windowsys . batch)
  (daemonp . server-running))
 (doom
  (version . "2.0.9")
  (build . "HEAD -> develop, origin/develop, origin/HEAD 4b20c7206 2020-03-13 17:34:44 -0400")
  (dir . "~/.doom.d/"))
 (system
  (type . darwin)
  (config . "x86_64-apple-darwin19.3.0")
  (shell . "/bin/zsh")
  (uname . "Darwin 19.3.0 Darwin Kernel Version 19.3.0: Thu Jan  9 20:58:23 PST 2020; root:xnu-6153.81.5~1/RELEASE_X86_64 x86_64")
  (path "/usr/local/opt/sqlite/bin" "~/.rbenv/shims" "/usr/local/opt/ruby/bin" "/usr/local/opt/libxml2/bin" "~/bin" "/usr/local/bin" "~/Dropbox/scripts" "/usr/bin" "/bin" "/usr/sbin" "/sbin" "/Library/TeX/texbin" "/usr/local/Cellar/emacs-head/HEAD-421eeff_1/libexec/emacs/28.0.50/x86_64-apple-darwin19.3.0"))
 (config
  (envfile . envvar-file)
  (elc-files . 2)
  (modules :completion company ivy :ui doom doom-dashboard doom-quit hl-todo modeline nav-flash ophints (popup +defaults) vc-gutter vi-tilde-fringe window-select workspaces :editor (evil +everywhere) file-templates fold snippets :emacs dired electric vc :checkers syntax :tools (eval +overlay) lookup magit :lang data emacs-lisp markdown (org +dragndrop +present) sh :config (default +bindings +smartparens))
  (packages (gnuplot))
  (unpin "n/a")
  (elpa "n/a")))
hlissner commented 4 years ago

Unfortunately, this issue has no decent solution (and is really an issue for which-key, rather than doom). On prefixes that have a C-h keybind (e.g. SPC w has SPC w C-h), which-key's C-h help key will not work. Instead, use ? or F1.

Package cl deprecated

@x61 this is an unrelated issue with libraries loading the deprecated cl package in Emacs 27+. This is unavoidable until Emacs plugins have updated. There is no effective way to silence this warning.

cubranic commented 3 years ago

In my case, I can't use which-key's paging at all, because pressing C-h immediately opens a help page titled "t' Minor Mode Bindings Starting With SPC:. Is there a work around this too, other than changing which-key's prefix? I'd very much like to be able to page though which-key's display.

Info:

  generated  Mar 20, 2021 10:02:31
     distro  MacOS 10.15.7 Darwin 19.6.0 x86_64
      emacs  27.1 HEAD 2003451b6 ~/doom-emacs/
       doom  2.0.9 HEAD -> develop, origin/develop, origin/HEAD 46dedb3e3 2021-03-13 16:35:21 -0500 ~/.doom.d/ -> ~/.doom.d/
hlissner commented 3 years ago

Instead, use ? or F1.

@cubranic

Since this has no solution and has acceptable alternative keybinds, I'll close this.

hlissner commented 3 years ago

@cubranic Oh, I misread. Seems which-key's docs suggests (setq which-key-use-C-h-commands t) for getting around this. Give that a try.

cubranic commented 3 years ago

I checked, and which-key-use-C-h-commands is already set to t.

Interestingly, when I disable which-key-mode and enable it back again, which-key's paging works as expected. Could there be some order-of-initialization issue at play?