I began a new, simpler topic at Inconsistent approach to implementing a user's bookmark macros
I am documenting the terms “Bookmark, Filter, Macro, Search string, Shortcut key” in the context of raccoon's excellent example.
I set up raccoon's macro and assign the shortcut key Ctrl+Shift+Alt+R.
When I use that shortcut key Everything replaces the existing contents of the search box (anydate:today) with raccoon's code "date-created:|date-modified:|date-changed:|date-recently-changed:|date-accessed:"
The shortcut key has been mapped to the contents of the Bookmarks Custom Search box.
I had expected the shortcut key to map to (and hence produce) "anydate:today" appended to the right of my original string anydate:today
So I have misunderstood at least two aspects of this:-
(1) the use of a shortcut key to generate text in the Everything search box causes the existing contents of the search box to be replaced with the macro expansion.
This is not what I expect. When I invoke an expansion macro I expect the expanded string to appear, but not to lose any existing strings (except of course the string that identifies the macro).
(2) The shortcut key has been mapped to the contents of the Bookmarks Custom Search box.
I had expected to see the string "anydate:today" to appear.
Illumination welcomed!
Cheers, Chris
Shortcut key clears search box?
-
- Posts: 684
- Joined: Wed Jan 05, 2022 9:29 pm
Shortcut key clears search box?
Last edited by ChrisGreaves on Tue May 30, 2023 2:03 pm, edited 2 times in total.
Re: Shortcut key clears serach box?
Remove the Ctrl+Shift+Alt+R shortcut from the current bookmark.
Add another bookmark with the search:
/replace-sel anydate:today
Set the keyboard shortcut to: Ctrl+Shift+Alt+R
/replace-sel
Add another bookmark with the search:
/replace-sel anydate:today
Set the keyboard shortcut to: Ctrl+Shift+Alt+R
/replace-sel
-
- Posts: 684
- Joined: Wed Jan 05, 2022 9:29 pm
Re: Shortcut key clears search box?
Thank you Void.
This is now working for me.
I had a couple of hiccoughs removing the old shortcut key and adding the new bookmark with shortcut.
I suspect that I was not choosing 'OK" from the manage bookmarks dialogue.
Cheers, Chris
-
- Posts: 684
- Joined: Wed Jan 05, 2022 9:29 pm
Re: Shortcut key clears search box?
void wrote: ↑Mon Mar 27, 2023 9:05 amRemove the Ctrl+Shift+Alt+R shortcut from the current bookmark. ... /replace-sel
Paste text into the search box after preprocessor expansion.
For example:
/replace-sel #today:
#cursel: is replaced with the currently selected search text
Works best from a bookmark with a keyboard shortcut.
I am still confused.
"preprocessor expansion" has to me the meaning of "expanding whatever you type in the Search Box to a final form that Everything can execute", and to me that includes search string components, bookmarks, macro names, and shortcut keys. I am experimenting with two Filters and Two Bookmarks, macro names and shortcut keys for each. each of the four items works perfectly alone.
Now I want to combine them.
When I type
MDTB:
The string MDTB: remains in the Search Box
When I type
MDTB: NoTS:
The augmented string MDTB: NoTS: remains in the Search Box
This is what I expect, and I am happy.
I use my shortcut key combination
Ctrl+Alt+Shift+3
ext:doc;docm;docx;dot;dotm;dotx
ext:doc;docm;docx;dot;dotm;dotx
Undaunted I press on and catenate my second shortcut key combination
Ctrl+Alt+Shift+4
In short
(1) Bookmarks can be catenated but shortcut keys cannot. Why is this so?
(2) Search strings can be catenated (
ext:doc;docm;docx;dot;dotm;dotx !~
I confess that to this time I have NOT made use of the Search Command "/replace-sel". That may be the missing piece of the puzzle. But if so, it seems to me that "/replace-sel" is a patch to get over a basic inconsistency in design.
From the user's point of view, a shortcut key is a straight alternative to a macro name. Shouldn't the two behave the same way in the Search Box, when the user enters them in the search Box?
Thanks, Chris
Last edited by ChrisGreaves on Tue May 30, 2023 11:50 am, edited 1 time in total.
Re: Shortcut key clears search box?
Typically, only one bookmark can be opened at time.(1) Bookmarks can be catenated but shortcut keys cannot. Why is this so?
Opening a bookmark will overwrite your search settings and search.
Multiple macro references are supported.(2) Search strings can be catenated (ext:doc;docm;docx;dot;dotm;dotx !~)but shortcut keys cannot. Why is this so?
Referring to a bookmark with a macro does not "open" the bookmark.
The macro reference is replaced with the bookmark search settings and search.
To set Ctrl + Alt + Shift + 3 to insert MDTB: into your search box:
- In Everything, from the Tools menu, click Show All Bookmarks.
- Please remove the Ctrl+Alt+Shift+1 - Ctrl+Alt+Shift+4 keyboard shortcuts from your existing bookmarks.
- Create a new bookmark (click New...):
- Set the Name to: Insert MDTB:
- Set the Search to: /add-search MDTB:
- Set the keyboard shortcut to: Ctrl+Alt+Shift+3
- Click OK.
- Click OK.
-
- Posts: 684
- Joined: Wed Jan 05, 2022 9:29 pm
Re: Shortcut key clears search box?
Thanks Void. I would like to unravel my confusion. From this user’s point of view, a Bookmark is a “stored search string”, in the sense that a Filter too is a “stored search string”.
Regardless of how I bring bookmarks into play, I anticipate that they will behave in a standard manner. Just as in Windows it makes no difference whether I (mouse) double-click on a file or (keyboard) tap the <Enter> key.
(1) When I execute bookmark “MDTB” with the mouse, I get a list of 24,483 objects (documents) with a few tilde-files.
(2) When I execute bookmark “NoTs” with the mouse, I get a list of 620,296 objects (out of a population of 628,643 objects C: and T:)
(3) Each MOUSE excution of the bookmarks, (from the Bookmarks, Show all bookmarks form) clears the Search Box and then issues the expanded search string
(4) When I type the bookmark name and a colon (MDTB:) I get 24,483 objects (just as I do in (1) above.
(5) If I then type a <space> followed by a bookmark name (NoTs) and a colon, the result list shrinks to 24,462 objects. A difference of 21 objects.
(6) If I repeat (4) and select just the files prefaced with a tilde symbol I am told “18 Objects Selected” rather than the 21 objects I expect.
At this point I have two puzzles:
(a) Why does the manner of execution produce different results from the same stock? It is as if double-clicking with the mouse includes a hidden (to this user’s eyes) a “clear search box” command where as execution by typing into the search box does not include such a command.
(b) Why do I get differing quantities of results? If I engage the filter “Documents” and type a search string “\~” (which I think means “objects whose local name begins with tilde”) I get 21 objects, which corresponds to (5) above.
All that I have typed here I have run three times, once yesterday afternoon (page 23 of the attached PDF file), again with my original NOTS bookmark (“!~”) and once more with an improved NOTS bookmark (“!\~”). Both sets of tests return the same discrepancy in the apparent number of tilde-files.
Thanks, Chris
- Attachments
-
- FiltersBoomarks_27.png (74.85 KiB) Viewed 1618 times
-
- FiltersBoomarks_28.png (69.73 KiB) Viewed 1618 times
Re: Shortcut key clears search box?
I suspect you are selecting files that start with ~(6) If I repeat (4) and select just the files prefaced with a tilde symbol I am told “18 Objects Selected” rather than the 21 objects I expect.
However, your bookmark excludes files that contain ~ anywhere.
Opening a bookmark will replace the existing search and search settings.(a) Why does the manner of execution produce different results from the same stock? It is as if double-clicking with the mouse includes a hidden (to this user’s eyes) a “clear search box” command where as execution by typing into the search box does not include such a command.
Using bookmark macros:
does not open the bookmark.
does not change your search.
does not change your search options.
Applies the bookmark search with the bookmark search options.
Allows you to combine multiple bookmarks. (boolean operations are supported: AND, OR or NOT)
Maybe you are thinking of the bookmark being active?
One filter can be active at a time.
Bookmarks are different to filters.
Opening a bookmark does not make that bookmark active.
Opening a bookmark will just restore a previous search.
You can change the search text and search options at any time after opening a bookmark.
The opened bookmark is never "active" (even after opening a bookmark and before you make a change).
Please try using !\~ in your bookmark instead of !~(b) Why do I get differing quantities of results? If I engage the filter “Documents” and type a search string “\~” (which I think means “objects whose local name begins with tilde”) I get 21 objects, which corresponds to (5) above.