From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?UTF-8?Q?Elias_M=C3=A5rtenson?= Newsgroups: gmane.emacs.devel Subject: Re: goto-char doesn't stick Date: Wed, 14 Jun 2017 18:02:22 +0800 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="001a11427954fc7fa80551e8a512" X-Trace: blaine.gmane.org 1497434584 3061 195.159.176.226 (14 Jun 2017 10:03:04 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 14 Jun 2017 10:03:04 +0000 (UTC) Cc: emacs-devel To: Andreas Schwab Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jun 14 12:03:00 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 1dL58d-0000b4-Hs for ged-emacs-devel@m.gmane.org; Wed, 14 Jun 2017 12:02:59 +0200 Original-Received: from localhost ([::1]:47561 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dL58i-0005bY-Nr for ged-emacs-devel@m.gmane.org; Wed, 14 Jun 2017 06:03:04 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50587) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dL584-0005PT-Mx for emacs-devel@gnu.org; Wed, 14 Jun 2017 06:02:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dL583-00043y-Fm for emacs-devel@gnu.org; Wed, 14 Jun 2017 06:02:24 -0400 Original-Received: from mail-vk0-x229.google.com ([2607:f8b0:400c:c05::229]:32940) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dL583-00043i-A2 for emacs-devel@gnu.org; Wed, 14 Jun 2017 06:02:23 -0400 Original-Received: by mail-vk0-x229.google.com with SMTP id p62so78209153vkp.0 for ; Wed, 14 Jun 2017 03:02:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=e2zZeZwefledzkRl0Y2K0tBfqVrodrT3EJTw+L6v+Fo=; b=FjYkRHmRSJAgb0q3V2x+/5TPLIqHHQiy9nnSuGqGZkfA/Xz5jFj0VncVWgjo/CC9IN lNbfv+e5vz+7MDOgbPBd0/kXugUnQJRBzd7c7iGf1L23NP2/giO8BXBHKHXOzp7P8pk1 7c81vakHQIrN26+SoUpfOXemqhjyfBBvks7DaUy920/JrlVY6wWzSRA8UWSpDPxm5KZ0 t5psGi9qcmemxprKOVdcY1BinKYx2REgfW8jp/X3QGQHuRI/fY5wfvQyA+fc+RV3xY3r kKlAiI2NVPBhtSWOLPzwhzDqbf/NcRJmgAnvRMKfl3+b6LVaMWuEgOgCJLm5LQS0ii4i 1PeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=e2zZeZwefledzkRl0Y2K0tBfqVrodrT3EJTw+L6v+Fo=; b=caLKDtPdJqVPo/3bYZ8C+5XMpNd7g666GuCP9MoaY/3NPa1TPc0sQZOuf9Cjvp60xb 0xFv8vZdADu+qK4R0bkvYpzf6b4M2wTMwzyEFLjaYPqBo4yZd1q+wh3RTXb0M48BGDhn e55rcpIILZYNYQ5zpMQfm8Noo91k/99kDWJkGdpXObgR1WZTDx8w4cJyckQob28K3cWG iT/eyIIdcj2jfZfM2AEkeTS5hBDs8K7qMvOxuxgV1IIWh9rUd2HzQXszgwKat/BudgFW 52777KEAoTqyRoRigzIae8WHN+qp2p8imDoCS4SnDcG9agL6wYFnSvgh5kIv0O4Tq28o 85Mg== X-Gm-Message-State: AKS2vOy8dPsB99hxuCx9zamQjbobE1K3cbyaVnNqYTALkmC5N88j3gfs DgDdRvEdLWx+7DSYBCu1EJ41yCCovg== X-Received: by 10.31.160.85 with SMTP id j82mr2633732vke.42.1497434542602; Wed, 14 Jun 2017 03:02:22 -0700 (PDT) Original-Received: by 10.103.9.7 with HTTP; Wed, 14 Jun 2017 03:02:22 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400c:c05::229 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:215609 Archived-At: --001a11427954fc7fa80551e8a512 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On 14 June 2017 at 17:48, Andreas Schwab wrote: > 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 > location: > > > > (progn > > (set-buffer "z") > > (goto-char LOCATION)) > > You should put that inside save-excursion. > How will that help? I want the code to move point, and the problem is that it does not move. =E2=80=98save-excursion=E2=80=99 simply ensures that poin= t will not move. Regards, Elias --001a11427954fc7fa80551e8a512 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On 1= 4 June 2017 at 17:48, Andreas Schwab <schwab@suse.de> wrote:
On Jun 14 2017, Elias M=C3= =A5rtenson <lokedhs@gmail.com&g= t; 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 loca= tion:
>
>=C2=A0 =C2=A0 =C2=A0(progn
>=C2=A0 =C2=A0 =C2=A0 =C2=A0(set-buffer "z")
>=C2=A0 =C2=A0 =C2=A0 =C2=A0(goto-char LOCATION))

You should put that inside save-excursion.

=
How will that help? I want the code to move point, and the probl= em is that it does not move. =E2=80=98save-excursion=E2=80=99 simply ensure= s that point will not move.

Regards,
Eli= as
--001a11427954fc7fa80551e8a512--