From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thorsten Jolitz Newsgroups: gmane.emacs.help Subject: Re: erase-buffer and marker-position Date: Tue, 26 Feb 2013 05:50:26 +0100 Message-ID: <87sj4jn0fh.fsf@gmail.com> References: <87621fogsd.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1361854243 2321 80.91.229.3 (26 Feb 2013 04:50:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 26 Feb 2013 04:50:43 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Feb 26 05:51:06 2013 Return-path: Envelope-to: geh-help-gnu-emacs@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 1UACVN-0000LS-2N for geh-help-gnu-emacs@m.gmane.org; Tue, 26 Feb 2013 05:51:05 +0100 Original-Received: from localhost ([::1]:52470 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UACV2-0007qV-CG for geh-help-gnu-emacs@m.gmane.org; Mon, 25 Feb 2013 23:50:44 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:54739) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UACUw-0007qP-Lk for help-gnu-emacs@gnu.org; Mon, 25 Feb 2013 23:50:40 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UACUv-0006kr-39 for help-gnu-emacs@gnu.org; Mon, 25 Feb 2013 23:50:38 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:36586) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UACUu-0006kc-TO for help-gnu-emacs@gnu.org; Mon, 25 Feb 2013 23:50:37 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UACVE-0000H6-8u for help-gnu-emacs@gnu.org; Tue, 26 Feb 2013 05:50:56 +0100 Original-Received: from g231233014.adsl.alicedsl.de ([92.231.233.14]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 26 Feb 2013 05:50:56 +0100 Original-Received: from tjolitz by g231233014.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 26 Feb 2013 05:50:56 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 17 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: g231233014.adsl.alicedsl.de User-Agent: Gnus/5.130002 (Ma Gnus v0.2) Emacs/24.2 (gnu/linux) Cancel-Lock: sha1:kFm9wnt46DW8Evi5I+aSaaPNWI0= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:89263 Archived-At: Stefan Monnier writes: >> what is the canonical way to remember/restore the (relative) old >> marker-position when a buffer is erased? > > You can try and be more careful about how the buffer is "rebuilt". > E.g. insert-file-content with the `replace' argument will try and notice > if only the beginning/end of the file was modified. > > Another option is to turn the markers into bookmarks. Thanks, sounds like promising alternatives to 'erase', I will check them out. -- cheers, Thorsten