From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Reitter Newsgroups: gmane.emacs.help Subject: Re: Undo: restore the region? Date: Wed, 18 Jan 2006 16:00:35 +0000 Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (Apple Message framework v746.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1137612569 9106 80.91.229.2 (18 Jan 2006 19:29:29 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 18 Jan 2006 19:29:29 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jan 18 20:29:25 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EzIzf-0003N2-AU for geh-help-gnu-emacs@m.gmane.org; Wed, 18 Jan 2006 20:29:23 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EzJ24-0001zd-1e for geh-help-gnu-emacs@m.gmane.org; Wed, 18 Jan 2006 14:31:48 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EzFmE-00011A-CP for help-gnu-emacs@gnu.org; Wed, 18 Jan 2006 11:03:16 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EzFm8-0000zK-HD for Help-gnu-emacs@gnu.org; Wed, 18 Jan 2006 11:03:11 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EzFm7-0000zB-Kb for Help-gnu-emacs@gnu.org; Wed, 18 Jan 2006 11:03:07 -0500 Original-Received: from [64.233.184.198] (helo=wproxy.gmail.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EzFq0-0005Zq-4d for Help-gnu-emacs@gnu.org; Wed, 18 Jan 2006 11:07:08 -0500 Original-Received: by wproxy.gmail.com with SMTP id 69so1542551wra for ; Wed, 18 Jan 2006 08:00:37 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:mime-version:content-transfer-encoding:message-id:content-type:to:from:subject:date:x-mailer; b=VI5avwoqkH9ZeFeXHesK7v1J1bYL46paKvs73VI75fypYT5N7gjMEgi7bf/25oUclrL4wmcnb6DPaRgFnt8j6n8ZoSOBQMV9L1dsbJeh81Zhlm0wsrQRvpDg9JStBMwVZIuG70u9/ktx7+MPe56JVLbfh3OiT7u0q2Vlmu2kX14= Original-Received: by 10.65.183.7 with SMTP id k7mr4864599qbp; Wed, 18 Jan 2006 08:00:37 -0800 (PST) Original-Received: from ?129.215.174.81? ( [129.215.174.81]) by mx.gmail.com with ESMTP id e13sm3818510qbe.2006.01.18.08.00.36; Wed, 18 Jan 2006 08:00:37 -0800 (PST) Original-To: Emacs help X-Mailer: Apple Mail (2.746.2) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:32723 Archived-At: > > How can I get undo to restore the region along with the last > changes? > > I need this rather often in my workflow, and undo always removes the > > mark, which is very annoying. > > C-x C-x should reactivate it. Thanks, that's a good start. It works in some situations, but only for one step of Undo. Consider the following case: In the above sentence, select "good" as your region and enter "x". Then select "some" and press x again. Now do undo twice and press C-x C-x. I would expect "good" to be selected. I was going to bind my undo key to something like (lambda nil (interactive) (undo) (exchange-point-and-mark)) but obviously undo would have to work in several steps without selecting wrong text. - D