unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#37901: 24.4; GNUS: gnus-group-customize breaks posting-style encoding
@ 2019-10-24 11:34 Sergey Organov
  2019-10-28 14:13 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: Sergey Organov @ 2019-10-24 11:34 UTC (permalink / raw)
  To: 37901

Hello,

Even though I report this for emacs 24.4, the code that is suspect[1] is
still there in git:master:b3b7451, so it's likely the bug is not yet
fixed.

To reproduce the bug starting from "emacs -Q":

M-x gnus<ENTER>
G V test<ENTER>
G p
C-k

... type to put some non-ASCII text into 'posting-style', e.g.:

((posting-style
  ("From" "Сергей Органов <sorganov@gmail.com>")))

C-c C-c
G c
<TAB> <TAB> <ENTER>  (or press <done> button with mouse)
G p

... and now I see:

((posting-style
  ("From" "\320\241\320\265\321\200\320\263\320\265\320\271 \320\236\321\200\320\263\320\260\320\275\320\276\320\262 <sorganov@gmail.com>")))

in the group parameters buffer, that is utterly broken.

[1] The suspect code is:

    ;; Encode values posting-style holds.
    (dolist (style (cdr (assq 'posting-style params)))
      (when (stringp (cadr style))
	(setcdr style (list (encode-coding-string (cadr style) 'utf-8)))))

in gnus-group-customize-done, and it has matching chunk:

      ;; Decode values posting-style holds.
      (dolist (style (cdr (assq 'posting-style values)))
	(when (stringp (cadr style))
	  (setcdr style (list (decode-coding-string (cadr style) 'utf-8)))))

in gnus-group-customize, though the latter seems to be harmless.

--

In GNU Emacs 24.4.1 (i586-pc-linux-gnu, GTK+ Version 3.14.5)
 of 2017-09-12 on x86-csail-01, modified by Debian
Windowing system distributor `The X.Org Foundation', version 11.0.11604000
System Description:	Debian GNU/Linux 8.11 (jessie)

Configured using:
 `configure --build i586-linux-gnu --prefix=/usr
 --sharedstatedir=/var/lib --libexecdir=/usr/lib
 --localstatedir=/var/lib --infodir=/usr/share/info
 --mandir=/usr/share/man --with-pop=yes
 --enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.4/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.4/site-lisp:/usr/share/emacs/site-lisp
 --build i586-linux-gnu --prefix=/usr --sharedstatedir=/var/lib
 --libexecdir=/usr/lib --localstatedir=/var/lib
 --infodir=/usr/share/info --mandir=/usr/share/man --with-pop=yes
 --enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.4/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.4/site-lisp:/usr/share/emacs/site-lisp
 --with-x=yes --with-x-toolkit=gtk3 --with-toolkit-scroll-bars
 'CFLAGS=-g -O2 -fstack-protector-strong -Wformat
 -Werror=format-security -Wall' CPPFLAGS=-D_FORTIFY_SOURCE=2
 LDFLAGS=-Wl,-z,relro'

Important settings:
  value of $LC_MONETARY: en_GB.utf8
  value of $LC_NUMERIC: en_GB.utf8
  value of $LC_TIME: en_GB.utf8
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
M-x r e p o r e t <backspace> <backspace> t = <backspace> 
- e , <tab> <backspace> m <tab> <return>

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util help-fns mail-prsvr mail-utils time-date tooltip electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar
dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode
prog-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax facemenu font-core frame cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev
minibuffer nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
dbusbind gfilenotify dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)

Memory information:
((conses 8 71854 6795)
 (symbols 24 17572 0)
 (miscs 20 40 146)
 (strings 16 9074 4534)
 (string-bytes 1 249887)
 (vectors 8 9550)
 (vector-slots 4 392865 5202)
 (floats 8 65 108)
 (intervals 28 217 22)
 (buffers 512 11)
 (heap 1024 34231 762))





^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#37901: 24.4; GNUS: gnus-group-customize breaks posting-style encoding
  2019-10-24 11:34 bug#37901: 24.4; GNUS: gnus-group-customize breaks posting-style encoding Sergey Organov
@ 2019-10-28 14:13 ` Lars Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2019-10-28 14:13 UTC (permalink / raw)
  To: Sergey Organov; +Cc: 37901

Sergey Organov <sorganov@gmail.com> writes:

> Even though I report this for emacs 24.4, the code that is suspect[1] is
> still there in git:master:b3b7451, so it's likely the bug is not yet
> fixed.

Yup, I'm still seeing this in Emacs 27.

> [1] The suspect code is:
>
>     ;; Encode values posting-style holds.
>     (dolist (style (cdr (assq 'posting-style params)))
>       (when (stringp (cadr style))
> 	(setcdr style (list (encode-coding-string (cadr style) 'utf-8)))))
>
> in gnus-group-customize-done, and it has matching chunk:
>
>       ;; Decode values posting-style holds.
>       (dolist (style (cdr (assq 'posting-style values)))
> 	(when (stringp (cadr style))
> 	  (setcdr style (list (decode-coding-string (cadr style) 'utf-8)))))
>
> in gnus-group-customize, though the latter seems to be harmless.

Thanks for tracking down the error.  Removing the code in [1] indeed
fixes the problem (I think it was necessary before when the .newsrc.eld
file wasn't utf-8, but now it's an error.  And I removed the latter
chunk, too.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-10-28 14:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-24 11:34 bug#37901: 24.4; GNUS: gnus-group-customize breaks posting-style encoding Sergey Organov
2019-10-28 14:13 ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).