GNU bug report logs - #31376
26.0.50; print-charset-text-property not honored

Previous Next

Package: emacs;

Reported by: Helmut Eller <eller.helmut <at> gmail.com>

Date: Mon, 7 May 2018 06:50:02 UTC

Severity: normal

Tags: fixed, patch

Found in version 26.0.50

Fixed in version 27.1

Done: Noam Postavsky <npostavs <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #58 received at 31376 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Noam Postavsky <npostavs <at> gmail.com>
Cc: handa <at> gnu.org, 31376 <at> debbugs.gnu.org, schwab <at> linux-m68k.org,
 eller.helmut <at> gmail.com
Subject: Re: bug#31376: 26.0.50; print-charset-text-property not honored
Date: Tue, 15 May 2018 20:19:40 +0300
> From: Noam Postavsky <npostavs <at> gmail.com>
> Cc: handa <at> gnu.org,  31376 <at> debbugs.gnu.org,  schwab <at> linux-m68k.org,  eller.helmut <at> gmail.com
> Date: Mon, 14 May 2018 19:15:30 -0400
> 
> Eli Zaretskii <eliz <at> gnu.org> 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.




This bug report was last modified 7 years and 4 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.