From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: "Staying in the same place" Date: Mon, 4 Apr 2016 17:36:29 -0700 (PDT) Message-ID: <29972ee1-15f4-40fc-86dd-fb2217aa158a@default> References: <87h9fhrxb3.fsf@red-bean.com> <87d1q5rw72.fsf@red-bean.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1459816633 21285 80.91.229.3 (5 Apr 2016 00:37:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 5 Apr 2016 00:37:13 +0000 (UTC) Cc: Karl Fogel , Stefan Monnier , emacs-devel@gnu.org To: John Wiegley , Lars Magne Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Apr 05 02:37:00 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1anEzM-0003DR-B3 for ged-emacs-devel@m.gmane.org; Tue, 05 Apr 2016 02:37:00 +0200 Original-Received: from localhost ([::1]:33622 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1anEzL-00034T-Bc for ged-emacs-devel@m.gmane.org; Mon, 04 Apr 2016 20:36:59 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51274) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1anEz7-000339-9C for emacs-devel@gnu.org; Mon, 04 Apr 2016 20:36:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1anEz2-0005OT-96 for emacs-devel@gnu.org; Mon, 04 Apr 2016 20:36:45 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:44309) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1anEz2-0005OO-17 for emacs-devel@gnu.org; Mon, 04 Apr 2016 20:36:40 -0400 Original-Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u350aWoP013168 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 5 Apr 2016 00:36:33 GMT Original-Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0021.oracle.com (8.13.8/8.13.8) with ESMTP id u350aVm6024632 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 5 Apr 2016 00:36:31 GMT Original-Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7]) by userv0121.oracle.com (8.13.8/8.13.8) with ESMTP id u350aUbX014070; Tue, 5 Apr 2016 00:36:30 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6744.5000 (x86)] X-Source-IP: userv0021.oracle.com [156.151.31.71] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 156.151.31.81 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:202728 Archived-At: > Basically, a "fuzzy position" is three things: >=20 > 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 >=20 > Seeing this as an abstract data type, the default would be: >=20 > #, 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.