From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Andreas Schwab Newsgroups: gmane.emacs.devel Subject: Re: goto-char doesn't stick Date: Wed, 14 Jun 2017 11:48:59 +0200 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1497433751 3641 195.159.176.226 (14 Jun 2017 09:49:11 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 14 Jun 2017 09:49:11 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) Cc: emacs-devel To: Elias =?utf-8?Q?M=C3=A5rtenson?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jun 14 11:49:08 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dL4vD-0000jX-BU for ged-emacs-devel@m.gmane.org; Wed, 14 Jun 2017 11:49:07 +0200 Original-Received: from localhost ([::1]:47506 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dL4vI-0000yZ-NT for ged-emacs-devel@m.gmane.org; Wed, 14 Jun 2017 05:49:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47413) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dL4vC-0000yS-3H for emacs-devel@gnu.org; Wed, 14 Jun 2017 05:49:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dL4v9-0005Fl-0H for emacs-devel@gnu.org; Wed, 14 Jun 2017 05:49:06 -0400 Original-Received: from mx2.suse.de ([195.135.220.15]:32772 helo=mx1.suse.de) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dL4v8-0005EB-QG for emacs-devel@gnu.org; Wed, 14 Jun 2017 05:49:02 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Original-Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 431F8ABFC; Wed, 14 Jun 2017 09:49:00 +0000 (UTC) X-Yow: I'm in DISGUISE as a BAGGAGE CHECKER....I can watch the house, if it's ORANGE... In-Reply-To: ("Elias =?utf-8?Q?M=C3=A5rtenson=22's?= message of "Wed, 14 Jun 2017 17:45:15 +0800") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] [fuzzy] X-Received-From: 195.135.220.15 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:215608 Archived-At: On Jun 14 2017, Elias M=C3=A5rtenson wrote: > Assuming the cursor is at some random position in buffer "z", The SLIME > code essentially does the following to move the cursor to a given locat= ion: > > (progn > (set-buffer "z") > (goto-char LOCATION)) You should put that inside save-excursion. Andreas. --=20 Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint =3D 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D= 7 "And now for something completely different."