From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard M Stallman Newsgroups: gmane.emacs.devel Subject: Re: line-move-visual never set to nil? Date: Tue, 29 Jul 2008 23:46:56 -0400 Message-ID: References: <18571.25125.311010.324079@gargle.gargle.HOWL> <87od4k1nj5.fsf@stupidchicken.com> <1F7E32D0-7C19-4950-94DB-F6CD33A56EB0@gmail.com> <6161f3180807290043l2b0cc1as85a338204687f183@mail.gmail.com> <87y73kbvz3.fsf@stupidchicken.com> Reply-To: rms@gnu.org NNTP-Posting-Host: lo.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: ger.gmane.org 1217389717 8337 80.91.229.12 (30 Jul 2008 03:48:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 30 Jul 2008 03:48:37 +0000 (UTC) Cc: david.reitter@gmail.com, raman@users.sourceforge.net, monnier@iro.umontreal.ca, andrew.w.nosenko@gmail.com, emacs-devel@gnu.org To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 30 05:49:26 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KO2go-0006kH-EM for ged-emacs-devel@m.gmane.org; Wed, 30 Jul 2008 05:49:26 +0200 Original-Received: from localhost ([127.0.0.1]:50769 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KO2fu-0002EV-69 for ged-emacs-devel@m.gmane.org; Tue, 29 Jul 2008 23:48:30 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KO2fH-0001cO-6S for emacs-devel@gnu.org; Tue, 29 Jul 2008 23:47:51 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KO2fG-0001bb-G7 for emacs-devel@gnu.org; Tue, 29 Jul 2008 23:47:50 -0400 Original-Received: from [199.232.76.173] (port=42770 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KO2fG-0001bK-3T for emacs-devel@gnu.org; Tue, 29 Jul 2008 23:47:50 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]:51750) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KO2fG-0000W2-7w for emacs-devel@gnu.org; Tue, 29 Jul 2008 23:47:50 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1KO2eO-0008CI-If; Tue, 29 Jul 2008 23:46:56 -0400 In-reply-to: <87y73kbvz3.fsf@stupidchicken.com> (message from Chong Yidong on Tue, 29 Jul 2008 10:34:08 -0400) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) 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:101734 Archived-At: If a command normally moves by screen lines, making it do something different in a keyboard macro is incorrect. Why doesn't it work right in a keyboard macro? Is this because it uses data structures that are updated only by redisplay, and the keyboard macro does not redisplay? If that is the cause, these functions also are no use for other Lisp programs to call. Even when the user types commands by hand, Emacs may not redisplay if the machine falls behind. Using those facilities is the wrong implementation for these commands. The right solution is to implement the TODO item of functions similar to compute-motion, vertical-motion, and current-column, which take account of the width and height of characters and operate on positions expressed in floating point. These functions should look only at the buffer contents and the fonts, so they work regardless of whether the text has been displayed lately. If you implement these commands based on those functions, they will work reliably no matter where they are called from.