One letter macro overrides drive letter path queries

General discussion related to "Everything".
Post Reply
aviasd
Posts: 135
Joined: Sat Oct 07, 2017 2:18 am

One letter macro overrides drive letter path queries

Post by aviasd »

Hi,

Just wanted to input a scenario that might need be addressed.

When creating a one letter macro, for example: e: , the macro will override the drive path handler, effectively preventing specifying path that starts with e:\ .
Encountered after having forgotten that I created the macro and could not figure out what was wrong with everything..

Maybe macros should be limited to two letters minimum ?

Avi
NotNull
Posts: 5517
Joined: Wed May 24, 2017 9:22 pm

Re: One letter macro overrides drive letter path queries

Post by NotNull »

Macro names are case-sensitive, so if you defined e: as a macro, you can still use E: to specify the files on your E:-drive.
Another alternative: use "e:" (surrounded by "" )
aviasd
Posts: 135
Joined: Sat Oct 07, 2017 2:18 am

Re: One letter macro overrides drive letter path queries

Post by aviasd »

NotNull wrote: Fri Jun 05, 2020 3:41 pm Macro names are case-sensitive, so if you defined e: as a macro, you can still use E: to specify the files on your E:-drive.
Another alternative: use "e:" (surrounded by "" )
That's a good point! Never realized that the macros were case sensitive.

The problem is when trying to be "wise" you might mess things up

In my case i was trying to shorten the ext: function into a shorter e: , because i use that function most of the time and e x t are very far from each other. unfortunately it does seem that everything doesn't allow a macro to accept further arguments... or does it ? ( in my case i wanted e:pdf;xlsx to apply ext:pdf;xlsx )

I do wonder if it will be a useful feature if everything could provide a breakdown of the query to it's component in a tooltip or status bar info.
E.g, querying:

ext:pdf;xlsx invoice

would provide a statusbar info of something like "Searching for <extensions pdf OR xlsx> and filename contains invoice.
This could help figure out unexpectednesses like in my case, for the query:

e:pdf;xlsx


would provide something like "Executing macro e (Searching for extensions [none]) and filename contains "pdf;xlsx" which would highlight the problem

This could be useful for other cases for example where some options are preselected and forgotten about and the breakdown would highlight it immediately .
Something like:

ext:pdf;xlsx invoice

Provides: "Searching for <extensions pdf OR xlsx> and pathname contains invoice as whole word."
etc, etc..

IMO it can be useful for new users as well as experienced as we all make mistakes but it is probably a big feature to implement...
NotNull
Posts: 5517
Joined: Wed May 24, 2017 9:22 pm

Re: One letter macro overrides drive letter path queries

Post by NotNull »

aviasd wrote: Sat Jun 06, 2020 10:17 am The problem is when trying to be "wise" you might mess things up
The obvious solution: Don't be "wise" ;) :D

Another obvious suggestion: Use x: instead (eXtension)
(assuming you don't have an X:-drive)
aviasd
Posts: 135
Joined: Sat Oct 07, 2017 2:18 am

Re: One letter macro overrides drive letter path queries

Post by aviasd »

Still does not solve the problem of using macros for "aliasing" commands with argument support..
Am I wrong here or is it possible in some way ?
NotNull
Posts: 5517
Joined: Wed May 24, 2017 9:22 pm

Re: One letter macro overrides drive letter path queries

Post by NotNull »

aviasd wrote: Mon Jun 08, 2020 12:50 pm Still does not solve the problem of using macros for "aliasing" commands with argument support..
Am I wrong here or is it possible in some way ?
Ah, missed that in your earlier post somehow.

I wouldn't call it wrong, but it is certainly possible:

2020-06-08 16_27_00-Window.png
2020-06-08 16_27_00-Window.png (30.21 KiB) Viewed 6547 times
In the Search field, enter
ext:myquery:

In the Macro filed, enter
x<myquery>


("myquery" could be (almost) any text you like; I often use %1 )
aviasd
Posts: 135
Joined: Sat Oct 07, 2017 2:18 am

Re: One letter macro overrides drive letter path queries

Post by aviasd »

Amazing !
It's a good measure of a tool if you learn something new even after so many years of usage.

Next time: Read the tooltips much more carefully
Post Reply