From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tom Newsgroups: gmane.emacs.devel Subject: Undo history for VC revert Date: Fri, 5 Dec 2014 21:15:26 +0000 (UTC) Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1417814165 22548 80.91.229.3 (5 Dec 2014 21:16:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 5 Dec 2014 21:16:05 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Dec 05 22:15:59 2014 Return-path: Envelope-to: ged-emacs-devel@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 1Xx0EF-0003uG-Lu for ged-emacs-devel@m.gmane.org; Fri, 05 Dec 2014 22:15:55 +0100 Original-Received: from localhost ([::1]:52485 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xx0EF-0005BS-3f for ged-emacs-devel@m.gmane.org; Fri, 05 Dec 2014 16:15:55 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43683) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xx0E6-0005BL-PO for emacs-devel@gnu.org; Fri, 05 Dec 2014 16:15:52 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xx0E0-0000nY-Ho for emacs-devel@gnu.org; Fri, 05 Dec 2014 16:15:46 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:36289) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xx0E0-0000nJ-0W for emacs-devel@gnu.org; Fri, 05 Dec 2014 16:15:40 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Xx0Dx-0003mC-UF for emacs-devel@gnu.org; Fri, 05 Dec 2014 22:15:38 +0100 Original-Received: from 92-249-133-159.pool.digikabel.hu ([92.249.133.159]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 05 Dec 2014 22:15:37 +0100 Original-Received: from adatgyujto by 92-249-133-159.pool.digikabel.hu with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 05 Dec 2014 22:15:37 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 21 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: sea.gmane.org User-Agent: Loom/3.14 (http://gmane.org/) X-Loom-IP: 92.249.133.159 (Mozilla/5.0 (Windows NT 6.1; rv:33.0) Gecko/20100101 Firefox/33.0) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:179014 Archived-At: It often happens that I hack on some buffer then decide to abandon the changes, so I vc-revert the file, but sometime later it occurs to me the direction was correct after all and I want the changes back. If I decide it shortly after the revert then I may be able to get back the changes with undo. However, if I closed the buffer since then, or tried an other approach in the same buffer after the revert then undo may not be available or the undo state can diverge so much from the previously reverted version that it's not trivial to go back to that with undo. For this reason it would be handy if vc-revert had an undo history. Nothing complicated, just storing the last several diffs shown by vc-revert in memory (we don't close Emacs too often, so it's enough) and a way to retrieve them. This simple package does this and it's quite short and trivial, so this feature could be added to VC as well: http://www.emacswiki.org/emacs/VCUndoHistory