Subject: Re: bug#16678: 24.3.50; REGRESSION: text selection is broken in Customize edit fields

From: Eli Zaretskii <[email-masked]>
Date: Fri, 07 Feb 2014 09:58:29 +0200

> Date: Thu, 6 Feb 2014 19:31:18 -0800 (PST)
> From: Drew Adams <[email-masked]>
> 
> emacs -Q
> 
> (defcustom foo '([next]) "" :type '(repeat sexp) :group 'edit)
> 
> M-x customize-option foo
> 
> In the edit field, try to select the current value, which is `[next]'.
> 
> Try to select it by dragging the mouse from start (left) to end (right).
> As soon as the mouse passes the last char, to select it too, the
> selection highlight disappears.
> 
> Try to select it using the keyboard to define the region: Put the cursor
> before the `[' and hit `C-SPC'.  Then use `C-e' to move the cursor past
> the `]'.  No region highlighting.  Try again, this time using `C-f' to
> advance across the text.  As soon as you move past the `]', the region
> highlighting disappears.
> 
> Users should have highlighting that shows them what text is selected -
> all of that text, including the last character.  This is a regression
> from Emacs 24.3, where selection worked normally.

If I highlight inside the edit field, everything works as expected.
That is instead of

  Put the cursor before the `[' and hit `C-SPC'

I do

  Put the cursor ON the `[' and hit `C-SPC'

then I get the expected behavior.

What is the purpose of highlighting outside of the edit field?