From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 08 02:15:06 2012 Received: (at submit) by debbugs.gnu.org; 8 Dec 2012 07:15:06 +0000 Received: from localhost ([127.0.0.1]:59805 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1ThEcq-0006oW-Ve for submit@debbugs.gnu.org; Sat, 08 Dec 2012 02:15:06 -0500 Received: from eggs.gnu.org ([208.118.235.92]:45341) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1ThDmX-0005aS-RC for submit@debbugs.gnu.org; Sat, 08 Dec 2012 01:21:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ThDm9-0001fa-Pw for submit@debbugs.gnu.org; Sat, 08 Dec 2012 01:20:39 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-102.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_LOW,T_DKIM_INVALID,USER_IN_WHITELIST autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:38284) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ThDm9-0001fW-MU for submit@debbugs.gnu.org; Sat, 08 Dec 2012 01:20:37 -0500 Received: from eggs.gnu.org ([208.118.235.92]:56703) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ThDm8-0000q5-H2 for bug-gnu-emacs@gnu.org; Sat, 08 Dec 2012 01:20:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ThDm7-0001fM-4k for bug-gnu-emacs@gnu.org; Sat, 08 Dec 2012 01:20:36 -0500 Received: from mail-qc0-f169.google.com ([209.85.216.169]:50067) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ThDm7-0001fI-06 for bug-gnu-emacs@gnu.org; Sat, 08 Dec 2012 01:20:35 -0500 Received: by mail-qc0-f169.google.com with SMTP id t2so697894qcq.0 for ; Fri, 07 Dec 2012 22:20:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=zaG1POY3f0KcSLV4BoUlOMuv2I18LHH/nvLappnLHIM=; b=wr7sM9dIz/AD69bbITB/eBKFqnW6SYZuWbgaFlds4ieP8AiVvtVQ5iHorzE9yT+3FS pYWeyPlUKLwRBONSQmQgCJtqHAOHRyCopp6gd1AdtLtwyB6y5Gg3qdXdUxkrpYCgD5OK 4B16qU/OHwl/yVt1Mj8jL0EihY1zYZxfQevthrdXxKM8dvGHR5xk3dgHnqpQOtm3Sor6 jxzdM6KEh1nCwuMoFqwpYpVli+K7ZNWe+38xFthkvEtuWI6GnApQaoaN5MZHoll7fwKQ W2zihBkBGfUu5UK6c/7hplgkUg9H9uvYlIoAm0vsL2i67FbXLIxj7l5+uLtIRCh8ntMq u11Q== Received: by 10.224.182.81 with SMTP id cb17mr13838419qab.78.1354947634046; Fri, 07 Dec 2012 22:20:34 -0800 (PST) MIME-Version: 1.0 Received: by 10.229.14.17 with HTTP; Fri, 7 Dec 2012 22:20:13 -0800 (PST) From: Jyothis V Date: Sat, 8 Dec 2012 11:50:13 +0530 Message-ID: Subject: save-excursion not saving point To: bug-gnu-emacs@gnu.org Content-Type: multipart/alternative; boundary=20cf303b39536aa7bd04d05154f1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -6.1 (------) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sat, 08 Dec 2012 02:15:04 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.1 (------) --20cf303b39536aa7bd04d05154f1 Content-Type: text/plain; charset=ISO-8859-1 Hi, I wrote the following version of transpose-chars which is supposed to always transform the last two chars without moving the point. (defun gosmacs-tranpose-chars (n) (interactive "p") (save-excursion (forward-char (- n)) (transpose-chars 1))) The trouble is, even though I have used save-excursion, the point does move 2 characters backwards when n=1! For other values of n, this seems to be working fine. Regards, Jyothis V In GNU Emacs 24.2.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.6.2) of 2012-11-18 on eric Windowing system distributor `The X.Org Foundation', version 11.0.11300000 Configured using: `configure '--prefix=/usr' '--sysconfdir=/etc' '--libexecdir=/usr/lib' '--localstatedir=/var' '--with-x-toolkit=gtk3' '--with-xft' 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2' 'LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_US.UTF-8 value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Lisp Interaction Minor modes in effect: diff-auto-refine-mode: t global-auto-complete-mode: t auto-complete-mode: t icomplete-mode: t ido-everywhere: t shell-dirtrack-mode: t which-function-mode: t cua-mode: t display-time-mode: t electric-pair-mode: t show-paren-mode: t tooltip-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t --20cf303b39536aa7bd04d05154f1 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi,

