From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Thomas A. Horsley" Newsgroups: gmane.emacs.bugs Subject: minibuffer-prompt-end badly named Date: Tue, 13 Aug 2002 01:37:25 +0000 Sender: bug-gnu-emacs-admin@gnu.org Message-ID: <20020813013725.QILD11162.mtiwmhc22.worldnet.att.net@SPIKE.att.net> Reply-To: tom.horsley@att.net NNTP-Posting-Host: localhost.gmane.org X-Trace: main.gmane.org 1029202635 26038 127.0.0.1 (13 Aug 2002 01:37:15 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 13 Aug 2002 01:37:15 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17eQcT-0006ld-00 for ; Tue, 13 Aug 2002 03:37:13 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17eQdM-00069C-00; Mon, 12 Aug 2002 21:38:08 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17eQci-000679-00 for bug-gnu-emacs@gnu.org; Mon, 12 Aug 2002 21:37:28 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17eQcg-00066x-00 for bug-gnu-emacs@gnu.org; Mon, 12 Aug 2002 21:37:27 -0400 Original-Received: from mtiwmhc22.worldnet.att.net ([204.127.131.47]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17eQcg-00066s-00 for bug-gnu-emacs@gnu.org; Mon, 12 Aug 2002 21:37:26 -0400 Original-Received: from SPIKE.att.net ([24.54.160.28]) by mtiwmhc22.worldnet.att.net (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020813013725.QILD11162.mtiwmhc22.worldnet.att.net@SPIKE.att.net> for ; Tue, 13 Aug 2002 01:37:25 +0000 Original-To: bug-gnu-emacs@gnu.org Errors-To: bug-gnu-emacs-admin@gnu.org X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.bugs:3204 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:3204 This bug report will be sent to the Free Software Foundation, not to your local site managers! Please write in English, because the Emacs maintainers do not have translators to read other languages for them. Your bug report will be posted to the bug-gnu-emacs@gnu.org mailing list, and to the gnu.emacs.bug news group. In GNU Emacs 21.2.1 (i386-msvc-nt5.1.2600) of 2002-03-19 on buffy configured using `configure --with-msvc (12.00)' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: ENU locale-coding-system: iso-latin-1 default-enable-multibyte-characters: nil Please describe exactly what actions triggered the bug and the precise symptoms of the bug: While attempting to port all my custom lisp code that navigates around buffers so it works correctly in the minibuffer, I started using things like (minibuffer-prompt-end) instead of (point-min). This worked until I tried using some of these functions in shell buffers. The function minibuffer-prompt-end (and all the other related functions added for emacs21) are very badly documented. Just looking at prompt-end: (defun minibuffer-prompt-end () "Return the buffer position of the end of the minibuffer prompt. Return (point-min) if current buffer is not a mini-buffer." (field-beginning (point-max))) It *claims* to work one way in the minibuffer and another way in all other buffers, but in reality, all it does is work one way for buffers with text fields and another way for buffers without text fields. Since lots of buffers use text fields (comint, to pick a popular one), this will have strange and wondrous behavior if you write code while believing the documentation. In fact, it would really be useful to have functions that work the way minibuffer-prompt-end and friends are documented to work, but unfortunately, they don't work that way :-(. Speaking of which, how the devil do you tell if the current buffer is a minibuffer? Recent input: c y SPC c y SPC c y SPC c y SPC c y SPC c y SPC c y SPC c y SPC c y SPC c y SPC SPC SPC SPC c y SPC c y C-u 9 9 c y q y r e p o r t - b u g a p r o p o s r e p o r t . * b u g r e p o r t - e m a c Recent messages: No more newsgroups [76 times] No more unread newsgroups Wrote f:/users/tom/.newsrc Saving f:/users/tom/.newsrc.eld... Wrote f:/users/tom/.newsrc.eld Saving f:/users/tom/.newsrc.eld...done call-interactively: Quit Loading emacsbug...done -- >>==>> The *Best* political site >>==+ email: Tom.Horsley@worldnet.att.net icbm: Delray Beach, FL | Free Software and Politics <<==+