From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Alfred M. Szmidt" Newsgroups: gmane.emacs.devel Subject: Re: prettify symbols question Date: Thu, 12 Nov 2020 10:17:05 -0500 Message-ID: References: <834kluzkma.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31387"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Nov 12 16:17:44 2020 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 1kdEM4-00081v-DR for ged-emacs-devel@m.gmane-mx.org; Thu, 12 Nov 2020 16:17:44 +0100 Original-Received: from localhost ([::1]:59454 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kdEM3-0001PZ-Ff for ged-emacs-devel@m.gmane-mx.org; Thu, 12 Nov 2020 10:17:43 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50992) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kdELS-0000qD-RW for emacs-devel@gnu.org; Thu, 12 Nov 2020 10:17:06 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:53963) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kdELS-0000HJ-J5 for emacs-devel@gnu.org; Thu, 12 Nov 2020 10:17:06 -0500 Original-Received: from ams by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1kdELR-0006Eo-TO; Thu, 12 Nov 2020 10:17:06 -0500 In-Reply-To: <834kluzkma.fsf@gnu.org> (message from Eli Zaretskii on Thu, 12 Nov 2020 16:59:41 +0200) 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:259086 Archived-At: > What would the proper way to handle say #o210 in prettify-symbols? > > I've attached a simple test, I would expect to see the #o210 sequence > in the file to be shown as a unicode lambda, but nothing changes -- I > suspect it is due to some encoding mismatch between the buffer and the > string. prettify-symbols-mode doesn't act on text in comments, see 'prettify-symbols-default-compose-p'. If you move your #o210 out of the comment, it should get displayed as you expect. Ah, that explains some. You can replace 'prettify-symbols-default-compose-p' with your own function, and set up 'prettify-symbols-compose-predicate' to use it instead of the default predicate, if you want to prettify stuff in comments. Thank you for the tip, that will be useful (I need this to act on all sequences even in symbols). If the above doesn't work, then maybe it _is_ related to encoding. What does the mode line say about 'buffer-file-coding-system when' you visit this file? So when the buffer-file-coding-system is utf-8-unix everything works (where also the sequence is not acted on in comments). But when the buffer is raw-text-unix, it does not work for #o210, but works for say #o10. Some multi-byte thing going on?