GNU bug report logs - #63807
bug in compose-gstring-for-terminal?

Previous Next

Package: emacs;

Reported by: Mattias Engdegård <mattias.engdegard <at> gmail.com>

Date: Tue, 30 May 2023 20:37:01 UTC

Severity: normal

Done: Mattias Engdegård <mattias.engdegard <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Mattias Engdegård <mattias.engdegard <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 63807 <at> debbugs.gnu.org
Subject: bug#63807: bug in compose-gstring-for-terminal?
Date: Wed, 31 May 2023 17:08:58 +0200
31 maj 2023 kl. 16.30 skrev Eli Zaretskii <eliz <at> gnu.org>:

> If we agree that replacing (+ 2) with (+ i 2) is "completely safe",
> then we basically agree that this code runs only when i == zero,
> right?

Yes -- that is, if we trust external invariants to enforce that it indeed only runs when i is 0. Otherwise, the current code is incorrect and changing it would fix a bug. Either way, changing it should do no harm and has the possibility of improving correctness.

I was unable to provoke that particular code to run for strings longer than 1 chars but that could just be my own ineptitude, and in any case it seems unsafe to rely on it. Maybe you could come up with an example?

(And to answer your question that I edited out in haste: there are no plans to warn about unary applications of `+`. This was just something I stumbled upon while researching something else.)





This bug report was last modified 2 years and 49 days ago.

Previous Next


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