From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#16992: feature request: background images Date: Sat, 09 Nov 2024 09:44:39 +0200 Message-ID: <86ikswonq0.fsf@gnu.org> References: <531F9A02.5060504@beloved.name> <9a735b38-6f08-4450-8522-44442bdcc02c@imayhem.com> <86wmhfr35a.fsf@gnu.org> <17673493-4117-47a8-a18b-e49a236f1d00@imayhem.com> <86r07lohj1.fsf@gnu.org> <86ldxto8zo.fsf@gnu.org> <2057fdb9-6c0f-4a0f-8ae6-90129ca6df35@imayhem.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18977"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 16992@debbugs.gnu.org To: Cecilio Pardo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 09 08:47:29 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1t9gBt-0004mS-7u for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 09 Nov 2024 08:47:29 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t9gBU-0005o7-Po; Sat, 09 Nov 2024 02:47:05 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t9gBT-0005nw-8p for bug-gnu-emacs@gnu.org; Sat, 09 Nov 2024 02:47:03 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t9gBT-0000Rb-0R for bug-gnu-emacs@gnu.org; Sat, 09 Nov 2024 02:47:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:To:Subject; bh=V+VxU8rrCx8q1zO6mVdO7292ERUcjkEivTX0/8cXqGg=; b=jWRIKvsMvpC7gAjcgJ1jhVuSkpa1uE8tyTbQj71S2lsImKY568/MIfXoTu8v+LWHIz2KlWfJ9aDwbIPNVZAL0dWZH8Vp6tR9LQWwgtNQT0f3zAvEW6o2WStL78M4Ngy1G7CBN5fma9dRHIVUUO/jo5Bw3dD0JULwx8fmO2lgmH1fiOQXi/DKVqk2f/zE4BgITsM2EkAtE1hPYmZYKxl1NRq+hcZAaCut8Hhkr2HVoXsE9GrXtK2T6iCDDi3EXPnY+Y0BMopmRuTRecODDGKDvBpXPnl1PrlpmWwhnBx4/6BuaC7E9v9jcBI++axc6M5999X1QbJq5jeE5Aj4KBy0Pg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t9gBS-00064V-GJ for bug-gnu-emacs@gnu.org; Sat, 09 Nov 2024 02:47:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 09 Nov 2024 07:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16992 X-GNU-PR-Package: emacs Original-Received: via spool by 16992-submit@debbugs.gnu.org id=B16992.173113842123332 (code B ref 16992); Sat, 09 Nov 2024 07:47:02 +0000 Original-Received: (at 16992) by debbugs.gnu.org; 9 Nov 2024 07:47:01 +0000 Original-Received: from localhost ([127.0.0.1]:53226 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t9gBR-00064G-9V for submit@debbugs.gnu.org; Sat, 09 Nov 2024 02:47:01 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:60254) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t9gBN-000640-UZ for 16992@debbugs.gnu.org; Sat, 09 Nov 2024 02:46:59 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t9g9C-0000D1-48; Sat, 09 Nov 2024 02:44:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=V+VxU8rrCx8q1zO6mVdO7292ERUcjkEivTX0/8cXqGg=; b=FRAunC4wjC83 w7JVSDzJ4EBVUZLczAeNjcU79mtF0dO0EfvnWurgK9bII436L47Neoqy2li54BGvsjzZ8YpBByH0F aTlWVe7tDd0NB2yWiFWPqkfkK8Hl7sYmq1QToSQ/oz2NhIz5zZkB+iEPPwCMES4J6a+unMPVNVk9+ AkPtQi4IasRZnf2xWH32elrthevhdlLCy7zU5yfoRvC40Gorq/8jumuuvgvBj9f5h/muB0rJEcDy8 AfIJ/Ml0SSl2d84SySchUGPjsJ+rTS6fcW3NZxzD5rHIDADUByN7Ptj2x1LwOixKrgFKJryg79O0r 0+3dbpjYfRKydhFIPlXhFw==; In-Reply-To: <2057fdb9-6c0f-4a0f-8ae6-90129ca6df35@imayhem.com> (message from Cecilio Pardo on Fri, 8 Nov 2024 20:20:31 +0100) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:295095 Archived-At: > Date: Fri, 8 Nov 2024 20:20:31 +0100 > From: Cecilio Pardo > > On 08/11/2024 19:50, Eli Zaretskii wrote: > > So what is the Lisp API for drawing those "dynamic" things? AFAIU, > > you've only shown the API to set a single static background image. > > There is no lisp api yet. In this example the fill-column line is drawn > always, in the part that iterates through the windows. > > > Is the background image scrolled or isn't it? > > No. The background image is always fixed at this point. I could see use cases for optionally scrolling the background image as well. > > Those "dynamic" drawings are the most wanted feature that is currently > > missing. And the challenge is to implement them in a way that won't > > make redisplay significantly slower, e.g. due to disabled > > optimizations (like scrolling_window). > > Then let's drop the image thing for now and focus on this. We don't have to drop the background image feature. It has its place, IMO. But I think we should not consider it as a candidate for implementing dynamic drawings such as fill-column indicator. That should be a separate feature. > The two use cases I have right now imply just a series of vertical lines: > > - Lines fixed One to an x coordinate with an infinite height, for > fill-column. It is not fixed because its X coordinate is controlled from Lisp. In addition, if a buffer mixes LTR and RTL paragraphs, the indicator is shown sometimes on the right and sometimes on the left (because columns are counted right-to-left in an RTL paragraph). > - Segments distributed through the window for the indent-lines. > > We could have buffer local variables to define these lines. Yes. > What other features should we consider? Anything that needs some image to be drawn which partially or fully overlaps the usual buffer/string display. > Should we open a new bug report to discuss this? Probably. And I suggest to ask a question on emacs-devel. Over the years, there were quite a few requests for something like this, and there are several optional (mostly 3rd-party) packages which try to do this in Lisp (which require very complex Lisp code, and IMO look clunky and even unprofessional), so asking a question might bring additional interesting ideas for using this kind of functionality. Btw, all of these will need some way of enabling at least some redisplay optimizations, and at least for images which scroll together with the buffer that should be possible.