Index: trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/ImageryHandler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/ImageryHandler.java	(revision 7250)
+++ trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/ImageryHandler.java	(revision 7251)
@@ -126,5 +126,5 @@
     @Override
     public String getUsage() {
-        return "adds an imagery layer (e.g. WMS, TMS))";
+        return "adds an imagery layer (e.g. WMS, TMS)";
     }
 
Index: trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/LoadAndZoomHandler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/LoadAndZoomHandler.java	(revision 7250)
+++ trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/LoadAndZoomHandler.java	(revision 7251)
@@ -6,4 +6,6 @@
 import java.awt.geom.Area;
 import java.awt.geom.Rectangle2D;
+import java.util.Collection;
+import java.util.Collections;
 import java.util.HashSet;
 import java.util.Set;
@@ -15,4 +17,5 @@
 import org.openstreetmap.josm.actions.downloadtasks.DownloadTask;
 import org.openstreetmap.josm.actions.downloadtasks.PostDownloadHandler;
+import org.openstreetmap.josm.actions.search.SearchCompiler;
 import org.openstreetmap.josm.data.Bounds;
 import org.openstreetmap.josm.data.coor.LatLon;
@@ -70,5 +73,5 @@
     @Override
     public String[] getOptionalParams() {
-        return new String[] {"new_layer", "addtags", "select", "zoom_mode", "changeset_comment", "changeset_source"};
+        return new String[] {"new_layer", "addtags", "select", "zoom_mode", "changeset_comment", "changeset_source", "search"};
     }
 
@@ -91,5 +94,7 @@
         } else {
             return new String[] {
-            "/zoom?left=8.19&right=8.20&top=48.605&bottom=48.590&select=node413602999"};
+            "/zoom?left=8.19&right=8.20&top=48.605&bottom=48.590&select=node413602999",
+            "/zoom?left=8.19&right=8.20&top=48.605&bottom=48.590&search=highway+OR+railway",
+            };
         }
     }
@@ -163,5 +168,5 @@
                     Set<OsmPrimitive> newSel = new HashSet<>();
                     DataSet ds = Main.main.getCurrentDataSet();
-                    if(ds == null) // e.g. download failed
+                    if (ds == null) // e.g. download failed
                         return;
                     for (SimplePrimitiveId id : toSelect) {
@@ -173,12 +178,5 @@
                     toSelect.clear();
                     ds.setSelected(newSel);
-                    if (PermissionPrefWithDefault.CHANGE_VIEWPORT.isAllowed()) {
-                        // zoom_mode=(download|selection), defaults to selection
-                        if (!"download".equals(args.get("zoom_mode")) && !newSel.isEmpty()) {
-                            AutoScaleAction.autoScale("selection");
-                        } else {
-                            zoom(bbox);
-                        }
-                    }
+                    zoom(newSel, bbox);
                     if (Main.isDisplayingMapView() && Main.map.relationListDialog != null) {
                         Main.map.relationListDialog.selectRelations(null); // unselect all relations to fix #7342
@@ -188,7 +186,18 @@
                 }
             });
-        } else if (PermissionPrefWithDefault.CHANGE_VIEWPORT.isAllowed()) {
+        } else if (args.containsKey("search") && PermissionPrefWithDefault.CHANGE_SELECTION.isAllowed()) {
+            try {
+                final DataSet ds = Main.main.getCurrentDataSet();
+                final SearchCompiler.Match search = SearchCompiler.compile(args.get("search"), false, false);
+                final Collection<OsmPrimitive> filteredPrimitives = Utils.filter(ds.allPrimitives(), search);
+                ds.setSelected(filteredPrimitives);
+                zoom(filteredPrimitives, bbox);
+            } catch (SearchCompiler.ParseError ex) {
+                Main.error(ex);
+                throw new RequestHandlerErrorException(ex);
+            }
+        } else {
             // after downloading, zoom to downloaded area.
-            zoom(bbox);
+            zoom(Collections.<OsmPrimitive>emptySet(), bbox);
         }
 
@@ -213,13 +222,19 @@
     }
 
-    protected void zoom(final Bounds bounds) {
-        // make sure this isn't called unless there *is* a MapView
-        if (Main.isDisplayingMapView()) {
+    protected void zoom(Collection<OsmPrimitive> primitives, final Bounds bbox) {
+        if (!PermissionPrefWithDefault.CHANGE_VIEWPORT.isAllowed()) {
+            return;
+        }
+        // zoom_mode=(download|selection), defaults to selection
+        if (!"download".equals(args.get("zoom_mode")) && !primitives.isEmpty()) {
+            AutoScaleAction.autoScale("selection");
+        } else if (Main.isDisplayingMapView()) {
+            // make sure this isn't called unless there *is* a MapView
             GuiHelper.executeByMainWorkerInEDT(new Runnable() {
                 @Override
                 public void run() {
-                    BoundingXYVisitor bbox = new BoundingXYVisitor();
-                    bbox.visit(bounds);
-                    Main.map.mapView.recalculateCenterScale(bbox);
+                    BoundingXYVisitor bbox1 = new BoundingXYVisitor();
+                    bbox1.visit(bbox);
+                    Main.map.mapView.recalculateCenterScale(bbox1);
                 }
             });
