Re: [josm-dev] Search and | ?

2008-12-22 Thread Karl Newman
On Mon, Dec 22, 2008 at 8:29 AM, Ævar Arnfjörð Bjarmason
ava...@gmail.comwrote:

 On Mon, Dec 22, 2008 at 4:39 AM, Russ Nelson nel...@crynwr.com wrote:
  Ævar Arnfjörð Bjarmason writes:
* http://josm.openstreetmap.de/ticket/1864 - Search doesn't support
regex search on keys and/or values
 
  The problem is always the user interface.  I can think of several ways
  to implement regexps:
 
  1) just implement them.  Instead of doing a liberal substring
  search, do a regexp search, always treating their input as a regexp.
  That has the unhappy effect of forcing regexp character
  interpretation, which may give them results which differ from the
  previous behavior (but for the most part would give them the same
  results).
 
  2) keep the current substring search for unqualified string searches,
  but use regexps if they supply a colon (to search in K:V) or user: .
  That has the unhappy effect of not being obvious.
 
  3) use a prefix character to indicate a regexp search, e.g. all
  regexps must start with ^.  Not likely that any literal searches would
  start with ^.

 If this was done it would probably be better to use ~, ^ already has
 special meaning so you'd have to do ^^foo:^^bar to look for a
 key/value that started with foo:bar as opposed to ~foo:~bar

  4) Add it as an option in the Search box:   [] use regular expressions

 This is probably the most sane way to do it. But each part of the
 regex as separated by : needs to be considered as its own regex, i.e.:

  regex1:regex2

 or:

  ^regex.*containing[^colon:]:^[^a]*$


Why not just have two separate text fields, one for key, one for value, and
optional regex search for each?

Karl
___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] Tasks for all of you

2008-12-22 Thread Russ Nelson
Dirk Stöcker writes:
  http://josm.openstreetmap.de/ticket/1712
  Incomplete ways are discarded without notice

What should be done?  Throw an exception immediately?  Load the way
anyway, ignoring missing points, and throw an exception after
everything has been loaded?

In theory, the semantics of this file are as unacceptable as if it
wasn't an XML file at all, and so the proper thing to do is throw
away the entire contents of the file.

In practice, this file may contain valuable data and the best thing to
do is select all the ways in error and report an error message.

-- 
--my blog is athttp://blog.russnelson.com   | Delegislation is a slippery
Crynwr sells support for free software  | PGPok | slope to prosperity.
521 Pleasant Valley Rd. | +1 315-323-1241   | Fewer laws, more freedom.
Potsdam, NY 13676-3213  | Sheepdog  | (Not a GOP supporter).

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev