Bookmark Quotes Question

Discussion related to "Everything" 1.5 Alpha.
Post Reply
froggie
Posts: 311
Joined: Wed Jun 12, 2013 10:43 pm

Bookmark Quotes Question

Post by froggie »

in 1383a the following worked as desired in the search field of a bookmark:

Code: Select all

/expand  "\current*\"    parents:5  columns:"name;;columna;datemodified;size;attributes" add-layout:folders 
columna:=if(child-count-from-disk:<2,if(child-count-from-disk:<1,"No Ini",""),"Info Data Exists") a-label:"Info Data Exists" 
with only one set of quotes needed for each operand.

In 1391a this is required in the search field of the bookmark:

Code: Select all

/expand  "\current*\"    parents:5  columns:"name;columna;datemodified;size;attributes" add-layout:folders 
columna:=if(child-count-from-disk:<2,if(child-count-from-disk:<1,"""No Ini""",""""""),""""Info Data Exists""") a-label:"""Info Data Exists""" 
Now triple quotes are needed where single quotes worked earlier.

Questions: Is this now the intended behavior? I read through all the release notes and didn't not see anything that appeared to be applicable.

Thank you.
NotNull
Posts: 5769
Joined: Wed May 24, 2017 9:22 pm

Re: Bookmark Quotes Question

Post by NotNull »

First thing that stood out was the
a-label:...
instead of
a-label:=...


Quickly tested it with changing a number instead of childfilecount (using [define:number=n] ) and the following works as a regular search:

Code: Select all

[define:number=3] addcol:A  A-label:="Info Data Exists"  column-A:=if($number:<2,if($number:<1,"No Ini",""),"Info Data Exists")


Maybe use IFS() instead of IF() to prevent nesting?

Code: Select all

[define:number=0] addcol:A  A-label:="Info Data Exists"  column-A:=ifs($number:>=2,"Info Data Exists",$number:=1,"",$number:=0,"No Ini",1,"Something's wrong")
The last part -- ,1,"Something's wrong" -- is not needed, but included to catch any possible errors.
There weren't any; a childfilecount of -1 is quite unlikely ;)

Anyway ... no triple-double quotes needed in these cases. ( v1391a x64)
froggie
Posts: 311
Joined: Wed Jun 12, 2013 10:43 pm

Re: Bookmark Quotes Question

Post by froggie »

I appreciate the useful comments and the quick reply, but it is not the regular search that has the quote problem, it is the search line in a bookmark which needs the triple quotes in 1391a to end up with a single quote on the regular search line. With just a single quote in the bookmark it ends up with no quotes in the regular search line and therefore does not work.
NotNull
Posts: 5769
Joined: Wed May 24, 2017 9:22 pm

Re: Bookmark Quotes Question

Post by NotNull »

froggie wrote: Sat Feb 08, 2025 8:01 pm it is not the regular search that has the quote problem, it is the search line in a bookmark which needs the triple quotes
Didn't see that coming .. :o Those should be identical in my opinion.
What does the debug console report?

Tried my test-queries as a bookmark and they work here without issue. Will try your full bookmark syntax later (other stuff to do first)


EDIT: Might have to do something wit /EXPAND as the preprocessor syntax has changed regarding quotes.
What happens without /EXPAND?

EDT2:
Yep .. try the following searches:

Code: Select all

/expand  addcol:A  A:="text"
/expand  addcol:A  A:="""text"""
froggie
Posts: 311
Joined: Wed Jun 12, 2013 10:43 pm

Re: Bookmark Quotes Question

Post by froggie »

Thanks. Good catch. Removing /EXPAND works. I have no memory of why I added /EXPAND when I first wrote this quite a while ago, but it is not needed now for this bookmark, if it ever was.

I still do not understand the new preprocessor syntax, but that is a project for another day.

Minor question. When I tried /expand addcol:A A:="text" ... at the regular search line, it just searched on expand as a search argument, which I don't understand at all. What else have I missed here?
NotNull
Posts: 5769
Joined: Wed May 24, 2017 9:22 pm

Re: Bookmark Quotes Question

Post by NotNull »

froggie wrote: Sat Feb 08, 2025 9:46 pm I still do not understand the new preprocessor syntax
Same here. I had decided to stay away from all topics that concern preprocessor stuff. Better for my mental health :)
(Still 2 things to do that involve the preprocessor, but I'm quite reluctant to go on with it)

froggie wrote: Sat Feb 08, 2025 9:46 pm Minor question. When I tried /expand addcol:A A:="text" ... at the regular search line, it just searched on expand as a search argument
Beats me ..
Post Reply