From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id AKudKgLWXGD/WwAAgWs5BA (envelope-from ) for ; Thu, 25 Mar 2021 19:27:14 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id UHQ4JgLWXGA5BAAAB5/wlQ (envelope-from ) for ; Thu, 25 Mar 2021 18:27:14 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 28D271552C for ; Thu, 25 Mar 2021 19:27:14 +0100 (CET) Received: from localhost ([::1]:54510 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lPUhM-0000Yg-KR for larch@yhetil.org; Thu, 25 Mar 2021 14:27:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43170) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lPUgS-0000XX-LG for emacs-orgmode@gnu.org; Thu, 25 Mar 2021 14:26:17 -0400 Received: from mout-p-202.mailbox.org ([80.241.56.172]:63174) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1lPUgF-0006A5-VN for emacs-orgmode@gnu.org; Thu, 25 Mar 2021 14:26:16 -0400 Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:105:465:1:2:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4F5tpJ1Q3wzQk02; Thu, 25 Mar 2021 19:26:00 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter04.heinlein-hosting.de (spamfilter04.heinlein-hosting.de [80.241.56.122]) (amavisd-new, port 10030) with ESMTP id NuntcwHhqWIU; Thu, 25 Mar 2021 19:25:55 +0100 (CET) From: leo@relevant-information.com To: emacs-orgmode@gnu.org Subject: [PATCH 0/1] Add option to delay fontification of source blocks Date: Thu, 25 Mar 2021 19:25:01 +0100 Message-Id: <20210325182502.107089-1-leo@relevant-information.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-MBO-SPAM-Probability: X-Rspamd-Score: -0.04 / 15.00 / 15.00 X-Rspamd-Queue-Id: 98A8117E5 X-Rspamd-UID: 6eedf8 Received-SPF: pass client-ip=80.241.56.172; envelope-from=leo@relevant-information.com; helo=mout-p-202.mailbox.org X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Leo Okawa Ericson Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1616696834; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=LYwcpTwKWYgekGJNPK9xQRu5lAisT8vyP4nMqqTC71c=; b=GKuwLKcyu8E9PDIlCV6Fc8atuS6WlfXNTYkUevFjQiIX7Pw1ZnQSbo4/l6E/shmDbJTrM/ oavY5YF1yo+J+Atq4VoNwKJPkAKMj8QCE7j/hiaIiBO8YObcRhuWCfdw7DIDUuAYq/ufF5 B0JdEquKFVcio03/KaPvLhFTt0Qj0hw7WhEPiuCCldbv3BzQz3yCsy9cbXvPeegCmZndUw Vr9ox0+U0BXGgZV8zG/+jNcQOa9tEzlpXfr/rsPdmsmAn1jXMg7JUaCwyIvE3fmgrKvlu8 IZ2IhcnPkBI9r6/hfqd27RQ6FlOamHNEedj7PCmgxkRGQtOf4YpQ3GDwTXcW2Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1616696834; a=rsa-sha256; cv=none; b=DXc80bOPNDnilOeLAMl0p0HzoGK0YiMP7WQXmFeuEJz4sJe/JaFX6QfxMeyHghUnb1xHUU aTchSiJ35+YSnKM1QUUYVTv1ZtObnOV+lKzna9PC4ReyUQvgKMtMALzGU8aaJJsyc+Idkj eFrayGYY/f5Jj1F1gvUWoyuUfVx/mttvjNlWPVtNeF+KwhI5mDq8+wuWKKjnR7BhdT0uwB EY9JKsTbmA5LkeGt5zAdS30Oc3CfGMGVgPL2berclYS1FAopu7f1BDfs4xz88nySZJp+qd 4it1mYZFF7IQS46ARGf00BZaIi3js0EYdz0gNAqxVeUHg0chqBgGEqFnFem2Sg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: 2.58 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 28D271552C X-Spam-Score: 2.58 X-Migadu-Scanner: scn0.migadu.com X-TUID: OGsdwonqd6bX From: Leo Okawa Ericson I tried sending this patch once before, but I think it got caught as spam so I'm trying this again. Fontification of long code blocks can be very slow. The patch (in the reply to this email) mitigates this by adding an option to delay the fontification after the user has become idle by using idle timers. This seems to be faster from my limited testing, but I'm not sure if something will go horribly wrong because of the timers. There is a trade-off in that there will be no syntax highlightinting when the user is typing. I don't know how to keep existing fontification so it would be great if somebody could share a solution to that. I have signed the copyright papers so that shouldn't be a problem. This is my first patch submission so any suggestions for improvement are welcome. Leo Okawa Ericson (1): org-src.el: Add option to delay fontification of source blocks lisp/org-src.el | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) -- 2.25.1