I wrote the following version of transpose-chars which is suppos= ed to
always transform the last two chars without moving the point.
(= defun gosmacs-tranpose-chars (n)
=A0 (interactive "p")
=A0 = (save-excursion
=A0=A0=A0 (forward-char (- n))
=A0=A0=A0 (transpose-chars 1)))

Th= e trouble is, even though I have used save-excursion, the point does
mov= e 2 characters backwards when n=3D1! For other values of n, this seems to b= e working fine.

Regards,
Jyothis V

In GNU Emacs 24.2.1 (x86_64-unknown-linux-= gnu, GTK+ Version 3.6.2)
=A0of 2012-11-18 on eric
Windowing system di= stributor `The X.Org Foundation', version 11.0.11300000
Configured u= sing:
=A0`configure '--prefix=3D/usr' '--sysconfdir=3D/etc' '= --libexecdir=3D/usr/lib'
=A0'--localstatedir=3D/var' '--= with-x-toolkit=3Dgtk3' '--with-xft'
=A0'CFLAGS=3D-march= =3Dx86-64 -mtune=3Dgeneric -O2 -pipe -fstack-protector
=A0--param=3Dssp-buffer-size=3D4 -D_FORTIFY_SOURCE=3D2'
=A0'LDFL= AGS=3D-Wl,-O1,--sort-common,--as-needed,-z,relro''

Important= settings:
=A0 value of $LC_ALL: nil
=A0 value of $LC_COLLATE: nil=A0 value of $LC_CTYPE: nil
=A0 value of $LC_MESSAGES: nil
=A0 value of $LC_MONETARY: nil
=A0 val= ue of $LC_NUMERIC: nil
=A0 value of $LC_TIME: nil
=A0 value of $LANG:= en_US.UTF-8
=A0 value of $XMODIFIERS: nil
=A0 locale-coding-system: = utf-8-unix
=A0 default enable-multibyte-characters: t

Major mode: Lisp Interact= ion

Minor modes in effect:
=A0 diff-auto-refine-mode: t
=A0 gl= obal-auto-complete-mode: t
=A0 auto-complete-mode: t
=A0 icomplete-mo= de: t
=A0 ido-everywhere: t
=A0 shell-dirtrack-mode: t
=A0 which-function-m= ode: t
=A0 cua-mode: t
=A0 display-time-mode: t
=A0 electric-pair-= mode: t
=A0 show-paren-mode: t
=A0 tooltip-mode: t
=A0 mouse-wheel= -mode: t
=A0 file-name-shadow-mode: t
=A0 global-font-lock-mode: t
=A0 font-lock-mode: t
=A0 auto-compositi= on-mode: t
=A0 auto-encryption-mode: t
=A0 auto-compression-mode: t=A0 line-number-mode: t
=A0 transient-mark-mode: t



