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: Mon, 14 May 2018 19:34:52 +0300 Message-ID: <837eo6kxg3.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> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1526315653 30640 195.159.176.226 (14 May 2018 16:34:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 14 May 2018 16:34:13 +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 Mon May 14 18:34:08 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 1fIGQH-0007oz-U9 for geb-bug-gnu-emacs@m.gmane.org; Mon, 14 May 2018 18:34:06 +0200 Original-Received: from localhost ([::1]:46927 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fIGSO-00049I-V7 for geb-bug-gnu-emacs@m.gmane.org; Mon, 14 May 2018 12:36:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57205) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fIGSD-00047p-9w for bug-gnu-emacs@gnu.org; Mon, 14 May 2018 12:36:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fIGSA-0002jm-1X for bug-gnu-emacs@gnu.org; Mon, 14 May 2018 12:36:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:54944) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fIGS9-0002jP-Tm for bug-gnu-emacs@gnu.org; Mon, 14 May 2018 12:36:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fIGS9-0008OF-Ns for bug-gnu-emacs@gnu.org; Mon, 14 May 2018 12:36:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 14 May 2018 16:36:01 +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.152631570332184 (code B ref 31376); Mon, 14 May 2018 16:36:01 +0000 Original-Received: (at 31376) by debbugs.gnu.org; 14 May 2018 16:35:03 +0000 Original-Received: from localhost ([127.0.0.1]:34608 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fIGRD-0008N2-KQ for submit@debbugs.gnu.org; Mon, 14 May 2018 12:35:03 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:37681) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fIGRB-0008M4-HZ for 31376@debbugs.gnu.org; Mon, 14 May 2018 12:35:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fIGR5-0002AJ-MB for 31376@debbugs.gnu.org; Mon, 14 May 2018 12:34:56 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:42203) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fIGQx-00026b-N4; Mon, 14 May 2018 12:34:47 -0400 Original-Received: from [176.228.60.248] (port=4871 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fIGQx-0000lJ-4X; Mon, 14 May 2018 12:34:47 -0400 In-reply-to: <87o9hjjqb9.fsf@gmail.com> (message from Noam Postavsky on Sun, 13 May 2018 15:42:02 -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:146174 Archived-At: > From: Noam Postavsky > Cc: handa@gnu.org, 31376@debbugs.gnu.org, schwab@linux-m68k.org, eller.helmut@gmail.com > Date: Sun, 13 May 2018 15:42:02 -0400 > > > We could mention this exception in the manual. > > Yeah, I think we should. Here's a new patch with updated manual and > tests. Thanks. One minor comment about the tests: > +(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 > + (car (if (eq (char-charset ch) (car charset-list)) > + charset-list > + (cdr charset-list))) > + (char-charset ch))))))) This seems to rely on some relationship between what char-charset returns and the car of charset-list, is that right? AFAIK, when ODD-CHARSET is non-nil, you want to propertize with a charset that is _different_ from what char-charset returns, but taking the first or the second member of charset-list doesn't guarantee that. It could work with the particular characters you used for the tests, but if this function is limited to such characters, we should document that in the doc string or comments, lest someone will try to expand the tests and will see strange failures. Thanks, I have no other comments.