From: Stefan Kangas <stefankangas@gmail.com>
To: Morgan Willcock <morgan@ice9.digital>, 73568@debbugs.gnu.org
Cc: Justin Burkett <justin@burkett.cc>
Subject: bug#73568: 30.0.91; which-key error in speedbar (wrong-type-argument wholenump -13)
Date: Mon, 30 Sep 2024 14:53:43 -0700 [thread overview]
Message-ID: <CADwFkmknNxH=nEgxUq=3SZ6Jp-S16TCfVFA3PvE_vmNsGW-j4Q@mail.gmail.com> (raw)
In-Reply-To: <877catggky.fsf@ice9.digital>
Morgan Willcock <morgan@ice9.digital> writes:
> An error is signalled when which-key is activated, point is within the
> speedbar frame, and a portion of a key-sequence has been typed
> (e.g. C-x).
>
> To generate an example backtrace:
>
> emacs -Q \
> --eval "(which-key-mode)" \
> --eval "(speedbar-get-focus)" \
> --eval "(toggle-debug-on-error)" \
> --eval "(setq unread-command-events (listify-key-sequence \"\C-x\"))"
Here's the error I get:
Debugger entered--Lisp error: (wrong-type-argument wholenump -14)
make-string(-14 32)
The problem occurs is in `which-key--pad-column': the speedbar frame is
only 14 characters wide, and so can't fit longer strings than that.
I actually see two bugs here:
1. Create a regular Emacs frame of width 14, enable `which-key-mode' and
press some key, e.g. C-h. You now get a similar backtrace. Probably
`which-key' should simply be smarter in this case, for example by
truncating instead of padding.
2. With a dframe, as in speedbar, I guess `which-key' should try to
display it's help window in the original frame?
I'm copying in Justin Burkett.
next prev parent reply other threads:[~2024-09-30 21:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-30 18:08 bug#73568: 30.0.91; which-key error in speedbar (wrong-type-argument wholenump -13) Morgan Willcock
2024-09-30 21:53 ` Stefan Kangas [this message]
2024-10-02 2:01 ` Justin Burkett
2024-10-02 7:18 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CADwFkmknNxH=nEgxUq=3SZ6Jp-S16TCfVFA3PvE_vmNsGW-j4Q@mail.gmail.com' \
--to=stefankangas@gmail.com \
--cc=73568@debbugs.gnu.org \
--cc=justin@burkett.cc \
--cc=morgan@ice9.digital \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).