From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: D Newsgroups: gmane.emacs.devel Subject: Re: prettify-symbols-mode, derived modes, and compose-region Date: Fri, 5 Mar 2021 01:22:30 +0100 Message-ID: <587ee071-985b-450a-2df7-0b4bb0f97b48@posteo.net> References: <83k0qmzit9.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10390"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 Cc: 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 01:24:17 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 1lHyGP-0002d1-Di for ged-emacs-devel@m.gmane-mx.org; Fri, 05 Mar 2021 01:24:17 +0100 Original-Received: from localhost ([::1]:37294 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lHyGO-0005NT-FP for ged-emacs-devel@m.gmane-mx.org; Thu, 04 Mar 2021 19:24:16 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51414) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lHyEm-00040I-Uq for emacs-devel@gnu.org; Thu, 04 Mar 2021 19:22:36 -0500 Original-Received: from mout02.posteo.de ([185.67.36.66]:55871) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lHyEk-00067s-Di for emacs-devel@gnu.org; Thu, 04 Mar 2021 19:22:36 -0500 Original-Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id F02182400FB for ; Fri, 5 Mar 2021 01:22:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1614903752; bh=h4HrFEzdTkJmBFntVAGL1MadCMb4kkdty//cgmtkLT0=; h=Subject:To:Cc:From:Date:From; b=OHxo5IwDidGHruiJvlIOq0qXe6sqpy3Z0UfXa4IFCwgP0WYqvEwmmnZ31NCNJoLer vvUDjAkTRN2NvDPhYpb2qwohoSi9QOH73uqlfhqgid38uMGr1HO2I3haBD7u19h/LG O5Z0P3Ocp6kbn9tRwTJ+CldPvH3Rv5rl4X5NZydmddMIwYuWKpqPQpV1RXT2HuSNJL LcVKDgrxhsgffxJovIXR3hnheCBaenljLoJKNUwbyoJeRzicw3ZNWDHjSXbd/uJRkU K9eH00sQGtiNjSyK0usdmttPdmt+96V5tDk/cMuMcwAyfKK0X3zSf7tQBMrUdbNAjT JFujoDtgs4kSg== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Ds7jM3JK0z6tmL; Fri, 5 Mar 2021 01:22:31 +0100 (CET) In-Reply-To: <83k0qmzit9.fsf@gnu.org> Content-Language: en-US Received-SPF: pass client-ip=185.67.36.66; envelope-from=d.williams@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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:265998 Archived-At: > I'm not sure I understand the problem, but can't you use :align-to in > display properties to solve the alignment issues? To provide a concrete example, consider the following (closed) issue: https://github.com/integral-dw/org-superstar-mode/issues/9 The data structure org-superstar-todo-bullet-alist associates a todo keyword with a character to be displayed. The image shows the alignment problem. The compose-region solution to this is simply to compose each character with a wide enough space, so the user simply has to use "\N{EM SPACE}" instead of ? in the alist. compose-region will then just superimpose the two and you get a "padded" character. It is very much possible that :align-to could fix this as well, judging from the documentation it does sound like it can reproduce this feature easily. To see how well it works out I would likely have to implement a display-based version first, though. On a side note: Are there any quirks I should be aware of when transitioning to the display property? I doubt there will be any difference in terms of performance (contrast overlays, which my mode can't afford use), but is there anything else I should be aware of? I'm asking in case there have been efforts like mine in the past which I am not aware of.