David Baron writes: > On Tuesday 28 Elul 5771 17:26:33 David Baron wrote: > > On Tuesday 28 Elul 5771 17:04:29 Jean-Francois Dockes wrote: > > > David Baron writes: > > > > <Log files enclosed: > > > > <console-log from console > > > > <krunner-log from krunner > > > > > > > > Note that the krunner one has a query *'downloads'* !! > > > > > > > > I do not do this, obviously. > > > > > > > > I have asked a correspondant to do this same test with a non -f test > > > > which was also not succeding but returning 3 / 150 hits. > > > > > > Ok, thanks for the logs, they make it clearer what is happening here. > > > > > > >From krunner: > > > :4:../rcldb/rclquery.cpp:174:Query::setQuery: > > > :4:../rcldb/rcldb.cpp:1525:Rcl::Db::filenameWildExp: > > > :pattern:[*'Downloads'*] > > > > > > Command line: > > > :4:../rcldb/rclquery.cpp:174:Query::setQuery: > > > :4:../rcldb/rcldb.cpp:1525:Rcl::Db::filenameWildExp: pattern: [Downloads] > > > > > > I will be using [] for quoting in the rest of the message (the [] are not > > > part of the strings). > > > > > > First a bit of explanation on the handling of file name searches: recoll > > > will prepend and append a [*] to a file name search if it does not > > > already contain wildcards and is not capitalized. Trying to do the right > > > thing here, but maybe being slightly too clever. > > > > > > So the krunner search is expanded from ['Downloads'] to [*'Download'*] > > > because ['] is not a capital (not punctuation either because of searches > > > like o'donnell etc.) > > > > > > The second search is not expanded because [D] is a capital. > > > Alternatively, searching for [download] would yield a [*download*] > > > search. > > > > > > This is all particularly ennoying because it does not show in the end > > > search, which only has the XNONENoMatchingTerms thing, because expansion > > > actually occurs (or not) before the search is passed to Xapian. > > > > > > I'll easily admit that the Recoll choices are dubious here (I'm open to > > > suggestions), and I was going to write that I'd least document this > > > disconcerting behaviour of the file name search, but in fact, it is, > > > already: > > > > > > http://www.recoll.org/usermanual/rcl.search.html#RCL.SEARCH.SIMPLE > > > > > > The actual problem here seems to be too much quoting in the data sent by > > > krunner. The parameter incoming to recoll is really ['Download'] when it > > > should just be [Download]. This might also cause the other query issues > > > that you mention. > > > > > > What's strange is that such a krunner issue should also show with other > > > commands ? Or was the search actually entered with single quotes in the > > > krunner window ? I can't really guess what happens or should be done here > > > because I don't know how krunner executes commands (sh -c or exec(2) or > > > whatever...) > > > > The run is being done by a start( QString cmd, QStringList args ) type of > > fork. I, as recommended, place the query string argument in single quotes > > in the program, not in krunner's text line window. I assume the internal > > start() function is an exec but I could be wrong. > > > > Question, since the query string is a singe QString, last entry in the > > QStringList, should the quotes not be there? Within this list of arguments, > > there is no ambiguity. Question would be after it is expanded in the run > > shell, would the non-quoted string be problematic?
You'd have to check what the "start" function actually does. If it starts a shell to execute the command, in a way which will make the wildcards expand (and the quoting be removed), you need quoting. Given the look of the call, I'd guess that it's closer to a simple fork/exec operation, meaning that no wildcard expansion will take place before recoll receives the arguments, and that you must not quote. > > Easy enough to try out but not knowing recoll's internals, cannot really > > touch all the bases. Recoll internals are not in cause here, you'd have the same problems executing "vi" or "ls" > I tried it and lo and behold, I get filename search results. Ok, then confirmation of the fork/exec kind of spawn. > A big question, however: The GUI implies and my results seem to indicate > that the and/or/query-language options do not work with filenames. Is > this true? Or would they work WITH the quotes (seems not to)? > > This is a GUI design issue since if filename is an exclusive option, then it > would radio-button with the others or gray them if checkboxed. Hhm sorry, I'm a bit lost here, what radio-buttons ? I'm not sure what dialog we're talking about here ? Using the query language, filename queries can be normally combined in others ie, like in [wildcard filename:*manual*] (this would return among others usermanual.sgml which has the term [wildcard] in it). Using the simple search "File name" option, there is nothing to combine it with, this is a pure file name search. I think that this is more or less correctly described in the "search" section of the manual: http://www.lesbonscomptes.com/recoll/usermanual/rcl.search.html There many possible combinations though, and I'm not sure I've tested them all. I'll be glad to try and fix problems that I did not see. Cheers, jf -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org