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, 27 Apr 2019 16:44:52 +0900 (JST) Message-ID: References: <87mukciluz.fsf@calancha-pc.dy.bbexcite.jp> <83imv0vstn.fsf@gnu.org> 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="127445"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Alpine 2.20 (DEB 67 2015-01-07) Cc: 13122@debbugs.gnu.org, Tino Calancha To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Apr 27 09:50:19 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 1hKI6F-000X3G-FD for geb-bug-gnu-emacs@m.gmane.org; Sat, 27 Apr 2019 09:50:19 +0200 Original-Received: from localhost ([127.0.0.1]:56886 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hKI6E-0006JR-E1 for geb-bug-gnu-emacs@m.gmane.org; Sat, 27 Apr 2019 03:50:18 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:38830) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hKI67-0006DV-HM for bug-gnu-emacs@gnu.org; Sat, 27 Apr 2019 03:50:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hKI29-0005g4-9M for bug-gnu-emacs@gnu.org; Sat, 27 Apr 2019 03:46:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48900) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hKI26-0005f2-G1 for bug-gnu-emacs@gnu.org; Sat, 27 Apr 2019 03:46:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hKI26-0006nW-Co for bug-gnu-emacs@gnu.org; Sat, 27 Apr 2019 03:46: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, 27 Apr 2019 07:46: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-submit@debbugs.gnu.org id=B13122.155635110526061 (code B ref 13122); Sat, 27 Apr 2019 07:46:02 +0000 Original-Received: (at 13122) by debbugs.gnu.org; 27 Apr 2019 07:45:05 +0000 Original-Received: from localhost ([127.0.0.1]:34211 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hKI1B-0006mF-IS for submit@debbugs.gnu.org; Sat, 27 Apr 2019 03:45:05 -0400 Original-Received: from mail-wm1-f43.google.com ([209.85.128.43]:52112) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hKI17-0006lP-BD for 13122@debbugs.gnu.org; Sat, 27 Apr 2019 03:45:02 -0400 Original-Received: by mail-wm1-f43.google.com with SMTP id 4so6681954wmf.1 for <13122@debbugs.gnu.org>; Sat, 27 Apr 2019 00:45:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=suIFPEyeKFLBR97R9qtY60pZjn63b2lgccJ+QyV6SNk=; b=c5QY2XyMQxbA5vEuVRZ4ZSCZSRG0A1LbBtirUlVESGAcqfjw3Kri6E6nKq0NK1OUW+ xL3oMea6Ip9uNN8c/Ka21YdezxkuCCIp0BoBlone9R3DfqXYKMYPbiIWAJv3V0N+Vcx6 jWOqR+sGQaMdJqlbGsZiY/0wh6tWE5h2TozOmyR6Swx7x90f/NMmnobRNCb8J/lwaQx/ 3AlPq61bHVf+TSanv/8WuykSytbTzdGmueMIcq7wKGC7gZn9POFIIJSmaUGEYaRglTqK 7Bq4cGzRMSPESYnqZGEFbyKw7R78PSEN1PMq/BuELZTzidU+KazBBALzrsnMe7Vqn29W qxjw== 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:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=suIFPEyeKFLBR97R9qtY60pZjn63b2lgccJ+QyV6SNk=; b=UbWe/EyhaxugW3cneSR3e5n/G14JAvFs0BpdkX0SuRDHr2C/JBRvcSPuaWDHCis+z+ magvx/J2HouOYTNZHlqFYd8wHjAEQm5vQtpY/8CcKqoWTmnGo8AumCvoCXs4KrYCfZIl 8iXtRmcKat/vu9mrjSXy0shrGmjcR7IHK9x91GGh5nQOMi/MfdHcgh6r7w4wUugGd8Ko DSz0DIwT9kCpThVHX+NLdV280Ee5097eotJduGJZTf+zQL4opIp1x3N6NFXnGlpCrYlj xm+0Cn2kBZygcktyBxCK9KtsdzmIvZ5ZFh9FTZq3xzypuEI5HuaK9JM9pRUDMSI0pev/ sYjA== X-Gm-Message-State: APjAAAUcQbk1GHHAmV8dXPp2F2Ygu4XofBcnJ/moX1BWhj4nhAl/JPmd 8PdHprX0eQn2Ryw7YjjbjTk= X-Google-Smtp-Source: APXvYqxDu+ZD+sOjMv92W6m8IKjmQL938Lf4WLi1nMofxtBTUeRZbuHzdOvUqH/qOhEMrUT0YOSQRQ== X-Received: by 2002:a1c:2803:: with SMTP id o3mr2111423wmo.93.1556351095561; Sat, 27 Apr 2019 00:44:55 -0700 (PDT) Original-Received: from calancha-pc.dy.bbexcite.jp ([2a02:8308:703c:300:e753:cca1:dac7:cbb0]) by smtp.gmail.com with ESMTPSA id e10sm3475408wra.52.2019.04.27.00.44.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 27 Apr 2019 00:44:54 -0700 (PDT) X-Google-Original-From: Tino Calancha X-X-Sender: calancha@calancha-pc.dy.bbexcite.jp In-Reply-To: <83imv0vstn.fsf@gnu.org> 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:158324 Archived-At: On Sat, 27 Apr 2019, Eli Zaretskii wrote: >> From: Tino Calancha >> Date: Sat, 27 Apr 2019 04:53:56 +0900 >> >> ;; 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 I read that warning; maybe getting `nil' is above is expected; if that's the case then we can close the report again. The reason why I shared the above snippet is because Chong applied a patch (commit: aa26f345096166bd8c135876dbab9b671ae232e3) to fix the original recipe: a call to `traspose-chars' inside a `save-excursion' moving the point if the argument is n != 1. > Why did you think it should evaluate to non-nil? The ELisp manual has > a warning near the end of description of save-excursion; I think it's > relevant to this use case.