unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Kenichi Handa <handa@m17n.org>
Cc: emacs-devel@gnu.org
Subject: Re: problem of marker as position
Date: Thu, 20 Nov 2003 20:47:17 +0900 (JST)	[thread overview]
Message-ID: <200311201147.UAA17403@etlken.m17n.org> (raw)
In-Reply-To: <200311190334.hAJ3Yo402428@raven.dms.auburn.edu> (message from Luc Teirlinck on Tue, 18 Nov 2003 21:34:50 -0600 (CST))

In article <200311190334.hAJ3Yo402428@raven.dms.auburn.edu>, Luc Teirlinck <teirllm@dms.auburn.edu> 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 <teirllm@dms.auburn.edu> 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

  reply	other threads:[~2003-11-20 11:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-19  0:23 problem of marker as position Kenichi Handa
2003-11-19  3:34 ` Luc Teirlinck
2003-11-20 11:47   ` Kenichi Handa [this message]
2003-11-20 13:22     ` Robert J. Chassell
2003-11-20 19:41       ` Kevin Rodgers
2003-11-21  5:03     ` Luc Teirlinck
2003-11-19 16:00 ` Luc Teirlinck
2003-11-21  4:09 ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200311201147.UAA17403@etlken.m17n.org \
    --to=handa@m17n.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).