How to make kupfer consider spaces in searches as a wildcard?

Asked by Sb on 2013-10-18

Hi there,

I'm really finding Kupfer to be very useful. I heavily use it for launching documents. I noticed that for filenames that contain spaces, Kupfer matches with wildcards. So typing "tax 20" will match "taxreturn 2012.ods" and "taxreturn 2013.ods". This is exactly what I want. However, most of my files are named with underscores instead of spaces, such as "taxreturn_2013.ods". For most, but not all situations, Kupfer usually doesn't find files with underscores if I search for the first and last part of the filename. For example, in the above example I confirmed that a search for "tax 20" does not find any files named like "taxreturn_2013.ods". But if I rename the files with a space, like "taxreturn 2013.ods" it does find them.

Thanks for the help!

Question information

English Edit question
kupfer Edit question
No assignee Edit question
Last query:
Last reply:

I have done some test and I can't find problem.
Tested on: "taxreturn 2012.ods" "taxreturn_2013.ods" "taxreturn 2013.ods" - I can find all files in Kupfer. by simple pressing "tax2013".

I think - its "feature" related to OpenOffice plugin.
This plugin can find ods (ant other) files outside indexed folders only when this files was loaded in Open/LibreOffice.

Please check putting this files in example home directory.

Sb (sb56637) said : #2

Hi Karol, thanks for the help.

I don't think the file type makes any difference. I don't have the OpenOffice plugin enabled, and Kupfer behaves the same whether the taxreturn files have a .txt or .ods extension.

You are correct that Kupfer does find both "taxreturn_2013.ods" and "taxreturn 2013.ods" with the search "tax2013". Thanks for the tip. However, I would still like to search for "tax 2013" (with a space) and see it return both "taxreturn_2013.ods" and "taxreturn 2013.ods". Is there any way to make it see underscores in filenames as though they were a space?

Thanks again.

I guess - problem is with space key that is used to moving on the items.
Please try to change line:
   if keyv == key_book["space"]:
to something lika
   if False:
or remove this whole block of code.

Can you help with this problem?

Provide an answer of your own, or ask Sb for more information if necessary.

To post a message you must log in.