all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: John Wiegley <jwiegley@gmail.com>,
	Lars Magne Ingebrigtsen <larsi@gnus.org>
Cc: Karl Fogel <kfogel@red-bean.com>,
	Stefan Monnier <monnier@IRO.UMontreal.CA>,
	emacs-devel@gnu.org
Subject: RE: "Staying in the same place"
Date: Mon, 4 Apr 2016 17:36:29 -0700 (PDT)	[thread overview]
Message-ID: <29972ee1-15f4-40fc-86dd-fb2217aa158a@default> (raw)
In-Reply-To: <m2twjh6jul.fsf@newartisans.com>

> Basically, a "fuzzy position" is three things:
> 
>     Some internal value, potentially unique to each mode
>     A method to return such a value based on point
>     A method to restore point based on such a value
> 
> Seeing this as an abstract data type, the default would be:
> 
>     #<marker>, point-marker, goto-char

Actually, the default for a bookmark is:

1. A general context, such as a file or buffer (e.g. an absolute
   file name or a buffer name).

2. A position within that context (e.g. a buffer position).

3. Some context text immediately after the position.

4. Some context text immediately before the position.

5. A handler function that accepts the bookmark as argument
   and returns point to the place that was bookmarked.

The default handler goes first to the recorded position.
It then searches forward for the after-position context text.
It then searches backward for the before-position context text.

The point is to try to accommodate changes to the file or buffer
text, i.e., to return to the most appropriate place that can be
found.

Special kinds of bookmarks (Info, Dired, `man', etc.) use special
handler functions.





      reply	other threads:[~2016-04-05  0:36 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-04  5:40 "Staying in the same place" Lars Magne Ingebrigtsen
2016-04-04  6:09 ` Lars Magne Ingebrigtsen
2016-04-04  7:28   ` Daniel McClanahan
2016-04-04 12:51 ` Stefan Monnier
2016-04-04 18:19   ` Lars Magne Ingebrigtsen
2016-04-04 18:36     ` Stefan Monnier
2016-04-04 18:42       ` Lars Magne Ingebrigtsen
2016-04-04 19:25         ` Karl Fogel
2016-04-04 19:43           ` Lars Magne Ingebrigtsen
2016-04-04 19:49             ` Karl Fogel
2016-04-04 19:52               ` Lars Magne Ingebrigtsen
2016-04-04 23:21                 ` John Wiegley
2016-04-05  0:36                   ` Drew Adams [this message]

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

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

  git send-email \
    --in-reply-to=29972ee1-15f4-40fc-86dd-fb2217aa158a@default \
    --to=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    --cc=jwiegley@gmail.com \
    --cc=kfogel@red-bean.com \
    --cc=larsi@gnus.org \
    --cc=monnier@IRO.UMontreal.CA \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.