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: prettify-symbols-mode, derived modes, and compose-region Date: Fri, 05 Mar 2021 10:14:50 -0500 Message-ID: References: <83k0qmzit9.fsf@gnu.org> <587ee071-985b-450a-2df7-0b4bb0f97b48@posteo.net> <83blbyysox.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="24451"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: d.williams@posteo.net, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Mar 05 16:35:55 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 1lICUd-0006EN-7c for ged-emacs-devel@m.gmane-mx.org; Fri, 05 Mar 2021 16:35:55 +0100 Original-Received: from localhost ([::1]:39730 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lICUc-00011q-94 for ged-emacs-devel@m.gmane-mx.org; Fri, 05 Mar 2021 10:35:54 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59560) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lICAM-0003SU-5r for emacs-devel@gnu.org; Fri, 05 Mar 2021 10:14:58 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:62855) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lICAJ-0001bN-PE; Fri, 05 Mar 2021 10:14:57 -0500 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 44C5B100250; Fri, 5 Mar 2021 10:14:53 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 889F9100225; Fri, 5 Mar 2021 10:14:51 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1614957291; bh=RdgKzgY9f+2gga9FdlbnCVeCtDXuCYp7wDsme0etrhs=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=dhX270QsyGCEdIPXyfLFDzB42R60v8ZltwfJlh0ZGDTvsLBZhlv600kgv5aDAkM8D m6Bi7THKz03HFtaqJ0YaUtWoxPpH4sZUVpeGWjKKUCdh1P0Fa3kxJi01A2nRROSHqD SMpPf5nkaqqnjuYmnwGpPWuyPbgLx2jPysohvjY6n1U9/BlHc5DZZhQoNAbIVCGJ1K pG2wb9p66Tid6FA6tvNs3cNSko/NO401L6KyI8T+96U1sEOcwTQJ4DrCDcqu5Z/63T r6XxU09mA1L9Pi2oWuHr4vqCj/iYNKLeHovCagWZI5PNvyPDerV1YCuBMQP9nVPM2I sWaoJLUgUkmdA== Original-Received: from alfajor (unknown [216.154.43.249]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 5383B12029D; Fri, 5 Mar 2021 10:14:51 -0500 (EST) In-Reply-To: <83blbyysox.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 05 Mar 2021 09:18:22 +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.23 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:266024 Archived-At: >> You should definitely try, but I suspect it's not going to work >> well: :align-to wants to get an "absolute" position of the position >> where the flexible space ends whereas in your case you only know how >> wide "char + space" should be, but you don't know at which absolute >> column "char" will happen to be displayed, so you can't know to which >> column to :align-to. > > If the width of the additional space is known, there's also the :width > display property. Indeed, there's `:width` but in the case under discussion the desired with of the space is something like `1 - width-of-previous-char`, IOW something ELisp can't know when it puts the text property. I think it would take something like a `width` property that is non-replacing (i.e. can be applied to non-spaces and doesn't hide the text to which it's applied). Stefan