Subject: bug#41245: 27.0.91; Error clicking on a button in custom-mode in another window

From: Trevor Spiteri <[email-masked]>
Date: Wed, 13 May 2020 23:58:43 +0200

1. Run emacs -Q
2. Fill the *scratch* buffer with some text (350 characters is enough).
3. M-x customize-option-other-window abbrev-all-caps
4. C-x o (to switch back to *scratch* buffer window)
5. Click on "Toggle" button right next to "Abbrev All Caps"

The text " [ State ]: EDITED, shown value does not take effect until
you set or save it.\n" (81 characters including new line) is inserted at
point 298 in the scratch buffer, overwriting 29 characters in the
process. 298 is also the point at which the State button is drawn in the
custom buffer. The custom-mode window is also broken: the State button
now appears as regular text.

In GNU Emacs 27.0.91 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.24.20, cairo version 1.16.0)
of 2020-05-10 built on desktop
Repository revision: be0d1cac83d14596406571f9cb668031ec5675ac
Repository branch: emacs-27
Windowing system distributor 'Fedora Project', version 11.0.12008000
System Description: Fedora 32 (Workstation Edition)

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Creating customization items...
Creating customization items ...done
Creating customization setup...done
To install your edits, invoke [State] and choose the Set operation
Error running timer ‘custom-magic-reset’: (args-out-of-range #301 308)

Configured using:
'configure --prefix=/home/trevor/.local/opt/emacs --with-x-toolkit=gtk3
--with-cairo --with-xwidgets'

Configured features:
XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND GPM DBUS GSETTINGS GLIB NOTIFY
INOTIFY LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS XWIDGETS
LIBSYSTEMD JSON PDUMPER LCMS2 GMP

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_GB.utf8
value of $XMODIFIERS: @im=ibus
locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
tooltip-mode: t
global-eldoc-mode: t
eldoc-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

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
format-spec rfc822 mml mml-sec password-cache epa derived epg epg-config
gnus-util rmail rmail-loaddefs text-property-search time-date subr-x seq
byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047
rfc2045 ietf-drums mm-util mail-prsvr mail-utils thingatpt help-fns
radix-tree help-mode cus-edit easymenu cus-start cus-load wid-edit
cl-loaddefs cl-lib tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar
dnd fontset image regexp-opt fringe tabulated-list replace newcomment
text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar
rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core term/tty-colors frame minibuffer cl-generic
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray
cl-preloaded 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 threads dbusbind
inotify lcms2 dynamic-setting system-font-setting font-render-setting
xwidget-internal cairo move-toolbar gtk x-toolkit x multi-tty
make-network-process emacs)

Memory information:
((conses 16 66284 10277)
(symbols 48 7701 1)
(strings 32 20097 1479)
(string-bytes 1 624441)
(vectors 16 11596)
(vector-slots 8 144733 9362)
(floats 8 31 39)
(intervals 56 221 0)
(buffers 1000 13))