avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Saturday June 12, 2021, 3:29 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - mostlytyping [ switch to compact view ]

Pages: [1]
That is best solved by changing the regex from nn(.*) to ^nn(.*) so that it only matches if the nn is at the START of the string.
Thank you. I was going go respond that in my case I don't actually want the anchor as often I am remembering a fragment of the name of the URL that could be anywhere in the string.
E.g. to find "Learning Elisp for better Emacs" I might simply type "elisp".

However, having tried it, it works, which seems to run counter to what I know about regexes...

EDIT: Wrong again, I am actually using "nn(^.*)" rather than "^nn(.*)" but this "nn(^.*)" still seems to get me the behaviour I want?

Try putting $$1 in the the alias configuration dialog where it says "Result Filter for RegEx".
Thanks to everybody for their help. It is now working as I want it to.
I did find that using nn(.*) led to far too many false hits, but now that I have tweaked the regex to nn(??.*) it behaves more usefully.
Oh, and I also had to change the trigger from 'nn' to 'uu' as the former is found in a fair number of English words, which meant that searching for something like 'kennel' using other aliases would trigger it.

Having said all that, another possibly MUCH EASIER way to do what you want is not to make separate shortcut files, but make one test file with all the urls you want, and put it in a text file and create a "us" alias that uses the "filecontents" command to let farr search it.
if you have time, I have a follow-up question. I have been experimenting with the command mentioned above, but I cannot get it to work. In this case I have it bound to nn, as follows. I would expect that typing "nn emacs" would lead it to show a filtered list of all the entries extracted from the file using the filecontents command. Instead it just shows all the entries, without filtering at all (see below). I cannot work out what is going on. And yet I have a memory of it working a few days ago, so I think I have changed something but I don't know what.

This is how I set it up:


These are the contents of the file to which the alias refers:


And this is the result when I try to use the alias:


Any pointers would be gratefully received...

Sorted! Many thanks for all your help.

I agree, it doesn't seem to be triggering. And yet the alias is enabled:


And here the results of typing "us news" in the Test Regular Expression field - nothing.


I did try changing the alias trigger text to different strings, just in case there was some conflict somewhere with "us" but that did not help either.

Thank you for that amendment. I have looked at the docs and that seems reasonable.
Unfortunately doesn't seem to make any difference. Here's the configured screen:


Here is the output if I use a direct reference to the path, which is exactly as I would expect - I get results only from that folder and its subfolders:


And here is the output using that alias, which is not as I would expect - it includes results from everywhere and the hits from the folder in question are not even visible:


So something is still wrong, but I can't see what it is.

Thank you for your helpful advice.

First, the reason I want to use shortcut files is that I can simply drag and drop my bookmarks out of Firefox and into the folder to create them. That's a lot less work than making individual entries in a text file. Having said that, I have investigated the filecontents command and it does work well. It's just a lot more time to set up.

On the subject of using an alias regex trigger, I cannot get it to work as you say should work.

Typing "C:\Farr\URLs extra_keywords_here", such as "C:\Farr\URLs Emacs" does work as we would expect - additional keywords filter down the results and no results from other folders are included. So far, so reassuring.

However, when I use the us(.*) approach it does not have the same effect, instead returning all kinds of files that are not related to the folder in question. My assumption is that I have set it up wrong, but looking at the following dialog I can't see what the problem is!


I'm experimenting with storing bookmarks in folders and using FARR to access the bookmarks rather than browser menus and toolbars. Recently I changed from Firefox to Chrome and I'm finding it a problem because Chrome has very limited support for multi-row bookmark tool bars. As I find using FARR to be quicker than using the mouse, it would seem sensible to rejig my system so that it is not dependent on the particular browser I'm using at any one time.

What I had in mind was a base directory such as "C:\FARR\URLs" containing subfolders such as "news". The subfolders contain actual .URL files, saved in the file system itself. "Google News.URL", for example, consists of the following:

So far, I have a search folder set up with "C:\FARR\URLs" as the path to be searched and (because FARR seemed to be searching in other areas as well) "+C:\FARR\URLs" in the restrictions box below. Finally I have an entry "uu uu = +uu" in the Quick Search Words box.

This has all been a bit complex, and it's still not working quite as I would like. For instance, if I enter "uu news" FARR shows me a couple of the URL files from the "news" subfolder but it also shows as the first choice the built-in "news" alias as well as a "newegg" alias that is also apparently built-in. At the end of this list of five items it also shows the "news" subfolder, but if I select this it simply opens that subfolder in Explorer.

What I would like FARR to do is show me (in a FARR list) the contents of the "news" subfolder straight away when I type "uu news" and the contents of other subfolders in the URL directory when I type e.g. "uu sport" and so on.

Can anybody give me some pointers as to how I should achieve this?


Pages: [1]