--20cf303b39536aa7bd04d05154f1-- From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 08 06:21:42 2012 Received: (at 13122) by debbugs.gnu.org; 8 Dec 2012 11:21:42 +0000 Received: from localhost ([127.0.0.1]:59904 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1ThITW-0004rP-65 for submit@debbugs.gnu.org; Sat, 08 Dec 2012 06:21:42 -0500 Received: from mailout-de.gmx.net ([213.165.64.22]:54903) by debbugs.gnu.org with smtp (Exim 4.72) (envelope-from ) id 1ThITT-0004rG-Ei for 13122@debbugs.gnu.org; Sat, 08 Dec 2012 06:21:40 -0500 Received: (qmail invoked by alias); 08 Dec 2012 11:21:14 -0000 Received: from 62-47-55-242.adsl.highway.telekom.at (EHLO [62.47.55.242]) [62.47.55.242] by mail.gmx.net (mp024) with SMTP; 08 Dec 2012 12:21:14 +0100 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX19yTxkSEYJy+02IAgi4yDLkQcOGvgw4yC5Li7El+A 5MgTFMaF+0jPy4 Message-ID: <50C322A4.4060403@gmx.at> Date: Sat, 08 Dec 2012 12:21:08 +0100 From: martin rudalics MIME-Version: 1.0 To: Jyothis V Subject: Re: bug#13122: save-excursion not saving point References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: 13122 Cc: 13122@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.8 (/) > I wrote the following version of transpose-chars which is supposed to > always transform the last two chars without moving the point. > (defun gosmacs-tranpose-chars (n) > (interactive "p") > (save-excursion > (forward-char (- n)) > (transpose-chars 1))) > > The trouble is, even though I have used save-excursion, the point does > move 2 characters backwards when n=1! For other values of n, this seems to > be working fine. This is a limitation (or bug) in the code of `transpose-subr' and `transpose-subr-1' due to the use of `delete-and-extract-region' (IIRC transposing mangles `undo' as well.) martin From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 11 02:51:39 2012 Received: (at control) by debbugs.gnu.org; 11 Dec 2012 07:51:39 +0000 Received: from localhost ([127.0.0.1]:36242 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TiKcs-0005ma-NS for submit@debbugs.gnu.org; Tue, 11 Dec 2012 02:51:39 -0500 Received: from fencepost.gnu.org ([208.118.235.10]:56361) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TiKcq-0005mR-Dr for control@debbugs.gnu.org; Tue, 11 Dec 2012 02:51:37 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1TiKcC-0007Ak-IF for control@debbugs.gnu.org; Tue, 11 Dec 2012 02:50:56 -0500 Date: Tue, 11 Dec 2012 02:50:56 -0500 Message-Id: Subject: control message for bug 13122 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) retitle 13122 transpose-subr defeats save-excursion severity 13122 minor From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 21 00:44:21 2012 Received: (at 13122-done) by debbugs.gnu.org; 21 Dec 2012 05:44:21 +0000 Received: from localhost ([127.0.0.1]:53337 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TlvPA-0007q0-94 for submit@debbugs.gnu.org; Fri, 21 Dec 2012 00:44:21 -0500 Received: from mail-pb0-f41.google.com ([209.85.160.41]:42135) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TlvP6-0007pq-Ie for 13122-done@debbugs.gnu.org; Fri, 21 Dec 2012 00:44:17 -0500 Received: by mail-pb0-f41.google.com with SMTP id xa7so2486793pbc.0 for <13122-done@debbugs.gnu.org>; Thu, 20 Dec 2012 21:44:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=2fDt16b/Mo2RvC7Xghuqyce0EG/ABdzcRBrJKq8+Pf8=; b=vq2TYtnFIwnkrdQDFe9+oIkjLeYYGJQ7IVRuxFGHuDqPo24KL+qyjUr0Td7Q4bzE+d zN052juO6LFkQCVX/B0nPVEpl1wlV4cgbPnWtFFasHA/fSO70CJpBnxC562JYJhwdc1Y YQ35p2wfZ+gXYkcLwomykz8DC8g5JeO1GQDbd6HXYd7FOIoobjQbeeY+x3ojFtjANqfL MJhYTWazeTpb4LQvmnFt3q2pzAMXj03MpJh4USpuDQeRiEULaqFXY4GAFRJlAXHhfced +lmUaSmWPWh4vmRxq9JExRI0Cv+yEbkoUZnEQQliAxBeKQeRywbF1nXvuON911gZ3rEQ LAbw== X-Received: by 10.68.197.8 with SMTP id iq8mr36575669pbc.56.1356068642696; Thu, 20 Dec 2012 21:44:02 -0800 (PST) Received: from ulysses ([155.69.18.203]) by mx.google.com with ESMTPS id hs2sm6346987pbc.22.2012.12.20.21.43.58 (version=SSLv3 cipher=OTHER); Thu, 20 Dec 2012 21:44:01 -0800 (PST) From: Chong Yidong To: martin rudalics Subject: Re: bug#13122: save-excursion not saving point References: <50C322A4.4060403@gmx.at> Date: Fri, 21 Dec 2012 13:43:55 +0800 In-Reply-To: <50C322A4.4060403@gmx.at> (martin rudalics's message of "Sat, 08 Dec 2012 12:21:08 +0100") Message-ID: <87d2y4dko4.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: 13122-done Cc: Jyothis V , 13122-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) martin rudalics writes: > This is a limitation (or bug) in the code of `transpose-subr' and > `transpose-subr-1' due to the use of `delete-and-extract-region' (IIRC > transposing mangles `undo' as well.) I've committed a fix to trunk. From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 07 11:52:53 2013 Received: (at 13122) by debbugs.gnu.org; 7 Jan 2013 16:52:53 +0000 Received: from localhost ([127.0.0.1]:34434 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TsFwR-00066P-Pk for submit@debbugs.gnu.org; Mon, 07 Jan 2013 11:52:53 -0500 Received: from mail-oa0-f47.google.com ([209.85.219.47]:38652) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TsBsp-0008PQ-72 for 13122@debbugs.gnu.org; Mon, 07 Jan 2013 07:33:04 -0500 Received: by mail-oa0-f47.google.com with SMTP id h1so17478647oag.6 for <13122@debbugs.gnu.org>; Mon, 07 Jan 2013 04:32:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=OZkPEAB+J45b+YfgHJncsQWoOmB5rrfyEIWrmwgrJ/0=; b=a9XTJc99BxZBS16L7Os704fGTDg9aaQmXWZWaW1Eb22Tneid+Sdr4sqo+l/tlNWMJB qWBxAB5GBuiFHKFJiqO9Vvw6cmwbcB+2p859jJtUryrc59NSDSp01WdEVrOUJKdc4ldG aHM+UeQ3P3p0Q4fyDFPbMSnHeTT+IkoD86lS4AG3adJFh10h0SF1F2K+H1WhmxGEkUSG 27Q1bBmeHNZS4NrYctK7V949in8Q/FjWbbAXwidG/XucVoB2ZOkHu3BPhCbgUzaGeLP2 kuAjwq3mThj9GKz72nEkmAEeGvVzvmRbfpSXF/lDV02ZRu2qEZoOiOpRxOcr8pwHs7Rn 3ZuQ== Received: by 10.182.146.13 with SMTP id sy13mr43044171obb.45.1357561961276; Mon, 07 Jan 2013 04:32:41 -0800 (PST) MIME-Version: 1.0 Received: by 10.182.232.106 with HTTP; Mon, 7 Jan 2013 04:32:18 -0800 (PST) From: Alexander Kjeldaas Date: Mon, 7 Jan 2013 13:32:18 +0100 Message-ID: Subject: sort-regexp-fields also seems to not save point To: 13122@debbugs.gnu.org Content-Type: multipart/alternative; boundary=f46d04462b6e7665c004d2b20684 X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: 13122 X-Mailman-Approved-At: Mon, 07 Jan 2013 11:52:50 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -0.7 (/) --f46d04462b6e7665c004d2b20684 Content-Type: text/plain; charset=UTF-8 I think this might be related. In the following function, point is also not restored: (defun my-java-organize-imports2 () "Sorts import statements" (interactive) (message "Point %d" (point)) (sit-for 3) (save-excursion (let (deactivate-mark) ;; Remove empty lines between imports (replace-regexp "^import \\(.*\\)\n\\(\n\\)*import \\(.*\\)$" "import \\1\nimport \\3" nil (point-min) (point-max)) ;; Sort imports in file (sort-regexp-fields nil "^.*$" "^import .*$" (point-min) (point-max)))) (message "Point %d" (point)) (sit-for 3)) Thanks, Alexander --f46d04462b6e7665c004d2b20684 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

I think this might be related.=C2=A0 In the= following function, point is also not restored:

(defun my-java= -organize-imports2 ()
=C2=A0 "Sorts import statements"
=C2= =A0 (interactive)
=C2=A0 (message "Point %d" (point))
=C2=A0 (sit-for 3)
=C2= =A0 (save-excursion
=C2=A0=C2=A0=C2=A0 (let (deactivate-mark)
=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 ;; Remove empty lines between imports
=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 (replace-regexp "^import \\(.*\\)\n\\(\n\\)*impo= rt \\(.*\\)$"
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "import \\1\nimpor= t \\3"
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 nil (poi= nt-min) (point-max))
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ;; Sort imports in f= ile
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (sort-regexp-fields nil "^.*$&qu= ot; "^import .*$" (point-min) (point-max))))
=C2=A0 (message "Point %d" (point))
=C2=A0 (sit-for 3))
Thanks,
Alexander


--f46d04462b6e7665c004d2b20684-- From unknown Mon Jun 23 02:24:34 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 05 Feb 2013 12:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 26 15:45:39 2019 Received: (at control) by debbugs.gnu.org; 26 Apr 2019 19:45:39 +0000 Received: from localhost ([127.0.0.1]:33636 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hK6mx-0007Nm-5p for submit@debbugs.gnu.org; Fri, 26 Apr 2019 15:45:39 -0400 Received: from mail-wm1-f51.google.com ([209.85.128.51]:54579) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hK6mv-0007NW-IR for control@debbugs.gnu.org; Fri, 26 Apr 2019 15:45:37 -0400 Received: by mail-wm1-f51.google.com with SMTP id c1so5147014wml.4 for ; Fri, 26 Apr 2019 12:45:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:message-id:to:from:subject; bh=BR//8rEDIilDqN0tUh6IR1/wNqri5qiFEEpffV5uVl8=; b=XILodveWJpG4HB6Py3UrVraOg4jj/DTW8Aj7WGDYT4Vcv2RdJ4ebY7Pfsgxm3xIrCM W6x7aeX01QfgT0Xf/quwmjnSAyJvPq2o5r0a7wuFnqDjn1TgVpnHwFZe7ZhsRgSHG9ke WDnhAv0UD0nS7xgx+bgSvoRRmJX+4twPBfhzbRzR5hGyn2eVMh5pYY9YYR0YmgBopNhd PdeQTHv5WActnLwQSvzKZfTjvdR4ed6ENaqVsFUwp2WgNL5O7JSmkM6Fbi35gobsk7Me A/4R34LG6Gsymg/Kj9U0ba4PMxJRorrhnsOkcsJ2p2x+UHKJyNPazHNvdGs8hL/UV6wi 2a0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:to:from:subject; bh=BR//8rEDIilDqN0tUh6IR1/wNqri5qiFEEpffV5uVl8=; b=lClZKKCLCaxTQgU9k05fxai+3aWyOJkLIyaIYSvgbJlqcwv6ZYU8OurJXQLnE+wvu2 SoW+Q9ELRC9nJOuTWP5ul+inQD2TXEAQjLqtZDin/GPK5ssXNtDjGI2jVjAmqiBdjXlp jEQJXAAJedhCJp83mHo4WKWzR8IQ24n3JRsLsnxzKKVfxx+ckqg/yn7YBZ7Az2CV5wiG hYNkRQnAmfIM57d4gchyGcXW4tN7tolTCjN740egc6U3F4xq1IgRVB83YlQZjr/df3nf +EdVdtcoo37hkGF4xBZVftcnXjF1W1LZvCwPFXaJTSCuOVphLfmOeTHSAv66Ossobm79 me0g== X-Gm-Message-State: APjAAAV5a5FYo/hjt997L84BWLOmar6O3+e8pR0LRpgDWHPosorPMZEa T/Saf5tl5vvXs8vXt00YYBC1Z+iCy94= X-Google-Smtp-Source: APXvYqwZs2ne0GhejH4nvni9Y43kwQurJaD9q3WgN580SUm3Maq64FVaQdRU4FuPVNltmD+mrhWm8A== X-Received: by 2002:a1c:d1c1:: with SMTP id i184mr9359452wmg.35.1556307931219; Fri, 26 Apr 2019 12:45:31 -0700 (PDT) Received: from calancha-pc.dy.bbexcite.jp ([2a02:8308:703c:300:e753:cca1:dac7:cbb0]) by smtp.gmail.com with ESMTPSA id q3sm9480095wrj.24.2019.04.26.12.45.29 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Apr 2019 12:45:30 -0700 (PDT) Date: Sat, 27 Apr 2019 04:45:17 +0900 Message-Id: <87v9z0im9e.fsf@calancha-pc.dy.bbexcite.jp> To: control@debbugs.gnu.org From: Tino Calancha Subject: control message for bug #13122 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) unarchive 13122 From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 26 15:54:09 2019 Received: (at 13122) by debbugs.gnu.org; 26 Apr 2019 19:54:09 +0000 Received: from localhost ([127.0.0.1]:33654 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hK6vB-0007ak-2r for submit@debbugs.gnu.org; Fri, 26 Apr 2019 15:54:09 -0400 Received: from mail-wr1-f52.google.com ([209.85.221.52]:34396) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hK6v6-0007a9-Op for 13122@debbugs.gnu.org; Fri, 26 Apr 2019 15:54:05 -0400 Received: by mail-wr1-f52.google.com with SMTP id v16so3552511wrp.1 for <13122@debbugs.gnu.org>; Fri, 26 Apr 2019 12:54:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version; bh=BR0rtlxlaRnWbGa+4ULh/HoJNXLFaphQ/OKP6creJ+w=; b=ojkCp8HbYE1w1mqilyu38RmTQu6h4723LVa8lVN4JUhIyarxm5+jleddMFlWKIUvzl qI+g4AArxvYwSvN6aRHfIwOxQPAVhOxX1mXIQ4TsAcicg+BFmrg6xWAQrGuz83h2nBA5 LM4JOnI9ZMNUGYds437JJCZW7Yy7fv260AScgQlWj0Mf5wfPFwO9M2AsiOXwIa5l2zWr doXpSUgRV1bZMyVdCLxAVjMqLsm3yyPNnkHcahuZzPWFksaQqNTHMC9xzQmj89czHrac rNebBQNgOc5vlVKppBpFbJ2k0ZK0CT5KJTTMtV2L9cAIUxqARtZZodTx5dogi7iWSaxs H1Jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=BR0rtlxlaRnWbGa+4ULh/HoJNXLFaphQ/OKP6creJ+w=; b=Sufn1d8taISTbrrEpz7MHNs2T/jIjFfmNVDaFWvTxp+O5BftKxhIsk5N6EhQUyn8So 4pRAktgpxsCjAAIU1ga9oTgrewPL1tg71ZGu9OnNE3PbwxNcvBIxtsMTMskp8DVSiGpc i1yOhGAkhkgaoEL8vYKPuXAl2UUHzk7rLHYMY1heuPN90dCvDdSKxdAqEEVk2xNjOXlh lRpmPDOATYzDX+AN7CcsZ1YdiKC8OtkgpkUwx+wASv5Sauzt31hOpNjUd6TTota4BgCq R/ypZ6Y+ATKBWnjahD875zY69TI7F7fQZ9GZrquUepUvxh7tnnkbZfzDxPuBVM/v7hXu JoGw== X-Gm-Message-State: APjAAAWM4wYbGAb7alcG8vcGZEaAgp9ervKMSzeGD8bXN8AnuoRC9cFG XDxlLBWNHtc2g7gn/aoHYiXKIyB6VymQEg== X-Google-Smtp-Source: APXvYqzwiASw5Nynh+0EtZbZgGXxKJiwljC9QCMxC6exKaEXJEBV2VQ+n6kdIEdHzmKHyrsDEvjNuA== X-Received: by 2002:a5d:6150:: with SMTP id y16mr31788331wrt.13.1556308438268; Fri, 26 Apr 2019 12:53:58 -0700 (PDT) Received: from calancha-pc.dy.bbexcite.jp ([2a02:8308:703c:300:e753:cca1:dac7:cbb0]) by smtp.gmail.com with ESMTPSA id 4sm21430103wmg.12.2019.04.26.12.53.57 for <13122@debbugs.gnu.org> (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Apr 2019 12:53:57 -0700 (PDT) From: Tino Calancha To: 13122@debbugs.gnu.org Subject: Re: bug#13122: save-excursion not saving point References: Date: Sat, 27 Apr 2019 04:53:56 +0900 In-Reply-To: (Jyothis V.'s message of "Sat, 8 Dec 2012 11:50:13 +0530") Message-ID: <87mukciluz.fsf@calancha-pc.dy.bbexcite.jp> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 13122 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) ;; 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 In GNU Emacs 27.0.50 (build 3, x86_64-pc-linux-gnu, GTK+ Version 3.22.11) of 2019-04-23 built on calancha-pc.dy.bbexcite.jp Repository revision: 981470e3590534a4d2947dfe5626cae832c6502d Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.11902000 System Description: Debian GNU/Linux 9 (stretch) Jyothis V writes: > I wrote the following version of transpose-chars which is supposed to > always transform the last two chars without moving the point. > (defun gosmacs-tranpose-chars (n) > (interactive "p") > (save-excursion > (forward-char (- n)) > (transpose-chars 1))) > > The trouble is, even though I have used save-excursion, the point does > move 2 characters backwards when n=1! For other values of n, this seems to be working fine. > > Regards, > Jyothis V > > In GNU Emacs 24.2.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.6.2) > of 2012-11-18 on eric > Windowing system distributor `The X.Org Foundation', version 11.0.11300000 From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 27 02:57:47 2019 Received: (at 13122) by debbugs.gnu.org; 27 Apr 2019 06:57:47 +0000 Received: from localhost ([127.0.0.1]:34171 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hKHHP-0005eY-H5 for submit@debbugs.gnu.org; Sat, 27 Apr 2019 02:57:47 -0400 Received: from eggs.gnu.org ([209.51.188.92]:46953) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hKHHO-0005eN-9j for 13122@debbugs.gnu.org; Sat, 27 Apr 2019 02:57:46 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:42107) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hKHHI-0007it-Ml; Sat, 27 Apr 2019 02:57:40 -0400 Received: from [176.228.60.248] (port=3053 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hKHHH-000563-Dr; Sat, 27 Apr 2019 02:57:39 -0400 Date: Sat, 27 Apr 2019 09:57:24 +0300 Message-Id: <83imv0vstn.fsf@gnu.org> From: Eli Zaretskii To: Tino Calancha In-reply-to: <87mukciluz.fsf@calancha-pc.dy.bbexcite.jp> (message from Tino Calancha on Sat, 27 Apr 2019 04:53:56 +0900) Subject: Re: bug#13122: save-excursion not saving point References: <87mukciluz.fsf@calancha-pc.dy.bbexcite.jp> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 13122 Cc: 13122@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > 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 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. From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 27 03:45:05 2019 Received: (at 13122) by debbugs.gnu.org; 27 Apr 2019 07:45:05 +0000 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 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 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) 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) From: Tino Calancha X-Google-Original-From: Tino Calancha Date: Sat, 27 Apr 2019 16:44:52 +0900 (JST) X-X-Sender: calancha@calancha-pc.dy.bbexcite.jp To: Eli Zaretskii Subject: Re: bug#13122: save-excursion not saving point In-Reply-To: <83imv0vstn.fsf@gnu.org> Message-ID: References: <87mukciluz.fsf@calancha-pc.dy.bbexcite.jp> <83imv0vstn.fsf@gnu.org> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII X-Spam-Score: 1.1 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 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) >> [...] Content analysis details: (1.1 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.128.43 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (tino.calancha[at]gmail.com) 1.1 MALFORMED_FREEMAIL Bad headers on message from free email service X-Debbugs-Envelope-To: 13122 Cc: 13122@debbugs.gnu.org, Tino Calancha X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 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. From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 27 05:59:57 2019 Received: (at 13122) by debbugs.gnu.org; 27 Apr 2019 09:59:57 +0000 Received: from localhost ([127.0.0.1]:34504 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hKK7h-0001gO-Jl for submit@debbugs.gnu.org; Sat, 27 Apr 2019 05:59:57 -0400 Received: from mail-out.m-online.net ([212.18.0.9]:43856) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hKK7e-0001gF-NM for 13122@debbugs.gnu.org; Sat, 27 Apr 2019 05:59:55 -0400 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 44rmcT1SvVz1rwK4; Sat, 27 Apr 2019 11:59:53 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 44rmcT0Jttz1qsR1; Sat, 27 Apr 2019 11:59:53 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id 8LHAwEeYPbzN; Sat, 27 Apr 2019 11:59:52 +0200 (CEST) X-Auth-Info: 7qSkKsWCduqC67Vpmy4scZXShwFfo/8MOOkVvP+nf1LlyPfFSc7uEupYdy2ilGOL Received: from igel.home (ppp-46-244-183-33.dynamic.mnet-online.de [46.244.183.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Sat, 27 Apr 2019 11:59:51 +0200 (CEST) Received: by igel.home (Postfix, from userid 1000) id 000F12C11FA; Sat, 27 Apr 2019 11:59:48 +0200 (CEST) From: Andreas Schwab To: Tino Calancha Subject: Re: bug#13122: save-excursion not saving point References: <87mukciluz.fsf@calancha-pc.dy.bbexcite.jp> <83imv0vstn.fsf@gnu.org> X-Yow: What's the MATTER Sid?.. Is your BEVERAGE unsatisfactory? Date: Sat, 27 Apr 2019 11:59:48 +0200 In-Reply-To: (Tino Calancha's message of "Sat, 27 Apr 2019 16:44:52 +0900 (JST)") Message-ID: <87k1ff22gb.fsf@igel.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 13122 Cc: Eli Zaretskii , 13122@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On Apr 27 2019, Tino Calancha wrote: > 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. 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. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different." From debbugs-submit-bounces@debbugs.gnu.org Sat May 04 04:39:22 2019 Received: (at 13122-done) by debbugs.gnu.org; 4 May 2019 08:39:22 +0000 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 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 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) 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) From: Tino Calancha X-Google-Original-From: Tino Calancha Date: Sat, 4 May 2019 17:39:11 +0900 (JST) X-X-Sender: calancha@calancha-pc.dy.bbexcite.jp To: 13122-done@debbugs.gnu.org Subject: Re: bug#13122: save-excursion not saving point In-Reply-To: <87k1ff22gb.fsf@igel.home> Message-ID: References: <87mukciluz.fsf@calancha-pc.dy.bbexcite.jp> <83imv0vstn.fsf@gnu.org> <87k1ff22gb.fsf@igel.home> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 13122-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 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. From unknown Mon Jun 23 02:24:34 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 01 Jun 2019 11:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator