From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: proposal: edit-rectangle Date: Fri, 07 Oct 2016 16:31:00 -0400 Message-ID: References: <87pondz5an.fsf@gmail.com> Reply-To: rms@gnu.org NNTP-Posting-Host: blaine.gmane.org Content-Type: text/plain; charset=Utf-8 X-Trace: blaine.gmane.org 1475872384 15824 195.159.176.226 (7 Oct 2016 20:33:04 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 7 Oct 2016 20:33:04 +0000 (UTC) Cc: emacs-devel@gnu.org To: Thierry Volpiatto Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 07 22:33:00 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bsbos-0000vw-24 for ged-emacs-devel@m.gmane.org; Fri, 07 Oct 2016 22:32:38 +0200 Original-Received: from localhost ([::1]:38335 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bsboq-0003Ft-I5 for ged-emacs-devel@m.gmane.org; Fri, 07 Oct 2016 16:32:36 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51243) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bsbnO-0002Hn-K6 for emacs-devel@gnu.org; Fri, 07 Oct 2016 16:31:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bsbnM-0003c0-Dd for emacs-devel@gnu.org; Fri, 07 Oct 2016 16:31:05 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:33580) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bsbnK-0003ZZ-Bn; Fri, 07 Oct 2016 16:31:02 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1bsbnI-0007S4-Jd; Fri, 07 Oct 2016 16:31:00 -0400 In-reply-to: <87pondz5an.fsf@gmail.com> (message from Thierry Volpiatto on Thu, 06 Oct 2016 20:44:00 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:208066 Archived-At: [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > Also, after inserting the new rectangle, undo should restore buffer as > before, just need for this to add `buffer-disable-undo` in first fn and > `buffer-enable-undo` in second fn. A smarter way to handle it is to scan the undo list at the end of edit-rectangle, and convert those specific undo entries so that they describe the same changes as having been made directly in the buffer. That way, you could undo those individual changes one by one. > The results are a bit awkward if you `restore-rectangle' with more lines > than you started with, but I don't have any ideas offhand for > obviously better behavior. Perhaps duplicate the last line of the surrounding text so that you have enough lines to put the rectangle into. -- Dr Richard Stallman President, Free Software Foundation (gnu.org, fsf.org) Internet Hall-of-Famer (internethalloffame.org) Skype: No way! See stallman.org/skype.html.