GNU bug report logs - #78026
31.0.50; browse-url-interactive-arg does not handle nil (this-command-keys)

Previous Next

Package: emacs;

Reported by: StrawberryTea <look <at> strawberrytea.xyz>

Date: Thu, 24 Apr 2025 02:48:01 UTC

Severity: normal

Found in version 31.0.50

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 78026 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 78026 <at> debbugs.gnu.org, StrawberryTea <look <at> strawberrytea.xyz>
Subject: Re: bug#78026: 31.0.50; browse-url-interactive-arg does not handle
 nil (this-command-keys)
Date: Sun, 27 Apr 2025 09:54:26 -0400
>> Hello. So when fixing https://github.com/oantolin/embark/pull/750, I
>> realized that browse-url-interactive-arg does not handle
>> (this-command-keys) being the empty vector and that causes
>> browse-url-interactive-arg to emit an error when called programmatically
>> in embark.el. We should make it so that if (this-command-keys) returns
>> an empty vector, then mouse-set-point is not called.

You mean like in the patch below?

> I don't think I understand how this happens.  Can you show a simple
> recipe for reproducing this issue?

Or a description of the steps that lead to the error.

> Stefan, when can this-command-keys return an empty string or vector?
> The documentation never says anything about that?  The only situations
> I could imagine is some process filter or timer running when we just
> happened to zero out this_command_key_count, but is that possible?

    (run-with-timer 2 2 (lambda () (message "TCK = %S" (this-command-keys))))

suggests it's not just possible but is the most common case for code run
from a timer.  I expect the same holds for other async code.


        Stefan





This bug report was last modified 14 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.