From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.help Subject: Re: [prettify-symbols-mode] Two consecutive matches don't work? Date: Wed, 18 May 2022 12:54:41 +0200 Message-ID: <875ym39k3d.fsf@gnu.org> References: <87czgb17ei.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26562"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.7.21; emacs 29.0.50 Cc: Joost , help-gnu-emacs@gnu.org To: Robert Pluim Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed May 18 13:08:57 2022 Return-path: Envelope-to: geh-help-gnu-emacs@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 1nrHY1-0006ib-F1 for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 18 May 2022 13:08:57 +0200 Original-Received: from localhost ([::1]:39722 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nrHXz-0002kw-W7 for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 18 May 2022 07:08:56 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49740) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nrHV2-0002fa-8f for help-gnu-emacs@gnu.org; Wed, 18 May 2022 07:05:55 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:54824) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nrHV1-0006dh-VR; Wed, 18 May 2022 07:05:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-reply-to:Date:Subject:To:From: References; bh=xk5WcOdnaIfKZ0Twhla4a/u2UETZBs8AaAJ931wrVXc=; b=johfIwpwgWrsmB WcmwHkrsxlzYwPMtVppyM8qkykzVcP8i+ST3cDWlsRkQ10MhzHfc9mndenJaYSB2RJdX8KJbzk1aw Iir1nC9Wt0xcZD8BhBLK778a3/PGUqmOTZo3BocGJ+Q9cYbuK84PTHUipGJ9zoz6V8876mDARTY+B axb3PjEBrDAxm08BKtLYJ773J5Yu9znzntUFuaTl1jrRXqIBW8RwysAf9Lxg/hniPF5KJEq8JbbUa MpwbE4y3yLKlnSQDmE7XvBEQUhz5Q4rQom7j4Vz6s1a+L3iNhVjtZ3oQ60IR/W6mPj1EAIqOW/ltT SHg9N12TEjaqltFrZu8A==; Original-Received: from auth2-smtp.messagingengine.com ([66.111.4.228]:44569) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nrHUu-0003lz-Ny; Wed, 18 May 2022 07:05:50 -0400 Original-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailauth.nyi.internal (Postfix) with ESMTP id 5872727C005A; Wed, 18 May 2022 07:05:44 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Wed, 18 May 2022 07:05:44 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrheelgdeffecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpehffgfhvfevufffjgfkgggtsehttdertddtredtnecuhfhrohhmpefvrghsshhi lhhoucfjohhrnhcuoehtshguhhesghhnuhdrohhrgheqnecuggftrfgrthhtvghrnhepud ejtdehuddvleffjeekteegvdehleehvdeufefhueekkeekhedvgfeggeffvefgnecuvehl uhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhrnhdomh gvshhmthhprghuthhhphgvrhhsohhnrghlihhthidqkeeijeefkeejkeegqdeifeehvdel kedqthhsughhpeepghhnuhdrohhrghesfhgrshhtmhgrihhlrdhfmh X-ME-Proxy: Feedback-ID: ib2b94485:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 18 May 2022 07:05:43 -0400 (EDT) In-reply-to: <87czgb17ei.fsf@gmail.com> X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:137301 Archived-At: Robert Pluim writes: > Joost> I'm dealing with some `.xml` files that contain data which uses the > Joost> sequence `< Joost> LESS-THAN sign needs to be encoded as `<`, yielding `<<!`. > > Joost> So I thought this would be the ideal use case for > Joost> `prettify-symbols-mode`. I added `("<" . ?<)` to > Joost> `prettify-symbols-alist` and activated the mode. > > Joost> Unfortunately, only the first `<` in each sequence is > Joost> prettified. This seems to be due to the fact that the second `<` is > Joost> followed by the exclamation mark: if I insert a space in between, > Joost> prettification works. > > Joost> Is there any way to remedy this? > > Looks like a bug to me. I tried "<<", but exhibits the same > behaviour. The problem is that in << (symbol-at-point) on the first < says "<" and on the second "<". I think there might be even two bugs: 1. nxml-mode: It feels wrong that < is considered a symbol. And that the closing ; isn't part of the symbol < seems also not correct. And why do < and > have symbol syntax. Wouldn't open/close paren be more appropriate? 2. prettify-symbols: It seems wrong that the second < is prettified because its not a single symbol but a symbol < plus the character ; which as punctuation syntax. Bye, Tassilo