(1) In Everything, there are many types of macros
(2) But in particular a macro can be applied to/as a filter. Is this correct?
(3) A Filter is a predefined search string
(4) This is ***a*** definition of a filter.
(5) The filter will generate a search for my surname "Greaves" amongst the 365.022 objects in my system.
(6) The Filter's name/identifier is "Christopher"
(7) If I choose I can assign a macro name to this filter.
(8) I have chosen the macro name "chris" for this filter.
(9) If I choose I can assign a shortcut key combination to this filter
(10) I have chosen Ctrl+Alt+C as the shortcut key.
(11) Excepting that I have assigned the macro name "chris" to the filter "Christopher" and as well assigned the shortcut combination Ctrl+Alt+C to the filter "Christopher", the macro and the shortcut combination have no relationship.
(12) To find objects that hold my surname I can hold down the Ctrl and Alt keys and tap the letter C
(13) To find objects that hold my surname I can type "chris:" without the quotes in the search box
This is not a complete and rigorous definition of a filter, a macro, or a shortcut key combination, but please and thank you, is the above set of statements correct as it stands?
I am trying to generate a spine to support further aspects of filetsr/macros/shortcuts.
Thanks, Chris
Understanding Macros, but first Filters
-
- Posts: 684
- Joined: Wed Jan 05, 2022 9:29 pm
Re: Understanding Macros, but first Filters
A Macro is a text shortcut for your filter.(2) But in particular a macro can be applied to/as a filter. Is this correct?
A filter can define one macro.
If the macro is an empty string, no macro is defined.
Filter macros can be accessed from an Everything search with <macro-name>:
<macro-name>: is expanded to the search specified in your filter.
In your screenshot, your macro is: Chris
If you search for: chris:
Everything will expand this to: Greaves
Yes, your definition is good.is the above set of statements correct as it stands?
-
- Posts: 684
- Joined: Wed Jan 05, 2022 9:29 pm
Re: Understanding Macros, but first Filters
Thank you David. Now my Hidden Agenda is revealed!
While working through https://www.voidtools.com/support/everything/searching/ I came across this, but could not make them work as they are shown here:- I think that these macros are now known as "Character Entities".
Is this correct?
I searched the forums for a post where the naming has changed but couldn't find a relevant announcement.
Of course I got confused, because my first introduction to the term "macro" was that of a labeled chunk of text that expanded inline in a pre-processor, but since Microsoft trampled all over that definition , it has come to mean what we used to call Subroutines.
I suspect that the page at https://www.voidtools.com/support/everything/searching/ needs a tiny edit, is all.
Thanks, Chris
Re: Understanding Macros, but first Filters
What happens? -do you get zero results?I came across this, but could not make them work as they are shown here
Some of these characters are not valid in filenames and work best with other functions, such as content:quot:
Yes, these are character entities.I think that these macros are now known as "Character Entities".
Is this correct?
For Everything 1.4, I would leave these defined as Macros as they are parsed that way.
Everything 1.4 has quirks with these character entities.
For example: quot:abcquot: doesn't work, you need to break the text with ""
For example: quot:abc""quot:
I'll define these correctly as character entities in the next Everything 1.5 alpha update.
For Everything 1.5, the syntax changes slightly to &<character-entity-name>:
I'll update the support wiki to match once Everything 1.5 is closer to release.
-
- Posts: 684
- Joined: Wed Jan 05, 2022 9:29 pm
Re: Understanding Macros, but first Filters
I forgot to mention that I am using 1.5.0.1333a. I am sorry.
I got zero results using :quot: , I suspect for the reasons you give.
I got ideal results with #quot: (I think it is).
So I can now get Character Entities to work. I just have to work out (and give examples) of how to use them to solve a real problem!
Thanks again
Chris
Re: Understanding Macros, but first Filters
:quot: will not work, you'll need to use quot:
The quot: syntax has limitations.
You cannot easily combine with other text.
The recommended syntax for Everything 1.5 is: ":
#quot: is a preprocessor character entity.
While both are replaced with: " there is a difference:
The preprocessor character entity #quot: is expanded before the search is executed.
": is expanded after the search terms are parsed.
With:
#quot:abc 123#quot:
the quotes are not treated literally and will escape the space.
With:
":abc 123":
the quote are treated literally.
The quot: syntax has limitations.
You cannot easily combine with other text.
The recommended syntax for Everything 1.5 is: ":
#quot: is a preprocessor character entity.
While both are replaced with: " there is a difference:
The preprocessor character entity #quot: is expanded before the search is executed.
": is expanded after the search terms are parsed.
With:
#quot:abc 123#quot:
the quotes are not treated literally and will escape the space.
With:
":abc 123":
the quote are treated literally.
-
- Posts: 684
- Joined: Wed Jan 05, 2022 9:29 pm
Re: Understanding Macros, but first Filters
": is a unicode html character entity, like >: and <: and &: and ©: or ©:ChrisGreaves wrote: ↑Tue Feb 07, 2023 8:52 pm I get the feeling that quot: was an early development, superseded by two forms ": and #quot: Is that correct?
#quot: is also a unicode html character entity, but is rendered in the pre-processor (pre parsing pass), which is a difficult topic to discuss and takes examples and experimentation. You can build normal time functions with pre-processor character entities and pre-processor functions, to make your functions more dynamic in nature. (I'm pretty sure pre-processor character entities are just pre-processor functions with a static return.)
quot:string is a real function that is evaluated in normal time by wrapping the passed string parameter in quotes. (edit)
quot: is the same as ": but deprecated (obsolete).
quote:string is a real function that is evaluated in normal time by wrapping the passed string parameter in quotes.
Last edited by raccoon on Wed Feb 08, 2023 5:01 pm, edited 1 time in total.
Re: Understanding Macros, but first Filters
Yes, correct.Thanks Void. I get the feeling that quot: was an early development, superseded by two forms ": and #quot:
Is that correct?
quot: is still supported.
However, it's quirky to use with text, so ": will be recommended in Everything 1.5 and later.
quot: is a character entity.quot:string is a real function that is evaluated in normal time by wrapping the passed string parameter in quotes.
quote:<parameter> is the preprocessor function that quotes any spaces/special-characters in the specified parameter.
-
- Posts: 684
- Joined: Wed Jan 05, 2022 9:29 pm
Re: Understanding Macros, but first Filters
Thank you Raccoon. Everything is becoming clearer day by day.raccoon wrote: ↑Wed Feb 08, 2023 12:42 am ": is a unicode html character entity, like >: and <: and &: and ©: or ©:
#quot: is also a unicode html character entity, but is rendered in the pre-processor (pre parsing pass), ...
quot:string is a real function that is evaluated in normal time by wrapping the passed string parameter in quotes.
I am reserving pre-processing for a separate week.(grin)
Cheers, Chris