Subject: bug#37199: 27.0.50; widget-browse-at fails at the end of editable-field text

From: Mauro Aranda <[email-masked]>
Date: Tue, 27 Aug 2019 11:47:13 -0300

Hello.

When at the end of the text in an editable-field widget,
widget-browse-at doesn't browse the widget and instead prints a message
"Not a widget" in the echo area.

Steps to reproduce the bug, starting from emacs -Q:
1) Open a customize buffer, to customize an option that contains an
editable-field.  For example:
M-x customize-option RET tutorial-directory

2) Put point at the end of the text in the editable-field of the option
Tutorial Directory.  If you don't put point there with the click, make
sure to be at the end, by hitting C-e.  For example, type the following:
C-u 8 TAB C-e

3) Try to browse the widget at point, with M-x widget-browse-at
The "Not a widget" message is displayed.

However, if you do C-b one time, and then again M-x widget-browse-at,
you will be able to browse the widget at point.

In GNU Emacs 27.0.50 (build 5, i686-pc-linux-gnu, GTK+ Version 3.18.9)
 of 2019-08-27 built on the-blackbeard
Repository revision: 693e9be5871f4e9bcb1a4ecfe5a40e68f5433cc3
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.11906000
System Description: Ubuntu 16.04.6 LTS

Recent messages:
M-p is undefined
This is an editable text area.
Creating customization items...
Creating customization items ...done
Creating customization setup...done
Mark saved where search started
Mark set
Mark saved where search started
Saving file
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/wid-browse.el...
Wrote
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/wid-browse.el

Configured using:
 'configure CFLAGS=-O3'

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

Important settings:
  value of $LANG: en_US.utf8
  value of $XMODIFIERS:
  locale-coding-system: utf-8-unix

Major mode: Custom

Minor modes in effect:
  tooltip-mode: t
  global-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 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 misearch multi-isearch vc-git
diff-mode easy-mmode bug-reference tree-widget pp wid-browse time-date
subr-x 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 menu-bar rfn-eshadow isearch timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame 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 minibuffer 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 move-toolbar gtk x-toolkit x
multi-tty make-network-process emacs)

Memory information:
((conses 8 72328 8712)
 (symbols 24 8293 1)
 (strings 16 22023 3618)
 (string-bytes 1 677388)
 (vectors 8 13128)
 (vector-slots 4 158606 15190)
 (floats 8 30 44)
 (intervals 28 268 6)
 (buffers 564 15)
 (heap 1024 8431 746))