! (=NOT) shouldn't clear the Results list

Found a bug in "Everything"? report it here
Post Reply
Stamimail
Posts: 1122
Joined: Sat Aug 31, 2013 9:05 pm

! (=NOT) shouldn't clear the Results list

Post by Stamimail »

The user wants to exclude some items in current Results, not the all items.
therube
Posts: 4605
Joined: Thu Sep 03, 2009 6:48 pm

Re: ! (=NOT) shouldn't clear the Results list

Post by therube »

It's ! ;-) really clearing the Results list.
It's more as if you have entered a search term that returns 0 results.

And after your ! is entered fully, all returns as was.
Well maybe perhaps except for sort or cursor positioning.

But again it is not ! that is doing this, it is the fact that you're changing your search term.


> fiona apple

now if backspace through apple & make it !apple

> fiona !apple

all is pretty much well

but if append the term 'smith' or '!smith' or 'smith!' to my query, the results list do "clear", but that is to be expected

The ! is ! acting magically.
It is acting as any other key, literally as a '!', until its purpose changes to the NOT function.
So ! is !, but !! is a NOT!.


(Considering I always use &, everywhere just about, rather then that word, wonder why I don't typically use ! for this word? NOT!)
void
Developer
Posts: 15279
Joined: Fri Oct 16, 2009 11:31 pm

Re: ! (=NOT) shouldn't clear the Results list

Post by void »

Make sure there is no space after the !
eg: !ABC
Otherwise, ! ABC is seen as NOT<empty term> AND ABC
NOT<empty term> will never match anything.

A ! by itself is also seen as NOT<empty term>

Also, please note you can use double quotes to escape the !
eg, If you wish to search for a literal !ABC use: "!ABC"
Stamimail
Posts: 1122
Joined: Sat Aug 31, 2013 9:05 pm

Re: ! (=NOT) shouldn't clear the Results list

Post by Stamimail »

My problem was:
After I'm writing ! in Search edit, the Results disappear BEFORE I'm typing another character. The Function NOT shouldn't be launched till there is another character after !.
[I didn't understand therube. I think in my Everything it works differently]
BTW,
Using the character ! for NOT is very confusing, since this character is valid character and already used in Folders/Files Names.
I believe this method came from programming or something, but I think it's not the best syntax to do NOT in Everything Search.
There are those characters:
A filename cannot contain any of the following characters:
\ / : * ? " < > |
Perhaps a combination out of these characters (like <> or !: or something else) could be better.
therube
Posts: 4605
Joined: Thu Sep 03, 2009 6:48 pm

Re: ! (=NOT) shouldn't clear the Results list

Post by therube »

Yes ! is a typical NOT.
Though sometimes ^ (the hat) is also NOT (like with Regex).

You could use Allow literal operators, but then you'd have to use it for AND and OR too.
(But... Literal NOT might be broken?)
Stamimail
Posts: 1122
Joined: Sat Aug 31, 2013 9:05 pm

Re: ! (=NOT) shouldn't clear the Results list

Post by Stamimail »

What at the end about this topic ? Is "NOT" function is going to get better or stay the same?
viewtopic.php?f=6&t=5223#p13626
void
Developer
Posts: 15279
Joined: Fri Oct 16, 2009 11:31 pm

Re: ! (=NOT) shouldn't clear the Results list

Post by void »

This is tricky to change now, maybe an ini option to specify the not operator?
eg: <>

It's probably more common for online searches to use - as not, but that is probably a more common file name character.

! can also be escaped with double quotes, for example:
"!"
Stamimail
Posts: 1122
Joined: Sat Aug 31, 2013 9:05 pm

Re: ! (=NOT) shouldn't clear the Results list

Post by Stamimail »

void wrote:This is tricky to change now, maybe an ini option to specify the not operator?
eg: <>
I'm not sure what you mean.
I was thinking about something like the functions format, i.e. NOT will be:
!:
Another problem was mentioned is the behaviour of !, which clear the results when typed. Do you think it's the right behaviour? Can you make it stay till typing the next character?
therube
Posts: 4605
Joined: Thu Sep 03, 2009 6:48 pm

Re: ! (=NOT) shouldn't clear the Results list

Post by therube »

Can you make it stay till typing the next character?
I suppose that ! is slightly different from other characters...

As mentioned, if you preface the ! with ", so, "!, you could use that as a work-around.
(To be more complete, you'd want to use "!".)
Stamimail
Posts: 1122
Joined: Sat Aug 31, 2013 9:05 pm

Re: ! (=NOT) shouldn't clear the Results list

Post by Stamimail »

therube, I wanted the ! (or :!) to be NOT.
The matter is, if I was typing !*, I could understand Why I get 0 results. Now that I'm typing just a single ! I'm saying I was expecting to see the same results as before, till I type the next character.
void
Developer
Posts: 15279
Joined: Fri Oct 16, 2009 11:31 pm

Re: ! (=NOT) shouldn't clear the Results list

Post by void »

I've added the ini option allow_exclamation_point_not to the next beta update, so you can disable the ! operator, this will eventually be added to Tools -> Options -> Search.
I've also added not: to be use as the not operator.
I'll also consider allowing a single ! to be treated as a literal !.
Post Reply