From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Richard M. Stallman" Newsgroups: gmane.emacs.bugs Subject: Re: save-excursion doesn't restore point Date: Wed, 25 Jan 2006 21:47:07 -0500 Message-ID: References: <20060124171233.1670DBACC@happygiraffe.net> Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1138243676 16564 80.91.229.2 (26 Jan 2006 02:47:56 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 26 Jan 2006 02:47:56 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jan 26 03:47:50 2006 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1F1xAV-0000w6-Qa for geb-bug-gnu-emacs@m.gmane.org; Thu, 26 Jan 2006 03:47:31 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F1xDH-0007fu-0M for geb-bug-gnu-emacs@m.gmane.org; Wed, 25 Jan 2006 21:50:19 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1F1xDD-0007fN-Qh for bug-gnu-emacs@gnu.org; Wed, 25 Jan 2006 21:50:15 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1F1xDD-0007ex-3Y for bug-gnu-emacs@gnu.org; Wed, 25 Jan 2006 21:50:15 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F1xDC-0007et-Vh for bug-gnu-emacs@gnu.org; Wed, 25 Jan 2006 21:50:15 -0500 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.52) id 1F1xAh-0007Hx-IG for bug-gnu-emacs@gnu.org; Wed, 25 Jan 2006 21:47:39 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1F1xAB-0002n8-73; Wed, 25 Jan 2006 21:47:07 -0500 Original-To: Dominic Mitchell In-reply-to: <20060124171233.1670DBACC@happygiraffe.net> (message from Dominic Mitchell on Tue, 24 Jan 2006 17:12:33 +0000 (GMT)) X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:14748 Archived-At: I would guess that this is because save-excursion uses markers, and those markers then get invalidated by shell-command-on-region. I think so. But it's still a little weird. Is this a bug? I think it is simply inevitable. If all the text is replaced, Emacs has no way of knowing what new position corresponds in any sense to some old position.