Commits

Anonymous committed 638e68b

Skipping blanks in batchset

Comments (0)

Files changed (4)

 New Features
 ============
 
+* Find occurrences; ``C-c f``
+* Lucky-assist; ``M-?``
+* Setting many configs using batchset in dialogs
+* Showing the old value of a field in dialogs
+* New file/directory/module/package; ``C-x p n [fdmp]``
+* Edit project config; ``C-x p c``
+* Updating buffers with moved files after refactorings
 
 
 Setting Up
 Code-Assist
 -----------
 
-``rope-code-assist`` (``M-/`` by default) function will let you select
+``rope-code-assist`` command (``M-/`` by default) will let you select
 from a list of completions.  If prefixed (``C-u M-/``), ropemacs
 inserts the common prefix, automatically.  If a numeric argument is
 given, rope will insert the common prefix for that many of the first
 proposals.
 
-The ``rope-lucky-assist`` (``M-?``) does not ask, anything; instead,
-it inserts the first proposal.  By prefixing it, you can select which
-proposal to use.  ``C-u 1 M-?`` uses the second propsal, for instance.
+``rope-lucky-assist`` command (``M-?``) does not ask, anything;
+instead, it inserts the first proposal.  By prefixing it, you can
+choose which proposal to insert.  ``C-u 1 M-?`` uses the second
+propsal, for instance.
 
 Here::
 
 ============  ==========  =======================
 
 
-Dialog batchset command
------------------------
+Dialog ``batchset`` Command
+---------------------------
 
 When you use rope dialogs there is a command called ``batchset``.  It
 can be used to set many configs at the same time.  After selecting
 this command from dialog base prompt, you are asked to enter a string.
 
-Batch-set strings can give value to configs in two ways.  The single
-line form is like this::
+``batchset`` strings can give value to configs in two ways.  The
+single line form is like this::
 
   name1 value1
   name2 value2
    ?pycore.type == rope.base.pycore.PyCore
    ?project.type == rope.base.project.Project
 
-Now this string can be used for ``batchset`` string in restructuring
-dialog.
+This is a valid ``batchset`` string for restructurings.  When using
+batchset, you usually want to skip initial questions.  That can be
+done by prefixing refactorings.
 
 
 Key-binding
 
 > Public Release 1.0
 
+> Public Release 0.4
+
 * adding a menu
 * including pymacs in ropemacs?
 * change pymacs to accept unicode strings
 * saving the old values of refacturing config
+* showing proposal type in code-assist
 
-> Public Release 0.3
-
-* showing proposal type in code-assist
+> Public Release 0.3 : December 5, 2007

ropemacs/dialog.py

             value = ''
             if len(tokens) > 1:
                 result.append([tokens[0], tokens[1].rstrip('\r\n')])
-            else:
+            elif len(tokens) > 0:
                 multiline = True
                 result.append([tokens[0], ''])
     return dict(result)
              'name3': 'value3\n'}, result)
         self.assertEquals('done', action)
 
+    def test_skipping_blanks(self):
+        optionals = {'name1': dialog.Data(), 'name2': dialog.Data()}
+        minibuffer = _MockAskConfig(
+            ['batchset', '\nname1\n value1\n\nname2 value2\n\n', 'done'])
+        action, result = dialog.show_dialog(minibuffer, ['done', 'cancel'],
+                                            optionals=optionals)
+        self.assertEquals(
+            {'name1': 'value1\n', 'name2': 'value2'}, result)
+        self.assertEquals('done', action)
+
     def test_skip_initial_asking(self):
         confs = {'name': dialog.Data()}
         minibuffer = _MockAskConfig(
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.