Subject: bug#16453: closed (Re: bug#16453: 24.3.50; Motion functions not respecting field boundaries as documented)

From: [email-masked] (GNU bug Tracking System)
Date: Wed, 05 Feb 2014 10:33:03 +0000

Your bug report

#16453: 24.3.50; Motion functions not respecting field boundaries as documented

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
16453: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16453
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#16453: 24.3.50; Motion functions not respecting field boundaries as documented
From: Bastien <[email-masked]>
To: Drew Adams <[email-masked]>
Cc: [email-masked]
Date: Wed, 05 Feb 2014 11:32:21 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi Drew,

Drew Adams <[email-masked]> writes:

>> While I'm waiting for a core maintainer to have a look at this,
>> can you test the patch and report any side-effect?
>
> No, sorry.  I don't build Emacs from C sources.  I would test
> a Lisp patch if one were available.  But you don't really need
> me to test it.  I think the bug report is pretty clear, and I'm
> sure you understand it OK.  If you are unsure, let me know.
> And thanks for working on this.

I committed the patch.  Now closing this bug.
Thanks for reporting this,

-- 
 Bastien

Subject: 24.3.50; Motion functions not respecting field boundaries as documented
From: Drew Adams <[email-masked]>
To: [email-masked]
Date: Wed, 15 Jan 2014 08:17:19 -0800 (PST)
List-Id: <debbugs-submit.debbugs.gnu.org>

(elisp) `Introduction to Minibuffers' says this:

 The text in the minibuffer always starts with the "prompt string",
 the text that was specified by the program that is using the minibuffer
 to tell the user what sort of input to type.  This text is marked
 read-only so you won't accidentally delete or change it.  It is also
 marked as a field (*note Fields::), so that certain motion functions,
 including `beginning-of-line', `forward-word', `forward-sentence', and
 `forward-paragraph', stop at the boundary between the prompt and the
 actual text.

So I would expect that `backward-word' and `backward-sexp' would stop at
the field boundary, which is the end of the prompt.  `beginning-of-line'
does indeed do this, as the doc suggests.  But `backward-word' and
`backward-sexp', at least, do not - they move backward into the prompt.

Seems like this is the wrong behavior, and the doc describes the right
behavior.  But perhaps it is the other way around and this is a doc bug.

FWIW, I noticed this because I use a different Lisp symbol completion
function in the minibuffer.  It moves `backward-sexp' and later tries to
delete the text corresponding to the symbol prefix to be completed.  If
that prefix is empty then it raises the error of attempting to modify
read-only text.  If `backward-sexp' did what the doc says then it would
not leave the field and enter the prompt.  This is not important to the
bug report - just mentioning how I happened to notice this.

In GNU Emacs 24.3.50.1 (i686-pc-mingw32)
 of 2014-01-07 on ODIEONE
Bzr revision: 115916 [email-masked]
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --prefix=/c/Devel/emacs/binary --enable-checking=yes,glyphs
 'CFLAGS=-O0 -g3' LDFLAGS=-Lc:/Devel/emacs/lib
 CPPFLAGS=-Ic:/Devel/emacs/include'