Changes between Version 13 and Version 14 of EmacsInterface/Undo
- Timestamp:
- May 26, 2012, 2:11:43 PM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
EmacsInterface/Undo
v13 v14 1 1 === Undo === 2 2 3 RefactorErl had an undo operation for refactorings, but with this method3 !RefactorErl had an undo operation for refactorings, but with this method 4 4 could you lose some modifications. Namely if the you edit the text after a 5 5 refactoring, then undo the changes, all changes since the last … … 17 17 This extended undo is implemented by a stand alone Haskell program, so we need ghci Haskell Compiler 18 18 and cabal packaging system, that makes easier the installation of the required packages, modules. 19 The Haskell compiler can be downloaded from the website http://www.haskell.org/ghc/download. Cabal is 20 available at http://www.haskell.org/cabal/download.html or on Linux systems with cabal-install package. 21 The files of this component can be found in ''lib/referl_ui'' directory within the ''tool'' under ''emacs''. In this directory 22 you have to run ''make'' for compiling the source. To enable the new undo mode you had to set the 23 refactorerl-undo-mode to selective-undo. 19 * The Haskell compiler can be downloaded from the website http://www.haskell.org/ghc/download. 20 * Cabal is available at http://www.haskell.org/cabal/download.html or on Linux systems with cabal-install package. 21 * The files of this component can be found in ''lib/referl_ui'' directory within the ''tool'' under ''emacs''. In this directory you have to run ''make'' for compiling the source. 22 * To enable the new undo mode you had to set the refactorerl-undo-mode to selective-undo. 24 23 25 24 ==== Usage ==== 26 25 27 26 The undo (redo) function is available in the Refactor menu with Undo 28 (Redo) menu item [[Image(sel-undo.png)]]. Calling the last change point in the Undo menu,27 (Redo) menu item. Calling the last change point in the Undo menu, 29 28 the program undoes the last change in the current file. Case refactoring the modifications will be rejected in 30 29 every affected file, but in some cases can conflits arise. When you edit an affected file, or make one another … … 32 31 overlapped, the undo reverts also this change, otherwise only the first one, and you get a merged state of the file. 33 32 At more complex changes can also more changes get reversed. In both cases the changes can be redone until a newer modification. 33 34 [[Image(sel-undo.png, 500px, align=center)]] 34 35 35 36 You can undo also older changes, not only the last one. This operation is called selective undo. In the undo menu under last … … 41 42 algorithm of the conflicts. 42 43 43 Example 1. [[Image(ex-1-merge.png)]]44 Example 1. 44 45 45 46 1. we move the ''pzip'' function from module ''from'' to … … 50 51 successful, the edited text is unchanged 51 52 52 Example 2. [[Image(ex-2-confl.png)]] 53 [[Image(ex-1-merge.png, 500px, align=center)]] 54 55 56 Example 2. 53 57 54 58 1. we move the ''pzip'' function from module ''from'' to module ''xlists'' 55 59 2. item we edit the module ''xlists'' after refactoring in area, that is affected by refactoring (''pzip'') 56 60 3. then we undo the refactoring in the module ''from'': conflict arises, the change by editing is rejected 61 62 [[Image(ex-2-confl.png, 500px, align=center)]]