From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jim Porter Newsgroups: gmane.emacs.devel Subject: Re: [RFC] Add :invisible face attribute Date: Sat, 21 Dec 2024 10:52:29 -0800 Message-ID: <2ae2d194-e02b-bef5-653d-e6e720538d4b@gmail.com> References: <20241218160813.31108-1-mina86@mina86.com> <867c7xlyqp.fsf@gnu.org> <81970ad8-d2a4-eca6-d8cd-4092fbbac90d@gmail.com> <87msgoao1f.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38186"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , Michal Nazarewicz , emacs-devel@gnu.org To: Ihor Radchenko Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Dec 21 19:53:24 2024 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 1tP4bM-0009p9-JP for ged-emacs-devel@m.gmane-mx.org; Sat, 21 Dec 2024 19:53:24 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tP4aa-0005LA-AS; Sat, 21 Dec 2024 13:52:36 -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 1tP4aY-0005Kj-Cm for emacs-devel@gnu.org; Sat, 21 Dec 2024 13:52:34 -0500 Original-Received: from mail-pg1-x52a.google.com ([2607:f8b0:4864:20::52a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tP4aW-0004si-TH; Sat, 21 Dec 2024 13:52:34 -0500 Original-Received: by mail-pg1-x52a.google.com with SMTP id 41be03b00d2f7-7fd4c0220bbso2683312a12.0; Sat, 21 Dec 2024 10:52:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734807151; x=1735411951; darn=gnu.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=hT41R7uDYGSa6X8vsn4tfsNsj66Vt6MEt2U/NFDdiY4=; b=gZj0qGZENdc/zBg9Yf1RoIzgmf9ocS5kKGa7t8+UcvYRYzGbJ4MSgqdxzF+fRqugFw uczC9UOspzFb7DcTXO45J9VKSXys76kOXujYchuiVtOKfT+UGT0zkUwBhE9+kR1Hkc/O 4XLCMij9B5+AuyVX0gMKpfXsKkcbg4BdHMdhbWtbLSmqRZBhTbr05kVVNLa/qkok9wPO fF9P4q9aKgo49LsG5E/sFVBnuI52TWgIi4EeFzV0N2w+OL5eFavQc/XNWsm97i7MHy+w pjgO/VY/OKAEPhs7Mzgy1B2IoXE7V/N/szzl5nVo2Qngzo0PFiRZSmipstpIyxzAUzmH f8jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734807151; x=1735411951; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=hT41R7uDYGSa6X8vsn4tfsNsj66Vt6MEt2U/NFDdiY4=; b=cEJnpZq9JCG1vwRdbQVFjtHjXfh0/cdU7JU1HbsnNOhdk/QjsFKMpud7RaiSLC8VU7 e7Q63CDvWQNkKUcG+3yZUOoezkLL6KIfR6rWrae/GC7/gP3GOGlF8RP0zUulVJPpuyJe KEoq9DZG6Q6ODs0hlDXu+JvFcSU0nR5lD+UAThtGjBeUVDr/ZBPbs1594h5HMtZkbQc1 xELcFjoOIi7SF41u1U3jVb699ue5Ag9XqSheuW2tkBNmR0KagUK2kwoiHST1G5OfX1pM wU5IcDvMurLpeaC3FuZSiOQ8Ov8KgkGJ8R0jgx1qcUltPY8Gh/W7lzGJZpsTCIyoeZrE U3dw== X-Forwarded-Encrypted: i=1; AJvYcCVmwXg9fyge7QTGZBrOwIKARWkjIVx9eIN62jLUbyyNdBsR4s5VZbqBRlYNj2JtJR4P1yTIoHSUvPCWqA==@gnu.org X-Gm-Message-State: AOJu0Yy/jt2glzjcm2LVZExN/ZW4lSgsKZopHzo/nhJIWMObuJNasIFc qU3Y2GPJNv+3h+f9cSop7B2IdGyeYpxovmCYd8bXcv6c1YXdeFOk X-Gm-Gg: ASbGncuyH6Yt6MfhZpcoPNpih+YPrYyNG+QF2N9WzktmDvM6n1u1jNjRwNEb4vREJGX cSNBnF6HNoZao6gFV2CZOp/YbYlSHOICGiqGlHQO/GrTEDIM+AvX9+yi/iK9lqQsXLJVqsvIrwa HNMTRAcCIEobRhZhJxUQzoakGCFZwRarbG4yqqMp1zvRCUcv+qe0yEaneAJtuaYDT1ngeFmFMD8 mE4Mt7y0pPZk6ONXP7mzVBqe4DViDDCY45eFS0wkv90n8xqMg6J5mtVg89eNwG31GRZn6iLJosY eCP7Z1oqlbH+FpR9CRxnkVK4dvo12+KI8g== X-Google-Smtp-Source: AGHT+IGFX0qrGQ+uBUKEgEWnG9oOnr6YiVcvXLaCCqpFUywtFLTH9ZP0rBwt9DmuAlbNQlvpXOVcaw== X-Received: by 2002:a05:6a20:258e:b0:1db:e40d:5f89 with SMTP id adf61e73a8af0-1e5e07eed86mr11170336637.28.1734807150928; Sat, 21 Dec 2024 10:52:30 -0800 (PST) Original-Received: from [192.168.1.2] (syn-023-240-098-037.res.spectrum.com. [23.240.98.37]) by smtp.googlemail.com with ESMTPSA id d2e1a72fcca58-72aad8fb941sm5057291b3a.160.2024.12.21.10.52.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 21 Dec 2024 10:52:30 -0800 (PST) Content-Language: en-US In-Reply-To: <87msgoao1f.fsf@localhost> Received-SPF: pass client-ip=2607:f8b0:4864:20::52a; envelope-from=jporterbugs@gmail.com; helo=mail-pg1-x52a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:326831 Archived-At: On 12/21/2024 10:28 AM, Ihor Radchenko wrote: > Jim Porter writes: > >> I'm just brainstorming here, but could Org use a display spec with >> specified spaces[1] to make Emacs render a space of the appropriate >> width? That requires a bit of computation, but it's how >> 'visual-wrap-prefix-mode' and SHR handle (roughly) similar sorts of things. > > If one uses display spec, editing the text underneath will become > tricky. Org mode is first and foremost a text format and should remain > editable using normal text editing commands. Hmm. Doing a bit of testing in a scratch buffer, I think if each hidden character had its own display spec, editing seems to work ok. At least in the sense that I can delete each character like I'd expect. There might be other problems with this though, e.g. keeping the display specs updated, or performance issues... For a completely different idea, I seem to recall some discussion around an :opacity face attribute. That would be useful for themes, e.g. to de-emphasize some text by reducing the opacity, and then here we could just set the :opacity to zero. I can't find the thread about this, but I recall there being some debate about how it should work; for example, if instead we should support RGBA for :foreground.