From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?K=C3=A9vin_Le_Gouguec?= Newsgroups: gmane.emacs.devel Subject: Re: [RFC] Add :invisible face attribute Date: Sat, 21 Dec 2024 19:05:49 +0100 Message-ID: <87frmgq5c2.fsf@gmail.com> References: <20241218160813.31108-1-mina86@mina86.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29677"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: rms@gnu.org, emacs-devel@gnu.org To: Michal Nazarewicz Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Dec 21 19:06:50 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 1tP3sI-0007Xh-KT for ged-emacs-devel@m.gmane-mx.org; Sat, 21 Dec 2024 19:06:50 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tP3re-0005nY-64; Sat, 21 Dec 2024 13:06:10 -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 1tP3rc-0005nE-Ao for emacs-devel@gnu.org; Sat, 21 Dec 2024 13:06:08 -0500 Original-Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tP3rZ-00074Y-SW; Sat, 21 Dec 2024 13:06:08 -0500 Original-Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-436230de7a3so3559495e9.0; Sat, 21 Dec 2024 10:06:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734804363; x=1735409163; darn=gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=UdprtXrxYlqsodJMbHdlU8FILK/+adefZIbry7RjY1M=; b=XXX01Uh3gZOznRW9RGMjVMlLSwZBz3Eyct1eDz1d0QQmhfQFTyWyhARgzgkhkdb1V8 qukn6tDA0asH2fCYZJC16y892mfcKKkf8gLAw3Idco6+Uip9nDPixS7jEtnF5Vt0D1+Y qQlI5YdSrTjPLfaponeyeD9DYaIilqFTW8KiHKDI7Byx+zMg+SubsrBczFHsfC2NhCz6 ZFGDON1hYO4UnQVHwJMD+woBtm+cqiIHiMpxQ23KY5rMi1ha4a0VbHjrOSY8jUTAn2lk 7piu8lakKmCsstS6ROX2s4IRJghTFIvriOC61j7L9Zit10lbuP59v8VFamlCUxPCho1A oguw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734804363; x=1735409163; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=UdprtXrxYlqsodJMbHdlU8FILK/+adefZIbry7RjY1M=; b=TEpppinuLTU9x/+dtfGfSYPL3r++zpZD5YyGa9yyLAkhdqXgHCIC833eF9Dd+1bA8r Fzkm+IWcnTRG0MzMDZRRl5ok/jmdFS3gm5IOjzIUDftJ2b+P3F/If+53FYdqvvDZ/HXF OAj/XpsZ4w3mplvgd2q9WwKuAl1QYd8ZyOytU+6DR5PrLAY+4aRZCnnlD6XiJFbGLTLg CadHM2O9zI34Yy4aRSPTY5JJVFi0gnnZDC0WMGJjPh6KGz7lSyU9VQRdlJqJWvFVWkMP HjrEdlkyrv1hJP5F7KuaDaOgyD67KcFQeTIHml6bLodfTldhsX8koiOes18rv35QhepG 0V2w== X-Forwarded-Encrypted: i=1; AJvYcCXm/ddD8Mhz0wipIlp+k9xKBzUZ9SgXMXrNmSd9LsjVsWT9XX7m01uafTrwha9mfrGdjP37sZDL4TIEVA==@gnu.org X-Gm-Message-State: AOJu0YyABtlcGxpTBVNpPQsFU8LrxA0jZ5/6N96fpLumGpDfZGr5F4fb y7HgbquKXc+PnmyVkFIOmag95Rei3lfIemclb/uXb2cQ1tLNN+jJR0g16w== X-Gm-Gg: ASbGnctEXVlJFjy8CUXK7V4yaCKIRZ/AxItBZD185iu964nmMYXVbJACpc6XbTXk0Mt W+af+vndhS61xOb9FKea1iM6egei3rEuswQvU65rrqgi1EQ3fXWTWnrvEaMieAakRbJ/C6KAiCS EMGQmNFBxDO15OeU56OxSvHUeGKP4CdxtmTY4O9wr0nXePqNd+65uCsio5LpPDXVeO4x7+yXJs9 aFDPuCrZrF8mi5D4q73p+4f2Dv2ZhQOkr1d7Sd1CkfDrY9PE1JGWRas43vUtg== X-Google-Smtp-Source: AGHT+IE9AM4nrLe4I1IYyEV6N9hI23vv23YDMDcPX3ATJlUeOve6C2Y+5Mmy83Om5dQRtoUYVLJahg== X-Received: by 2002:a05:600c:4e8e:b0:434:f9c1:a5b1 with SMTP id 5b1f17b1804b1-43668642576mr25537465e9.3.1734804362874; Sat, 21 Dec 2024 10:06:02 -0800 (PST) Original-Received: from hirondell ([37.165.115.221]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43656a0b361sm115766365e9.0.2024.12.21.10.06.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Dec 2024 10:06:01 -0800 (PST) In-Reply-To: (Michal Nazarewicz's message of "Sat, 21 Dec 2024 17:09:26 +0100") Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=kevin.legouguec@gmail.com; helo=mail-wm1-x32f.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:326826 Archived-At: Michal Nazarewicz writes: > On Fri, Dec 20 2024, Richard Stallman wrote: >> > Introduce :invisible face attribute which makes foreground to be the >> > same as background rendering the text invisible; or when :invert-vid= eo >> > is also in effect, background is the same as foreground. >> >> Why is this feature worth having> What is useful about it? >> >> > Use it in Org mode for org-hide face eliminting the need for >> > org-find-invisible-foreground function. >> >> Ia that the sole benefit of this feature? >> I don't think it is sufficent reason to add the feature >> and write the changes to document it. > > Yes, the use-cases I=E2=80=99m aware of are around org-hide. To sum up: > * The feature would make org-hide easier as described above. > * It addresses two minor bugs with org-hide I=E2=80=99ve mentioned in the= other > mail. Drive-by idea, from another org-hide-leading-stars user who encounters the first bug occasionally (or rather, a variant thereof, when highlighting headings with faces like region or hl-line): Would it make sense to fix these bugs by making Org apply a '(display (space :width 1)) property on every star to hide? (Suggesting one prop per char, instead of prop'ing the whole prefix with a single (space :width N), since AFAIU that would prevent users from moving point within the prefix?) Possibly a hot air suggestion: not super familiar with display props, so they may have undesirable side-effects? Also not sure how to apply them & keep them updated "robustly". The current org-hide face is applied via font-lock so no extra bookkeeping required; '(elisp) Search-based Fontification' suggests font-lock does support applying arbitrary properties - and clearing them, using font-lock-extra-managed-props. This is completely armchair reading of the manual tho, never toyed with display properties. Mostly curious if this is something that could make sense in theory. AFAIU this "solution" would not address your second use-case anyway: > * For code outside of Emacs, it makes auto-dim-other-buffers slightly > more user friendly.