From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel Subject: Re: problem of marker as position Date: Thu, 20 Nov 2003 20:47:17 +0900 (JST) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200311201147.UAA17403@etlken.m17n.org> References: <200311190023.JAA14877@etlken.m17n.org> <200311190334.hAJ3Yo402428@raven.dms.auburn.edu> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII X-Trace: sea.gmane.org 1069328946 3729 80.91.224.253 (20 Nov 2003 11:49:06 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 20 Nov 2003 11:49:06 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Thu Nov 20 12:49:03 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 1AMnJ1-0001oi-00 for ; Thu, 20 Nov 2003 12:49:03 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1AMnJ0-0003l9-00 for ; Thu, 20 Nov 2003 12:49:03 +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 1AMoFt-0004jn-3h for emacs-devel@quimby.gnus.org; Thu, 20 Nov 2003 07:49:53 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AMoFR-0004jN-Uf for emacs-devel@gnu.org; Thu, 20 Nov 2003 07:49:25 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AMoEv-0004ZG-Lv for emacs-devel@gnu.org; Thu, 20 Nov 2003 07:49:24 -0500 Original-Received: from [192.47.44.130] (helo=tsukuba.m17n.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AMoEu-0004Yx-Rd for emacs-devel@gnu.org; Thu, 20 Nov 2003 07:48:53 -0500 Original-Received: from fs.m17n.org (fs.m17n.org [192.47.44.2]) by tsukuba.m17n.org (8.11.6p2/3.7W-20010518204228) with ESMTP id hAKBlIh23004; Thu, 20 Nov 2003 20:47:18 +0900 (JST) (envelope-from handa@m17n.org) Original-Received: from etlken.m17n.org (etlken.m17n.org [192.47.44.125]) by fs.m17n.org (8.11.6/3.7W-20010823150639) with ESMTP id hAKBlHs07141; Thu, 20 Nov 2003 20:47:17 +0900 (JST) Original-Received: (from handa@localhost) by etlken.m17n.org (8.8.8+Sun/3.7W-2001040620) id UAA17403; Thu, 20 Nov 2003 20:47:17 +0900 (JST) Original-To: teirllm@dms.auburn.edu In-reply-to: <200311190334.hAJ3Yo402428@raven.dms.auburn.edu> (message from Luc Teirlinck on Tue, 18 Nov 2003 21:34:50 -0600 (CST)) User-Agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/21.3 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI) 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:17958 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:17958 In article <200311190334.hAJ3Yo402428@raven.dms.auburn.edu>, Luc Teirlinck writes: > Ken'ichi Handa wrote: > I've just noticed that (char-after MARKER) returns a > character in the current buffer even if the buffer of MARKER > is the different one. I think all such functions that > accept a marker as a position ignores the buffer infomation > of the marker. > To me that is exactly what is _meant_ by using a marker "as a > position". A function could also accept a marker "as a buffer", by > ignoring the position, or "truly as a marker", by using both. I didn't read this paragraph (int the node Positions) as above. Positions are usually represented as integers starting from 1, but can also be represented as "markers"--special objects that relocate automatically when text is inserted or deleted so they stay with the surrounding characters. See *Note Markers::. But, as I'm not native English, if your understanding is natural, I don't insist on adding the extra explanation in info. Luc Teirlinck writes: > Maybe, if this does need clarifying, it might be better to do it in > (elisp)Overview of Markers instead of (not in addition to) in > (elisp)Positions, anyway: [...] > ! A marker specifies a buffer and a position in that buffer. The > ! marker can be used to represent a position in the functions that > ! require one, just as an integer could be used. In that case, the > ! marker's buffer is normally ignored. Of course, a marker used in this > ! way usually points to a position in the buffer that the function > ! operates on, but that is entirely the programmer's responsibility. > ! @xref{Positions}, for a complete description of positions. I agree. I'll leave the decision of adding it or not to your discretion. --- Ken'ichi HANDA handa@m17n.org