From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#13122: save-excursion not saving point Date: Sat, 08 Dec 2012 12:21:08 +0100 Message-ID: <50C322A4.4060403@gmx.at> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1354965706 19535 80.91.229.3 (8 Dec 2012 11:21:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 8 Dec 2012 11:21:46 +0000 (UTC) Cc: 13122@debbugs.gnu.org To: Jyothis V Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Dec 08 12:21:58 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ThITk-0007Go-7E for geb-bug-gnu-emacs@m.gmane.org; Sat, 08 Dec 2012 12:21:56 +0100 Original-Received: from localhost ([::1]:38298 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ThITX-0001I1-Rs for geb-bug-gnu-emacs@m.gmane.org; Sat, 08 Dec 2012 06:21:43 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:59999) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ThITU-0001HA-5f for bug-gnu-emacs@gnu.org; Sat, 08 Dec 2012 06:21:41 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ThITS-0000ex-UD for bug-gnu-emacs@gnu.org; Sat, 08 Dec 2012 06:21:40 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:49654) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ThITS-0000et-Qj for bug-gnu-emacs@gnu.org; Sat, 08 Dec 2012 06:21:38 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1ThITq-0004s2-BF for bug-gnu-emacs@gnu.org; Sat, 08 Dec 2012 06:22:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 08 Dec 2012 11:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13122 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 13122-submit@debbugs.gnu.org id=B13122.135496570218691 (code B ref 13122); Sat, 08 Dec 2012 11:22:02 +0000 Original-Received: (at 13122) by debbugs.gnu.org; 8 Dec 2012 11:21:42 +0000 Original-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 Original-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 Original-Received: (qmail invoked by alias); 08 Dec 2012 11:21:14 -0000 Original-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 In-Reply-To: X-Y-GMX-Trusted: 0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:68180 Archived-At: > 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