From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.devel Subject: Re: problem of marker as position Date: Thu, 20 Nov 2003 12:41:16 -0700 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <3FBD18DC.2040504@yahoo.com> References: <200311190023.JAA14877@etlken.m17n.org> <200311190334.hAJ3Yo402428@raven.dms.auburn.edu> <200311201147.UAA17403@etlken.m17n.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1069357560 12062 80.91.224.253 (20 Nov 2003 19:46:00 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 20 Nov 2003 19:46:00 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Thu Nov 20 20:45:58 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AMukY-0001bG-00 for ; Thu, 20 Nov 2003 20:45:58 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1AMukX-0000wV-00 for ; Thu, 20 Nov 2003 20:45:58 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AMvfc-0000t2-7G for emacs-devel@quimby.gnus.org; Thu, 20 Nov 2003 15:44:56 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AMvdy-0000Ad-Aa for emacs-devel@gnu.org; Thu, 20 Nov 2003 15:43:14 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AMvdJ-0008KO-Vt for emacs-devel@gnu.org; Thu, 20 Nov 2003 15:43:05 -0500 Original-Received: from [80.91.224.249] (helo=main.gmane.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AMvdI-0008JH-UE for emacs-devel@gnu.org; Thu, 20 Nov 2003 15:42:33 -0500 Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1AMufr-0001hj-00 for ; Thu, 20 Nov 2003 20:41:07 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Received: from sea.gmane.org ([80.91.224.252]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AMufq-0001hZ-00 for ; Thu, 20 Nov 2003 20:41:06 +0100 Original-Received: from news by sea.gmane.org with local (Exim 3.35 #1 (Debian)) id 1AMufq-0002w3-00 for ; Thu, 20 Nov 2003 20:41:06 +0100 Original-Lines: 30 Original-X-Complaints-To: usenet@sea.gmane.org User-Agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2 X-Accept-Language: en-us X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:17977 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:17977 Robert J. Chassell wrote: > I am a native English speaker and, to my embarrassment, have been > confused. Extra explanation is useful, since the notion of marker > encompasses two different concepts: > > 1. a position within a buffer that relocates automatically when > text is inserted or deleted, > > 2. a specification of which buffer the position is within. > > My problem is that sometimes, I focus on concept # 2 when the person > writing the code focuses on concept # 1 --- I should, of course, focus > on both concepts, but forget. A better explanation would help me > remember. > > The two concepts cannot be separated because the position must be > within a particular buffer. Indeed. It would be interesting to add debugging code to marker.c (analagous to byte_char_debug_check) that would signal an error if any marker was being used as a position in a different buffer. If there aren't too many cases, it'd be simple to convert the references to the marker M to (marker-position M). Then the run-time check could be left in for Lisp programmers, dependent upon a variable (analgous to byte-debug-flag). -- Kevin Rodgers