From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alex Newsgroups: gmane.emacs.devel Subject: Re: goto-char doesn't stick Date: Wed, 14 Jun 2017 21:53:16 -0600 Message-ID: <87lgotrjo3.fsf@lylat> References: <03485ABD-CF71-4FF8-B887-ED7607341EBD@gnu.org> <83wp8e3ahr.fsf@gnu.org> 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 1497498850 16391 195.159.176.226 (15 Jun 2017 03:54:10 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 15 Jun 2017 03:54:10 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: Eli Zaretskii , emacs-devel To: Elias =?utf-8?Q?M=C3=A5rtenson?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jun 15 05:54:04 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 1dLLrA-0003iv-0z for ged-emacs-devel@m.gmane.org; Thu, 15 Jun 2017 05:54:04 +0200 Original-Received: from localhost ([::1]:51842 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dLLrB-0005WJ-Ro for ged-emacs-devel@m.gmane.org; Wed, 14 Jun 2017 23:54:05 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50196) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dLLr5-0005W0-Ig for emacs-devel@gnu.org; Wed, 14 Jun 2017 23:54:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dLLr0-0003AE-NY for emacs-devel@gnu.org; Wed, 14 Jun 2017 23:53:59 -0400 Original-Received: from mail-it0-x244.google.com ([2607:f8b0:4001:c0b::244]:36129) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dLLr0-00039i-H2; Wed, 14 Jun 2017 23:53:54 -0400 Original-Received: by mail-it0-x244.google.com with SMTP id 185so666250itv.3; Wed, 14 Jun 2017 20:53:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=0G2r27t/o9AiTuDJ1yDLR3W9tHuiML5SGQKDZIND830=; b=IC27VDd2S/Sqxc/vHgqHM1+zjh1ldzL9N3AQL/s3PbE6hzCDwfHr5RM1c0pJWX7p8P +OJ/vAH+630Kx+lvKIEDR/BOX4G1qdv/o7m+ycyNZwNhSmbnLKEsowsYB7jxoLOulWsw O/Rdk4TrrlRnNjmxjmpuRxmcWHzuGjvLBISiagrDgVd8ZJOXcmrqQp43or1RSAGtMw/U ownkMIVC17cQup3UkLbRkt56YDbC4VS6/uVzOVPaSz44Cg+sW+siRZF04t2cCQPbsUol UULVMovg5GUD8QUfdIs/YxquRAETK3x7XjkZ0n9m9Tk6H1jZwbhqgn5vg5zXW2qNHp0H Iwxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=0G2r27t/o9AiTuDJ1yDLR3W9tHuiML5SGQKDZIND830=; b=MqiDNp5GDgV+hvk6W4luQmvFj+yioeP36mV5188XjgTmHdUDlRLI1ylLrYRmP8xjSF aS2uZZKlPK2EPca1HF7hF1ru/pdP+VafUWbeCNF8ctZiw4EoEfuC/TfdRXIR4Sf6eeF3 ebF3i8L9/i16Z5QjbUqoU6jF/z0oMy8C0xJr6DXbrovBHnxhwSwDrDxyxU7UyiKl4tU8 pzK9jZKR1yeCpJA0ZarUiSgzvJ0QdSTuu/dQpy9NtA9QfFnoE4PEZSxaIOgfGWveprRK lIaten4E7ctSMPYfxpbv2I8OmHU+nZl04PKH9lTBVZ8gDh6Hs2ZwFTbOpbm6AfwnKjjX C6MQ== X-Gm-Message-State: AKS2vOxGnRWcrHKa+gm5ApnRlzLJM8raQfqfqlk8n2DdkRZaSOl2gypx 8hGNUcKbu/5TvORZ X-Received: by 10.36.47.200 with SMTP id j191mr3359851itj.31.1497498833151; Wed, 14 Jun 2017 20:53:53 -0700 (PDT) Original-Received: from lylat (S010664777d9cebe3.ss.shawcable.net. [70.64.85.59]) by smtp.gmail.com with ESMTPSA id x29sm971653ioi.14.2017.06.14.20.53.51 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 14 Jun 2017 20:53:52 -0700 (PDT) In-Reply-To: ("Elias \=\?utf-8\?Q\?M\=C3\=A5rtenson\=22's\?\= message of "Wed, 14 Jun 2017 22:59:18 +0800") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4001:c0b::244 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:215630 Archived-At: Elias M=C3=A5rtenson writes: > On 14 Jun 2017 16:33, "Eli Zaretskii" wrote: > > > From: Elias M=C3=A5rtenson > > Date: Wed, 14 Jun 2017 19:16:42 +0800 > > Cc: emacs-devel > > > > It's a feature, new in Emacs 26. If you don't like it, turn off > > switch-to-buffer-preserve-window-point. > > Perhaps we should have a let-bindable variable to momentsrily disable= this. > > > > Thanks. I think a variable for this would be great. That would make th= e SLIME fix reasonably small. > > Actually, I think a let-binding would be only rarely useful, since in > most similar cases point is restored after all your forms already > returned, and Emacs is restoring the window's buffer to its previous > value as part of its main loop. > > Instead, I think you can prevent point from being restored as in your > use case by filtering the offending buffer from the window's > prev-buffers list, by using window-prev-buffers and > set-window-prev-buffers as part of the Lisp code which moves point in > that buffer. > > Thanks. I'll look at this in a few hours when I get back to the computer.= =20 > > However, based on what you told me, it seems as though I need to change s= ome buffer-wide or window-wide setting. Is this correct, or did I misunders= tand?=20 > > Ideally, the SLIME fix should not have any impact outside the function in= question.=20 > > Regards,=20 > Elias=20 Have you tried let-binding switch-to-buffer-preserve-window-point to nil around the switch-to-buffer call in slime-pop-to-location? It worked for me.