From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Something is rotten with end-of-line and move-end-of-line Date: Fri, 25 Nov 2005 02:09:55 +0100 Message-ID: <85y83dleho.fsf@lola.goethe.zz> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1132881086 13214 80.91.229.2 (25 Nov 2005 01:11:26 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 25 Nov 2005 01:11:26 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 25 02:11:17 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EfS6X-0005aq-9c for ged-emacs-devel@m.gmane.org; Fri, 25 Nov 2005 02:10:21 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EfS6W-0002Qv-OT for ged-emacs-devel@m.gmane.org; Thu, 24 Nov 2005 20:10:20 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EfS6H-0002P8-Uk for emacs-devel@gnu.org; Thu, 24 Nov 2005 20:10:06 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EfS6G-0002O7-4l for emacs-devel@gnu.org; Thu, 24 Nov 2005 20:10:04 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EfS6G-0002Nz-0L for emacs-devel@gnu.org; Thu, 24 Nov 2005 20:10:04 -0500 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EfS6F-0003BN-UI for emacs-devel@gnu.org; Thu, 24 Nov 2005 20:10:04 -0500 Original-Received: from localhost ([127.0.0.1] helo=lola.goethe.zz) by fencepost.gnu.org with esmtp (Exim 4.34) id 1EfS63-0005Kr-8A for emacs-devel@gnu.org; Thu, 24 Nov 2005 20:09:56 -0500 Original-Received: by lola.goethe.zz (Postfix, from userid 1002) id AA5521CDCD81; Fri, 25 Nov 2005 02:09:55 +0100 (CET) Original-To: emacs-devel@gnu.org User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:46551 Archived-At: Here are the online docs: move-end-of-line is an interactive compiled Lisp function in `simple.el'. It is bound to C-e, . (move-end-of-line ARG) Move point to end of current line. With argument ARG not nil or 1, move forward ARG - 1 lines first. If point reaches the beginning or end of buffer, it stops there. To ignore intangibility, bind `inhibit-point-motion-hooks' to t. This command does not move point across a field boundary unless doing so would move beyond there to a different line; if ARG is nil or 1, and point starts at a field boundary, point does not move. To ignore field boundaries bind `inhibit-field-text-motion' to t. [back] end-of-line is an interactive built-in function in `C source code'. (end-of-line &optional N) Move point to end of current line. With argument N not nil or 1, move forward N - 1 lines first. If point reaches the beginning or end of buffer, it stops there. To ignore intangibility, bind `inhibit-point-motion-hooks' to t. This command does not move point across a field boundary unless doing so would move beyond there to a different line; if N is nil or 1, and point starts at a field boundary, point does not move. To ignore field boundaries bind `inhibit-field-text-motion' to t. Apart from the argument names, both functions have identical descriptions. However, move-end-of-line is quite complicated and implemented in Lisp. The DOC strings don't give the slightest clue about what might be different. It appears like move-end-of-line (which is bound to C-e) might have been intended for interactive use and behaves special with regard to field boundaries. However, since end-of-line-position and other things seem to behave special, too, according to their docs, it would appear that both tend to do the same thing, but differently. Personally, I'd prefer to have functions typically used in programs (like end-of-line-position and end-of-line) rather not heed field boundaries in order to save programmers from unexpected surprises. However this is supposed to be resolved: it does not appear to make much sense to have both move-end-of-line as well as end-of-line do exactly the same thing, one in Lisp, one in C. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum