From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Tino Calancha Newsgroups: gmane.emacs.bugs Subject: bug#13122: save-excursion not saving point Date: Sat, 4 May 2019 17:39:11 +0900 (JST) Message-ID: References: <87mukciluz.fsf@calancha-pc.dy.bbexcite.jp> <83imv0vstn.fsf@gnu.org> <87k1ff22gb.fsf@igel.home> Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="86992"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Alpine 2.20 (DEB 67 2015-01-07) To: 13122-done@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat May 04 10:40:17 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hMqDQ-000MT6-M8 for geb-bug-gnu-emacs@m.gmane.org; Sat, 04 May 2019 10:40:16 +0200 Original-Received: from localhost ([127.0.0.1]:53398 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hMqDM-0007T9-NG for geb-bug-gnu-emacs@m.gmane.org; Sat, 04 May 2019 04:40:12 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:44267) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hMqDD-0007Sz-SU for bug-gnu-emacs@gnu.org; Sat, 04 May 2019 04:40:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hMqDD-0002sG-04 for bug-gnu-emacs@gnu.org; Sat, 04 May 2019 04:40:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36789) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hMqDC-0002s0-Qo for bug-gnu-emacs@gnu.org; Sat, 04 May 2019 04:40:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hMqDC-0000TO-Ko for bug-gnu-emacs@gnu.org; Sat, 04 May 2019 04:40:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 May 2019 08:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13122 X-GNU-PR-Package: emacs Original-Received: via spool by 13122-done@debbugs.gnu.org id=D13122.15569591621765 (code D ref 13122); Sat, 04 May 2019 08:40:02 +0000 Original-Received: (at 13122-done) by debbugs.gnu.org; 4 May 2019 08:39:22 +0000 Original-Received: from localhost ([127.0.0.1]:50333 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMqCY-0000SP-6O for submit@debbugs.gnu.org; Sat, 04 May 2019 04:39:22 -0400 Original-Received: from mail-wr1-f52.google.com ([209.85.221.52]:40564) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMqCV-0000SB-V6 for 13122-done@debbugs.gnu.org; Sat, 04 May 2019 04:39:20 -0400 Original-Received: by mail-wr1-f52.google.com with SMTP id h4so10667592wre.7 for <13122-done@debbugs.gnu.org>; Sat, 04 May 2019 01:39:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:subject:in-reply-to:message-id:references:user-agent :mime-version; bh=Hxik4+2QGf1YyDcTq8otudOVG0UWxepFLp7YmF5J4sE=; b=Q4qTDGVKuoi9/bU547ZJc9+U4K44AFCOIs7mCYywDU4tuOFx3atnbUbqOELn7duwJ4 iuYPCsN2kV77PPsZf/2eB5dUlh9Q+fW1KN8LF3PqXQH5px/2Qg6cfgjBOb9s/+KI7yKi 5Ird0PpX71CkcbSMHB0b0kmPDO+4EumztXXiU148JX/lfjNIF7yTG173ZnVIYbaE/s/o jXysDjnYs6UluVWgwyltPH7ixhgDN+yruYPIIVFPP1zoNPC/hlFiOh2kmqk1sBqzU34f mkuiKRDX6TzWZKQpqpYBI/w/yaNzHVIoru/AIj5m9ujG+PhVTL+ly3YhqhSTwehfqhmE NEYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=Hxik4+2QGf1YyDcTq8otudOVG0UWxepFLp7YmF5J4sE=; b=XeTLDJNJ/1YlX5dMp/ZoDm0qdyfNyGIas9lszsBxP1zDkb6XSNwYyv3TKhI/inmpeh BO6j60JvogSWXj0DMEKL31DEd6Fk2NO1YHmD5h8Kemd8xBjCtipI86Bw8XRivi6f/jYL mxy/Fxrzt+Owu9byBWWp8jvOO7rMAfqcA5OZOMunNKYcBq2mdUwqH/dvPGnJZ58mVpN6 VodmR1D+V+YIQ0XoRl+TXQVZb41JgG66WFX3RIP+x4/7a7tqRW4ar/E8cTuqAPzimlji aKHehy/GhAaW96gMVS6Fx9qDN9LLeJbDgLL1nOBx9uomRm6swVk7X/ycIRzn0yXM5XkB 0d2A== X-Gm-Message-State: APjAAAXuENX07S7aaats6mrb2O5nBO/7tC8cYaqFbX6jnHXhPo+8k/Mc w4jPAk5kRc8e2H6ahNc7T1l3BHTjVwSs8Q== X-Google-Smtp-Source: APXvYqz2FMkdds/cb0S37Psw5iDFl6dkK8EmJuXF32D6y8QmXb3z5YAxPdYAHx9Uehb0pwEBXs+xUw== X-Received: by 2002:adf:f40b:: with SMTP id g11mr3864919wro.304.1556959153805; Sat, 04 May 2019 01:39:13 -0700 (PDT) Original-Received: from calancha-pc.dy.bbexcite.jp ([2a02:8308:703c:300:a925:e08:4b0c:f265]) by smtp.gmail.com with ESMTPSA id x17sm208428wru.27.2019.05.04.01.39.12 for <13122-done@debbugs.gnu.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 04 May 2019 01:39:13 -0700 (PDT) X-Google-Original-From: Tino Calancha X-X-Sender: calancha@calancha-pc.dy.bbexcite.jp In-Reply-To: <87k1ff22gb.fsf@igel.home> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:158730 Archived-At: Saving the point, in the general case, would rely on unspecified behaviour; so I close this bug. >>>> ;; Following expression should eval as non-nil >>>> (let ((pos 3)) >>>> (with-temp-buffer >>>> (insert "abcdef") >>>> (goto-char pos) >>>> (save-excursion (transpose-chars 2)) >>>> (= pos (point)))) >>>> => nil > Since the form inside save-excursion can modify the text before point, > there is never a guarantee that the numeric value of point stays the > same. And if point points inside the modified text, it is generally > unspecified how point moves during the modification.