From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Pip Cet Newsgroups: gmane.emacs.bugs Subject: bug#36312: 27.0.50; (message) in display spec condition causes emacs_abort() Date: Thu, 20 Jun 2019 19:32:43 +0000 Message-ID: References: <83pnn8p1nk.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="260085"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 36312@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jun 20 22:32:34 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1he3jV-0015VE-W7 for geb-bug-gnu-emacs@m.gmane.org; Thu, 20 Jun 2019 22:32:34 +0200 Original-Received: from localhost ([::1]:52818 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1he3jU-0001Ry-Vv for geb-bug-gnu-emacs@m.gmane.org; Thu, 20 Jun 2019 16:32:33 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41708) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1he31v-0004ek-UC for bug-gnu-emacs@gnu.org; Thu, 20 Jun 2019 15:47:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1he2ox-0007On-M4 for bug-gnu-emacs@gnu.org; Thu, 20 Jun 2019 15:34:11 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35776) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1he2or-0007NN-Vq for bug-gnu-emacs@gnu.org; Thu, 20 Jun 2019 15:34:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1he2or-0005li-Ou for bug-gnu-emacs@gnu.org; Thu, 20 Jun 2019 15:34:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Pip Cet Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 20 Jun 2019 19:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36312 X-GNU-PR-Package: emacs Original-Received: via spool by 36312-submit@debbugs.gnu.org id=B36312.156105920722123 (code B ref 36312); Thu, 20 Jun 2019 19:34:01 +0000 Original-Received: (at 36312) by debbugs.gnu.org; 20 Jun 2019 19:33:27 +0000 Original-Received: from localhost ([127.0.0.1]:49320 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1he2oJ-0005kl-JU for submit@debbugs.gnu.org; Thu, 20 Jun 2019 15:33:27 -0400 Original-Received: from mail-ot1-f44.google.com ([209.85.210.44]:40840) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1he2oH-0005kV-KP for 36312@debbugs.gnu.org; Thu, 20 Jun 2019 15:33:26 -0400 Original-Received: by mail-ot1-f44.google.com with SMTP id e8so3883749otl.7 for <36312@debbugs.gnu.org>; Thu, 20 Jun 2019 12:33:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=N9ifV3me4np3cXm3YkqVzBoo7cRattYOQyQMo3W1jtY=; b=qTJncQcPZPMfBYvGATkZxGQIrLBYdi5SPWJ80bxiqI8D0hPZL5mArlsOo6zmfctlO4 +ytE/btw7EIfto3lWHOnqoDZx6n4aYCrVk59te/EpWFWHFYAHyDmegKslSaTP2j6RDgx 0nGDw2TjnL/aJsAFuBm6nhl/P+/8r5R3CB+XaNDSOVj3yV/cJfHnmkxlvCFIsexMbRH3 alUg7BH6TbhwF/DBocnPmcdGvNsGjDJXosqa8tFeW9TDxwU6pV6LT2SQnQeTaUfyg3F/ 8MOXI69wUt9neG8L+31P0eQDv50RioQLcPL1rOeyIYRd8rID8QCHdyX/SN7pYjdvl5S6 j84Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=N9ifV3me4np3cXm3YkqVzBoo7cRattYOQyQMo3W1jtY=; b=J3fUnTcz74NSBcD+QGkl9DV8cdR3x2bCzpHmX/EOPz7sKifCyc1Oo50tm6ZQJOnaVf cWjzNRM0D/chCm49ClH645DKvj+2zF/wmtFNposlq4AARip0vXFh6bQcyij71G0XJ/VW YO3fH3YYxwJdKNIClY8xiwwnPfYVYKpfSUcevzfWomY9qhEGL9w14Ycd0pUXvAeswI8y kishdRcPiK0Rk8qtYNGx96kjqy8vxv7BAzOnpqwNLmZhBmQc2XlBXlbbtYfd+DfDqk9q U+3E0EUGb5Zh+V3XayQ9q5wo9sUzCOeO5RKPXpny1nvIJLcRX7Fhr2jALrUM8pGQbphW RQkQ== X-Gm-Message-State: APjAAAVxKUsqV6Hq22/3SsyRQA3jrtHmu0ZoThPkMZSf09ZngSncINrA aXxNPVgigswP+zL1q9zx1z1hxqis487BSCUVBpQ= X-Google-Smtp-Source: APXvYqzWtHD2jvkL3UtM0Ujf/ZCi5PmDd5abHkqP/7/KqNBjaC+k1h1y7MWudn71wZCxGMFE9Kdji0NYJjkMtn7u9IU= X-Received: by 2002:a9d:7284:: with SMTP id t4mr13500529otj.154.1561059199021; Thu, 20 Jun 2019 12:33:19 -0700 (PDT) In-Reply-To: <83pnn8p1nk.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:160913 Archived-At: On Thu, Jun 20, 2019 at 6:12 PM Eli Zaretskii wrote: > > From: Pip Cet > > Date: Thu, 20 Jun 2019 16:06:25 +0000 > > > > In emacs -Q, evaluate > > > > (let ((o (make-overlay (point) (point)))) > > (overlay-put o 'after-string (propertize " " 'display > > '(when (message "a") > > . "b")))) > > > > This causes a SIGABRT in the bidi stack code. > > Thanks. > > You do realize that calling 'message' in a display-spec form causes us > to re-enter redisplay in the middle of redisplay? I didn't even know > we allowed that, but there's something new about our display code to > learn every day. I did learn that today, and it's very puzzling. For starters, why do we allow '(when ...), but not '(eval ...)? And is it really a good idea to call code from redisplay? The reason I'm looking at this is that I wanted to define an image that changes color based on the face properties at point. It turns out you can do that by abusing a (when ...) spec (which I use to call real code in a (run-with-timer 0 nil ...), to avoid the issue of recursive redisplays etc.). It's very ugly, and I'm not sure what the best way to handle things would be; luckily, I'm not dependent on running on older or official Emacs versions, so I'm free to experiment. So far, what I'm thinking about is a hook that's run _after_ redisplay to let an overlay know that redisplay just happened and the face used for the text around the overlay changed. It's soon enough to change things and trigger another redisplay then, as far as I'm concerned. (There's some flickering, but for my application that's okay). But I'd appreciate any suggestions (the immediate application is to define character-like image-based glyphs that "look like text", but there might be others).