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: Tick Reduction Date: Fri, 19 Nov 2021 13:22:16 -0500 Message-ID: References: <87bl2hyzca.fsf@gnus.org> <835ysoursn.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22654"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: larsi@gnus.org, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Nov 19 19:29:37 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 1mo8dk-0005ij-MW for ged-emacs-devel@m.gmane-mx.org; Fri, 19 Nov 2021 19:29:36 +0100 Original-Received: from localhost ([::1]:56394 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mo8dj-0006c4-H2 for ged-emacs-devel@m.gmane-mx.org; Fri, 19 Nov 2021 13:29:35 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:37712) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mo8Xq-0005NT-Ip for emacs-devel@gnu.org; Fri, 19 Nov 2021 13:23:30 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:42910) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mo8Xn-0001sx-Qm; Fri, 19 Nov 2021 13:23:29 -0500 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 4EAB5440CF9; Fri, 19 Nov 2021 13:23:25 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id E8CB0440089; Fri, 19 Nov 2021 13:23:22 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1637346202; bh=JAXNFgTVINS3oOeUs8Y2febjvJs729XyXnTieHmoocI=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=bqueHiYpqso0/0ZqfoO14SrDUTlnRnd6OJ22GO9mxflcyUWNJ90y5KYUJbAjKjqvI d1rvMfHBqa1CM6ExlTg5RToXAaZP6WQ876fiDPrFtz7EWIKZeS3NRjQFH9UjSnM12v pFYv83e0EK+uTMwsrUhLychIacpCKrK0SpXnmbak+S2gHsjQ8kNjon+p1TrZ61nwPg zRulMsuobriWg4LLiGswF+W908YW4YfAlGh3T/4h5gNbokxGLwlixO6L9DuyJFRv9E acrsP9pMLEW98DISSdyGTUjeQCm1FX7C9Hub5GLDrgwnJ9Xrj3oRUD+8yx6I546pqC 7KDj2rjQDbDqw== Original-Received: from ceviche (modemcable085.122-83-70.mc.videotron.ca [70.83.122.85]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id C9BB51206B5; Fri, 19 Nov 2021 13:23:22 -0500 (EST) In-Reply-To: <835ysoursn.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 19 Nov 2021 16:46:32 +0200") 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.29 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:279768 Archived-At: >> Clearly, we would benefit from a formal markup language (and one which >> includes some way to align text into columns). > > AFAIU, markup is generally separate from layout, so aligning text is > not part of what markup is supposed to solve. Not sure what you mean: in order to know that the columns need to be aligned, the code that does the layout will need to be told about it by some markup. >> Note that for the column display, I think we actually need an >> extension to the current `space` thingy on the `display` property >> which is able to align columns even without the buffer's data >> telling the redisplay at which precise pixel position it should be >> aligned (instead it should just add space until the columns are >> visually aligned). > This goes against the very basics of how our display engine is > designed: Yup, I know :-( > it examines text one character at a time and makes layout > decisions as part of that examination. What you want would AFAIU > require the display engine perform layout of the entire window above > the line currently being laid out, before the layout of the current > line can be performed. AFAIK, the way the display engine works currently, when we process a given char at POS, we have already processed all the chars between `window-start` and POS, so I think we could handle the case of "align with some previous line" (with some non-trivial caveats since it means that future changes in that previous line would need to cause POS to be re-processed, which may require disabling some optimizations). Of course, to really auto-align columns, we can't just "align with some previous line", but we'd also need to align with some subsequent line, which means it can't be done in a single pass. Stefan