From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: What's the best (i.e. least bad) way to re-redisplay? Date: Tue, 24 Aug 2021 18:43:04 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34418"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Aug 25 00:44:06 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mIf9K-0008gd-Lk for ged-emacs-devel@m.gmane-mx.org; Wed, 25 Aug 2021 00:44:06 +0200 Original-Received: from localhost ([::1]:32906 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mIf9J-0003V9-0y for ged-emacs-devel@m.gmane-mx.org; Tue, 24 Aug 2021 18:44:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41082) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mIf8W-0002kI-Pg for emacs-devel@gnu.org; Tue, 24 Aug 2021 18:43:16 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:7255) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mIf8U-0006xA-0c for emacs-devel@gnu.org; Tue, 24 Aug 2021 18:43:15 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 76CA8440FC9; Tue, 24 Aug 2021 18:43:11 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 0C30F440F63; Tue, 24 Aug 2021 18:43:06 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1629844986; bh=mBCgVHhbqRDkRl5ORJ5d+3odc3AeUgrKBBrO7UCwH8w=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=FghOTUX8DwyA8Hsa32rXxCq6s4d/SZ8gelYgNPZmeMTWjdzuJc3jspGu5mB3Hh4el +a1b0B9v9UJXQ4X1S20mxM/pDGpvglgwGWoMQscS2OLARWX90t68Y8DFuScTwu9Ov8 5SqC8AS/Ndt9fuFgm0UOQUydxi7rzDiABF9k3e2y2194LQGfAG948T+NMjVpz5M5a0 uOuhs9z1sDE9zdAe4jDmsRu4RyPNtNkURWH0NN0SsM9D3LrgnC8ayMlUOg5R43Xk/P cHjdlicUAkZ8QYbrKxUtQfvxFMf7LPCC0ETJaw88W/iSkrheU2YdTGiTP0HAaH4ZDM NAogMrka8MpJg== Original-Received: from alfajor (unknown [104.247.244.135]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id A653E120284; Tue, 24 Aug 2021 18:43:05 -0400 (EDT) In-Reply-To: (Alan Mackenzie's message of "Mon, 23 Aug 2021 18:41:59 +0000") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:272932 Archived-At: > The problem is, there will be occurences in the foreground window before > the one which triggered the fontification. Redisplay will already have > passed this earlier buffer position. So I need to trigger another > redisplay immediately after the current one. > > What is the least bad way of doing this? I think something along the lines of (run-with-timer 0 nil (lambda (buf) (with-current-buffer buf (font-lock-flush))) (current-buffer)) is the cleanest that comes to mind. Stefan