GNU bug report logs -
#31376
26.0.50; print-charset-text-property not honored
Previous Next
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 #40 received at 31376 <at> debbugs.gnu.org (full text, mbox):
> From: Noam Postavsky <npostavs <at> gmail.com>
> Cc: handa <at> gnu.org, schwab <at> linux-m68k.org, 31376 <at> debbugs.gnu.org, eller.helmut <at> gmail.com
> Date: Sat, 12 May 2018 16:02:01 -0400
>
> Okay, how about this:
>
> >From eed29c8e7164cbc13df4d7b4e3974ae90d9ecb51 Mon Sep 17 00:00:00 2001
> From: Noam Postavsky <npostavs <at> gmail.com>
> Date: Fri, 11 May 2018 13:44:46 -0400
> Subject: [PATCH] Honor print-charset-text-property value of nil (Bug#31376)
>
> * src/print.c (print_check_string_charset_prop): Move check
> for nil Vprint_charset_text_property from here...
> (print_prune_string_charset): ... to here.
> (syms_of_print) <print-charset-text-property>: Clarify that any
> non-boolean values are treated the same as `default'.
> * doc/lispref/streams.texi (Output Variables): Add
> print-prune-string-charset.
Could we also have a couple of tests, including the original snippet
from Helmut that started this?
> +@defvar print-charset-text-property
> +This variable controls printing of `charset' text property on printing
> +a string. The value should be @code{nil}, @code{t}, or
> +@code{default}.
> +
> +If the value is @code{nil}, @code{charset} text properties are never
> +printed. If @code{t}, they are always printed. If the value is
> +@code{default}, print the text property @code{charset} only when the
> +value is different from what is guessed in the current charset
> +priorities. Values other than @code{nil} or @code{t} are treated the
> +same as @code{default}.
> +@end defvar
This LGTM, but the description of 'default' IMO is too
implementation-centric, which doesn't help the user in understanding
what to expect from that value. How about the variant below?
If the value is @code{default}, print only those @code{charset} text
properties that are ``unusual'' for the respective characters under
the current language environment. The @code{charset} property of a
character is considered unusual if its value is different from what
@code{char-charset} returns for that character.
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.