From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Cl=C3=A9ment?= Pit-Claudel Newsgroups: gmane.emacs.bugs Subject: bug#38485: Customizing glyph widths Date: Wed, 4 Dec 2019 11:57:12 -0500 Message-ID: <478afae1-0080-c825-5a53-1bc8e897a1cc@gmail.com> References: <3183ba6c-6aea-fa25-bb32-7e5ff7c04ad6@gmail.com> <83y2vshyvn.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="229172"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.1 Cc: 38485@debbugs.gnu.org To: Eli Zaretskii , Yuan Fu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Dec 04 18:05:42 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1icY5t-000xRl-Pw for geb-bug-gnu-emacs@m.gmane.org; Wed, 04 Dec 2019 18:05:41 +0100 Original-Received: from localhost ([::1]:41594 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1icY5r-0004oh-JL for geb-bug-gnu-emacs@m.gmane.org; Wed, 04 Dec 2019 12:05:39 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41692) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1icXyY-00085C-8K for bug-gnu-emacs@gnu.org; Wed, 04 Dec 2019 11:58:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1icXyU-0007SF-6C for bug-gnu-emacs@gnu.org; Wed, 04 Dec 2019 11:58:06 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36600) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1icXyT-0007KE-Tw for bug-gnu-emacs@gnu.org; Wed, 04 Dec 2019 11:58:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1icXyT-0008HP-Rh for bug-gnu-emacs@gnu.org; Wed, 04 Dec 2019 11:58:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Cl=C3=A9ment?= Pit-Claudel Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 04 Dec 2019 16:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38485 X-GNU-PR-Package: emacs Original-Received: via spool by 38485-submit@debbugs.gnu.org id=B38485.157547864231779 (code B ref 38485); Wed, 04 Dec 2019 16:58:01 +0000 Original-Received: (at 38485) by debbugs.gnu.org; 4 Dec 2019 16:57:22 +0000 Original-Received: from localhost ([127.0.0.1]:42573 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1icXxq-0008GV-7J for submit@debbugs.gnu.org; Wed, 04 Dec 2019 11:57:22 -0500 Original-Received: from mail-qk1-f175.google.com ([209.85.222.175]:34298) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1icXxo-0008GG-LO for 38485@debbugs.gnu.org; Wed, 04 Dec 2019 11:57:21 -0500 Original-Received: by mail-qk1-f175.google.com with SMTP id d202so596403qkb.1 for <38485@debbugs.gnu.org>; Wed, 04 Dec 2019 08:57:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=3ty9XnrePs9k2Z/EDy+42Qxr8YJ6G8P49L9NVmN+Rck=; b=MA2/31lggM7cn9HPTgd4BzlHk+lOPOlR0AlnxVUIvai5EEVRWC1/MMzVfllvMY4/qe G4QPsHF8CxMsBQ37gVgMTSgPcLr9stdYFsxNw2FniQ6dSYSINgf3nOWadmRr+aPxhHTZ TU4lU1w38qk7IzULuXCb3uLJmsP5J27ix7110S8Mk2jXrI+HI09zBJYeSWBDm/zqC9Vm PHyNJ+eNt9NOMtMkFNJiFOpA1XkeUfStalZVCeuUiWfO4v+aGxbxvl66kJlSH7XUvX56 9HyCWr2bcYS/HW7hH6Y4ZMzwKIiZk6o4BdOWqeBeqbTeBvQ+0U5ZFjdm3brDSHj/h7Lt MugA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=3ty9XnrePs9k2Z/EDy+42Qxr8YJ6G8P49L9NVmN+Rck=; b=ToZZ/F0e2aKFbdYEtvpBgiBUdyY1/7vbUFKvCcapjmQ/K1/sltA7DqJLyea4le8+4J 22ClHT38Q4p9NZlTD8Kb2Ls2VbfKEK0/a7n2qXvvsjGjBfxk7DOyc2QK/f6frEYnYOH6 VRbyACaEZc2c63RK+luySVI1Axy1w8MjdKYbp9bvtinDVAR3dlFq2YJYLQk3BbuEPSr3 PDhl152YKaA0KRQwz48FQCK/hbg7gtqiIOTgKQ0r17DAJCmn/3giJDDqlhpe8XlGsgUT M5mjfwO53ufELSqe/1KVaEWL334CN6qvO+npBOZBMB6jqH7vVCA6CoC2H7E6YrC94Ian XJUQ== X-Gm-Message-State: APjAAAVjiLc7b3G/isZcSfucmqFnGW923KOf5CT/t3NMfuWarbtml61e Wmgj79+XOXMvgbyO6FOIzcsewLpf X-Google-Smtp-Source: APXvYqy2NjZfsocBiXBzW1RvQnA5++57qrtqNuVvUclIlO2nxg71Yk6OmHI08+kaGiDu9mSzgNVpbA== X-Received: by 2002:a05:620a:228:: with SMTP id u8mr4064576qkm.88.1575478633693; Wed, 04 Dec 2019 08:57:13 -0800 (PST) Original-Received: from ?IPv6:2603:400a:0:82c:fff1:4e82:4e43:cc9e? ([2603:400a:0:82c:fff1:4e82:4e43:cc9e]) by smtp.googlemail.com with ESMTPSA id y10sm3786530qky.6.2019.12.04.08.57.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 04 Dec 2019 08:57:13 -0800 (PST) In-Reply-To: <83y2vshyvn.fsf@gnu.org> Content-Language: en-GB X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:172841 Archived-At: On 2019-12-04 10:52, Eli Zaretskii wrote: > >> Now that I think of it, though, I could see the use for a text property. For example, prettify-symbols-mode could have an option to make each n-characters prettification n-characters wide, so that composing ~~> into ⟿ would produce a wide arrow occupying the exact same amount of space as the original uncomposed characters. > > So what kind of text property would that be, and where and how will it > come into play in the above scenario? I'm thinking something like `:display-width 3' or maybe `display-width "~~>"' (the former would mean "as wide as three spaces in the default font"; the later, "as wide as `~~>' in the default font"). These properties would be applied by prettify-symbols-mode in addition to composition. An interesting related feature is the ability to move the cursor inside composed characters. For example, when composing -> into →, assuming a font such as Fira code with a two-characters wide → symbol, it would be nice to be able to position the point in the middle of the composed symbol. I often have this problem in Emacs with ||; I compose it into ‖, but I sometimes want to type |a|, and in those cases I tend to type || then press left and type a, but this doesn't work when || has been composed into ‖. Other editors have this feature, but I'm not sure how they handle the distinction between a composition that shouldn't be "separable" (such as é = e + ') and one that should be (such as ↝ = ~ + >). Clément.