From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#31376: 26.0.50; print-charset-text-property not honored Date: Tue, 15 May 2018 20:19:40 +0300 Message-ID: <83vabokf9v.fsf@gnu.org> References: <87d0y7ew2h.fsf@linux-m68k.org> <87603zmxna.fsf@gmail.com> <83mux6nws8.fsf@gnu.org> <837eoani9b.fsf@gnu.org> <871seglk1y.fsf@gmail.com> <83r2mflgkh.fsf@gnu.org> <87r2mfjtnd.fsf@gmail.com> <83lgcnl789.fsf@gnu.org> <87o9hjjqb9.fsf@gmail.com> <837eo6kxg3.fsf@gnu.org> <87lgclkewd.fsf@gmail.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1526404694 10052 195.159.176.226 (15 May 2018 17:18:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 15 May 2018 17:18:14 +0000 (UTC) Cc: 31376@debbugs.gnu.org, schwab@linux-m68k.org, eller.helmut@gmail.com To: Noam Postavsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue May 15 19:18:09 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fIdaR-0002UU-RS for geb-bug-gnu-emacs@m.gmane.org; Tue, 15 May 2018 19:18:07 +0200 Original-Received: from localhost ([::1]:49653 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fIdcY-0004kJ-Hz for geb-bug-gnu-emacs@m.gmane.org; Tue, 15 May 2018 13:20:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43669) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fIdcN-0004ja-J1 for bug-gnu-emacs@gnu.org; Tue, 15 May 2018 13:20:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fIdcI-0001fD-N2 for bug-gnu-emacs@gnu.org; Tue, 15 May 2018 13:20:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:56278) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fIdcI-0001f8-Ho for bug-gnu-emacs@gnu.org; Tue, 15 May 2018 13:20:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fIdcI-0007ED-8Z for bug-gnu-emacs@gnu.org; Tue, 15 May 2018 13:20:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 15 May 2018 17:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 31376 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 31376-submit@debbugs.gnu.org id=B31376.152640479727762 (code B ref 31376); Tue, 15 May 2018 17:20:02 +0000 Original-Received: (at 31376) by debbugs.gnu.org; 15 May 2018 17:19:57 +0000 Original-Received: from localhost ([127.0.0.1]:35942 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fIdcC-0007Di-JC for submit@debbugs.gnu.org; Tue, 15 May 2018 13:19:56 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:52628) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fIdcA-0007DV-Ft for 31376@debbugs.gnu.org; Tue, 15 May 2018 13:19:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fIdc0-0001Vv-5H for 31376@debbugs.gnu.org; Tue, 15 May 2018 13:19:49 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:37356) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fIdbp-0001GO-De; Tue, 15 May 2018 13:19:33 -0400 Original-Received: from [176.228.60.248] (port=2481 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fIdbo-0004V8-TG; Tue, 15 May 2018 13:19:33 -0400 In-reply-to: <87lgclkewd.fsf@gmail.com> (message from Noam Postavsky on Mon, 14 May 2018 19:15:30 -0400) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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: 208.118.235.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:146200 Archived-At: > From: Noam Postavsky > Cc: handa@gnu.org, 31376@debbugs.gnu.org, schwab@linux-m68k.org, eller.helmut@gmail.com > Date: Mon, 14 May 2018 19:15:30 -0400 > > Eli Zaretskii writes: > > > This seems to rely on some relationship between what char-charset > > returns and the car of charset-list, is that right? > > The idea is to take the first if it's not eq to what char-charset > returns, or the second otherwise (on the assumption that it's different > from the first). Perhaps clearer if I use cl-find: > > (defun print-tests--prints-with-charset-p (ch odd-charset) > "Return t if `prin1-to-string' prints CH with the `charset' property. > CH is propertized with a `charset' value according to > ODD-CHARSET: if nil, then use the one returned by `char-charset', > otherwise, use a different charset." > (integerp > (string-match > "charset" > (prin1-to-string > (propertize (string ch) > 'charset > (if odd-charset > (cl-find (char-charset ch) charset-list :test-not #'eq) > (char-charset ch))))))) Maybe I'm missing something, but the negation of the test seemed to be missing from the original code. But it was a hard day, so maybe my mind is foggy... Thanks.