match_start_of_filename_with_caret not always working

Discussion related to "Everything" 1.5 Alpha.
Post Reply
rgbigel
Posts: 41
Joined: Sun Apr 17, 2011 4:00 pm

match_start_of_filename_with_caret not always working

Post by rgbigel »

When I use a search for #0789 I get the correct result with two files,

#0789.jpg
#0789 - Kopie.jpg

As soon as I add the leading caret the results list is empty.

This also happens for a search with $ at the end of #0789$

it does not happen for searches containing no # character. (I have not tried other "special" characters).

What could the reason be?
void
Developer
Posts: 16677
Joined: Fri Oct 16, 2009 11:31 pm

Re: match_start_of_filename_with_caret not always working

Post by void »

What search options to you have checked under the Search menu?

Note: If match path is enabled, the whole path must match your search.
In other words, ^#0789.jpg will not match C:\folder\#0789.jpg

Set match_start_of_filename_with_caret to 2 to match the basename only.

Check the current match_start_of_filename_with_caret settings:
  • In Everything, type in the following search and press ENTER:
    /match_start_of_filename_with_caret
  • What is shown in the statusbar?
To enable match_start_of_filename_with_caret:
  • In Everything, type in the following search and press ENTER:
    /match_start_of_filename_with_caret=2
  • if successful, match_start_of_filename_with_caret=2 is shown in the status bar for a few seconds
To enable match_end_of_filename_with_dollar_sign:
  • In Everything, type in the following search and press ENTER:
    /match_end_of_filename_with_dollar_sign=1
  • if successful, match_end_of_filename_with_dollar_sign=1 is shown in the status bar for a few seconds
Please make sure Store settings and data in %APPDATA%\Everything is enabled:
  • In Everything, from the Tools menu, click Options.
  • Click the General tab on the left.
  • Check Store settings and data in %APPDATA%\Everything
  • Click OK.
Check the debug output from Tools -> Debug -> Console, what is shown after performing a search for:
^#0789.jpg

You should see something like:

FOLDER TERM START 00000000062efd48 M 000000000012e3e0 N 000000000012e500
00000000062efd48 e01140 M 000000000012e3e0 N 000000000012e500 OP [b]153[/b] #0789.jpg
FILE TERM START 00000000062efd48 M 000000000012e3e0 N 000000000012e500
00000000062efd48 e01140 M 000000000012e3e0 N 000000000012e500 OP [b]153[/b] #0789.jpg
rgbigel
Posts: 41
Joined: Sun Apr 17, 2011 4:00 pm

Re: match_start_of_filename_with_caret not always working

Post by rgbigel »

OK, I was unaware of the /match_start_of_filename_with_caret=2 Option, which was set to 1 before.

Using =2, it works. However, I still do not understand why the leading "#" makes any difference. What's so special about that character?

However,

/match_end_of_filename_with_dollar_sign=1 (or =2, for that matter, if that is defined at all)

still does not work as expected. I did some trials and found that none of the settings here work.

Then it struck me that the end_of_filename is NOT the part before the extension, but the entire file name.
Well, when I use "#0789." instead of "#0789$" I get the results I need.

Not exactly an orthogonal behavior, but acceptable.
horst.epp
Posts: 1443
Joined: Fri Apr 04, 2014 3:24 pm

Re: match_start_of_filename_with_caret not always working

Post by horst.epp »

rgbigel wrote: Fri Jul 09, 2021 12:57 pm ...
Then it struck me that the end_of_filename is NOT the part before the extension, but the entire file name.
Well, when I use "#0789." instead of "#0789$" I get the results I need.

Not exactly an orthogonal behavior, but acceptable.
Thats not logical at all for me.
I would classify this behaviour as bug.
match_end_of_filename_with_dollar_sign=1
should match the end of the base name without extension.
void
Developer
Posts: 16677
Joined: Fri Oct 16, 2009 11:31 pm

Re: match_start_of_filename_with_caret not always working

Post by void »

Basename includes the extension in Everything.

Use the stem: search function to match the basename without extension.

For example:

stem:#0789$

Note: the $ can also be used with search functions to match the end of the text.

I will look into an option to match the stem only when using $
Thanks for the suggestion.
Post Reply