From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: goto-char doesn't stick Date: Thu, 15 Jun 2017 09:24:15 -0400 Message-ID: References: <03485ABD-CF71-4FF8-B887-ED7607341EBD@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1497533073 14055 195.159.176.226 (15 Jun 2017 13:24:33 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 15 Jun 2017 13:24:33 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: Emacs developers To: Noam Postavsky Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jun 15 15:24:27 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 1dLUl9-0003K1-Cg for ged-emacs-devel@m.gmane.org; Thu, 15 Jun 2017 15:24:27 +0200 Original-Received: from localhost ([::1]:54072 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dLUlE-0005p4-MC for ged-emacs-devel@m.gmane.org; Thu, 15 Jun 2017 09:24:32 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49422) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dLUl6-0005ny-1K for emacs-devel@gnu.org; Thu, 15 Jun 2017 09:24:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dLUl2-0006LX-16 for emacs-devel@gnu.org; Thu, 15 Jun 2017 09:24:24 -0400 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:53821) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dLUl1-0006Kq-Ru for emacs-devel@gnu.org; Thu, 15 Jun 2017 09:24:19 -0400 Original-Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id v5FDOFlh027979; Thu, 15 Jun 2017 09:24:16 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 3424060270; Thu, 15 Jun 2017 09:24:15 -0400 (EDT) In-Reply-To: (Noam Postavsky's message of "Thu, 15 Jun 2017 07:37:01 -0400") X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 2 Rules triggered EDT_SA_DN_PASS=0, RV6047=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6047> : inlines <5929> : uri <2444076> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.22 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:215640 Archived-At: >>>> (progn >>>> (set-buffer "z") >>>> (goto-char LOCATION)) >> [...] >>> It's a feature, new in Emacs 26. If you don't like it, turn off >>> switch-to-buffer-preserve-window-point. >> Really? Why would set-buffer+goto-char be affected by a variable named >> switch-to-buffer-* ? > The switch-to-buffer-preserve-window-point affects point when you > switch to buffer "z" later. I don't understand the scenario you have in mind. If I do M-: (with-current-buffer "z" (goto-char (1+ (point))) (point)) repeatedly, when "z" is not displayed, I see an increasing sequence, so the value of point is correctly preserved. > No, I verified that it happens when "z" is not displayed in any window. I wonder what's the difference between your test and mine. Stefan