Disappearing Links in nvALT

All the links I had in Hook attached to my key NVAlt document have now vanished.

I posted in a recent thread about having found a solution where I made an archive in NVAlt for my project links that were no longer on the front burner. I did this. And I also then pared down my working project link list. I tested this out several times in each NVAlt note field, the one with the new archived Hook linked set, and the main project Notes in NVAlt with the now focused Hook set of links for where I am now in the project. It worked.

Whether it is relevant of not, I cannot say, but I just ran Carbon Copy Cloner and then ran DiskWarrior on the freshly backed up volume. Prior to that I also ran my standard maintenance and cache cleaning app, MainMenu and I emptied the trash.

None of that should have caused my Hook links to have completely disappeared, should it? Posting a screen shot how how my formerly half dozen or so links, looks now…


Have you renamed or moved this file on a different Dropbox client?
In that case, your links are not gone, but Dropbox has moved the local file to its hidden .dropbox.cache folder, per Dropbox idiosyncrasies regarding conflicted and moved files. Some work-arounds are later on that same page which I’ve added. In your case, I think “Copy as Link”, “Link to Copied Addresses”.

In this case, Hook behaves in the same was as aliases do because Dropbox has moved your file.

I don’t currently use Dropbox. All I do is work locally on a single Mac.

I am seeing inconsistencies in how Hook is popping up on my screen. Many times a hot key for Hook will bring up an empty Hook menu. Then, the same document brings up a full Hook menu. At first I noticed this here and there with some of my apps. It doesn’t happen all the time, so it is difficult to predict. But it is happening with annoying frequency.

When I first ran Hook this morning, I got a blank Hook menu again that I had to fix after posting this thread yesterday. Then, I tried it a few more times, repeatedly and all in a row, and they were all blank Hook screens.

Then I changed my screen focus and worked on this reply. After some time I tried again and suddenly, the Hook menu was populated again. This is yet another reason I would like to see a Hook window that can stand alone, so that I can do maintenance to determine if Hook has permanently lost all the links or, if Hook is only suffering from temporary senility.

I gotta say, I am getting a little less trustful of using Hook. When I work hard to organize my Hook links, they should remain accessible at all times. One of the selling points for me about using Hook was that, Hook creates permanent links. Permanent to me means that once you set those links in Hook, they stay put.

ADDED: I have one external drive mounted in an external USB drive case. Just now I noticed that when I tried again to use the Hook menu in NVAlt it was blank. I also heard my external drive spinning up. This was the same 5 - 10 seconds it takes when I have a disk in that slot to mount an external drive with HoudahSpot searches pointed to.

When HoudahSpot is activated in a search pointed toward the same drive that needs to be awakened to search, it takes HoudahSpot the same 5 - 10 seconds to perform the search as it has to wait for the mounted drive to become awake. This may be why I am seeing Hook inconsistently show empty menus that I already know are populated menus.

This is odd as I would think it should make better sense for Hook to not do this automatically every time it is activated. This is especially true when all the hook linked files are to be found locally.

If Hook is taking the time to look for a dropbox connection (that isn’t there) and if hook is taking the time to spin up or activate any mounted disk - even when I don’t want it to, as I know it does not contain any of my Hook links, then maybe it would be a good idea to allow the user to select in the Hook preferences the option of what areas to search in and what areas to exclude?

All I know is that, sometimes my Hook links are there, and sometimes they are missing. When I made this post yesterday I had waited much longer than the 5 - 10 second spin up time for my external drive so I know that there is another problem here. I just don’t know what it is.

If Hook is not trustworthy to immediately bring up all the links I have placed there, and I am forced to shift into that part of my brain where I have to stop my work progress and hunt for files, this sort of defeats the idea of using Hook in the first place.

I don’t use HoudahSpot, but is it possible that has focus the times Hook isn’t working in nvALT? That would explain the ‘missing’ links and the HDD spin up.

Yes, that is part of it. But, that is not all of it. This sort of behavior has been going on for some time. If Hook has to search each time for any and all connections each time the Hook menu is triggered then I think my suggestion about putting in “search preferred areas” in preferences is a good idea.

I started this post after seeing something more than this however. I had already figured out that sometimes I had to wait before the Hook menu would show that it had links in it. This is odd as it would be much better if the Hook menu did not popup in such cases until it has been filled. Popping up an empty Hook link window does not inspire confidence.

I started this post because I tried several times and no matter what I did, the old links on that document had vanished. So, there is something else going on there, IMHO.

By my understanding Hook doesn’t do any searching of your file system when invoked (I’m not one of the developers though). When you invoke Hook, it first runs the scripts for the current context to get the context’s address (and name). This address (by my understanding) is then looked up in the Hook database to find related contexts.

It sounds like, for whatever reason, HoudahSpot keeps taking the focus, so the HoudahSpot script is being run which is accessing the file system.

Could you try temporarily disabling HoudahSpot and see if the problems you’re having go away? (I’m not suggesting the solution is to not use HoudahSpot, but it helps find a solution)

I apologize if I have not made my meaning clear. I only mentioned HoudahSpot as an example of what Hooks developer might choose to look into for a future update with Hook.

My suggestion does not have anything to do with HoudahSpot. I mentioned HoudahSpot only as an example, because when a HoudahSpot search is triggered and it is looking for files that I know I have on an external, sleeping, drive, I can see that in approximately the same amount of time that Hook is delaying populating my menus, that no HoudahSpot search results will appear before any external drive is awakened.

I also noticed that when I trigger a Hook menu to appear, if my external drive is mounted and if it is asleep, I can hear the drive spinning up that is, awakening, before my Hook menus populate.

With HoudahSpot, I can tell each search what the limits of that search will be, local drive, all drives mounted, or an online repository of my files such as Dropbox.

As I am not using Dropbox and I am not storing any of my Hook linked files anywhere but on my local drive, my suggestion was that it might be helpful if at some future point in time the developer adds the option to not have Hook look all over the place for my linked files, but only where I want it to look.

I can see three options here; 1. Dismount any external drive when I am not using it, 2. Wait out the time that Hook will take to spin up my external drive each time I use Hook, or, 3. Hope that the developer also considers this idea, and implements it, so that I no longer have to be concerned about seeing unpopulated Hook menus or my lack of patience in not wanting to wait for Hook to check everywhere before it populates my Hook menus.

Once again, this is not about HoudahSpot.

Thanks for reporting and investigating this, @levelbest. If this occurs again, could you please wait longer to see if the links appear? This would tell us whether we are truly dealing with missing links (as your topic title suggests), or a performance issue (as your description suggestions).

It would not do that.

Hook should not try to access a drive to which you do not have any links. I’ve asked our dev team to look at whether/how this could be triggered as a side-effect. And if so we would of course try to prevent this.

If, rather than missing links, this is a performance issue related to Hook interacting with a slow external drive, then a different title for this forum topic (report) would be more accurate, such as “Hook slow to populate list of links when external hard disk drive (non SSD) is connected”, because the current title makes it sound like the Hook links are altogether missing.

Inspired by Apple’s very fine example of performance optimization in successive versions of OS X and macOS, throughout the development of Hook we have optimized its performance. It may be that the focal resource in relation to which you are invoking Hook has link targets on a very slow external disk that Hook is verifying are still there. (I’m not referring to speed of sustained access but of lookup). In any event, we certainly want to find and respond to significant opportunities for further optimization. We will look at whether what you’ve described is such an opportunity. And we will continue to ensure performance remains a priority as we roll out new features along Hook’s product road map.

If this is a performance issue related to Hook interacting with a slow external drive, then a different title for this forum topic (report) might be better, such as “Hook slow to populate list of links when external hard disk drive (non SSD)”.

We have always valued performance and will continue to ensure performance is a priority as we roll out new features along Hook’s product road map.

I understand that there are two issues here. But please understand that one of the issues is that, on my main document that I had spent the previous day rearranging its links and setting up an archived document to keep my current linked set updates to the projects current progression, the links entirely disappeared. This was true several hours later so it does not seem to be related to my other question, of why I can hit the Hook hot key and not see a populated Hook menu until an external disk has spun up (awakened).

As I had noticed the sound of the external drive spinning up, I remembered that another app (HoudahSpot), can also take a short time to target an external drive for a search if that is what it has been asked to do.

I can say with certainty that it has been a frustration to me for some time that for whatever reason, hitting the Hook hot key will often bring up an empty Hook link window. Sometimes this happens a few times in a row. Then, hitting the hot key again, will show a populated window.

What is going on in every instance I cannot say. Figuring out a way to systematically problem solve this would be helpful. Let me know if you have any suggestions toward this end.

I am running macOS 10.13.5, High Sierra.

When you get the empty list, does copying the markdown link work as expected — does the title match the context you expect to be interacting with, and does the link work to take you to that context?

Yes, The Copy as Link works as expected.

Yes, the title matches the expected link.

It works exactly the same as getting getting a new Link menu, unpopulated of course.

I have not used the copy as markdown specifically as I do not use markdown.

The Copy as Markdown suggestion was just because it’s easier to check that both Get Title and Get Address are working as expected (and helping diagnostic if they’re not). If Copy Address works, then they both are.


sorry to belabor the issue here but I just want to have a clear understanding of the issue. Are you saying that there is a specific resource that you access via nvALT that had been previously linked with the Hook window (i.e., using “Link to Copied Address” or menu bar icon), and now any time you invoke the Hook window on that resource again, even if there is no external drive connected and even if you wait a long time (let’s say 20 seconds, which is much longer than should be required), you never see the associated links? Or is this a matter of inconsistent behavior on the same resource: sometimes the links show up in the Hook window, sometimes they don’t?

Could you please copy the link obtained from this resource (using Copy as Markdown Link), and paste it here (or in a PIM to me , for privacy) between triple ticks ```` so that we or I can see the entire Markdown link? Could you please also paste the actual pathname of the file. (You can obtain the pathname of a file by dragging it from Finder and dropping it into a Terminal window. Depending on the characters in the pathname you may need to put it between tripple ticks too, to “escape” special characters from Discourse.)

To clarify, only one time did all my links disappear.

Sometimes, I notice that there is an empty Hook menu that should have a half dozen or more links in it.

When I notice that there is a completely empty Hook menu that should have links in it, I have noticed that if there is an external drive mounted, the time it takes for this external drive to awaken (assuming it has gone to sleep) is approximately the same amount of time that I continue to trigger the Hook menu with nothing at all showing in the menu.

On other occasions, I will trigger the Hook menu, that should be showing links, and it is completely empty. That is, at such times, there is a completely empty Hook menu as if there never were any links set to that document.

It appears that Hook will not always recognize in its Hook menu that it has links. Most of the time, except for the one incident I have already mentioned, if I continue to trigger and dismiss the empty Hook menu, eventually I will see a fully populated Hook menu again.

I have written this off to an annoying glitch that is somehow wired into my system and the way that Hook goes about the recognition of a set of links. It does not happen every time. But it does happen fairly often. I am now being alert for this condition without any external drive being mounted. I will post again as this condition occurs.

At no time am I saying that there are missing individual links in the Hook menu. I am saying that the entire Hook menu will show as an empty menu as if there were no links in that documents links - even though there are - or there should be, links in that documents Hook menu.

I hope this clarifies things?

Thanks for clarifying, @levelbest. Hook should consistently give the same result when invoked on the same resource if the file-link targets remain available.

I’m wondering whether for some unexplained reason on your system nvALT’s Copy URL function does not always return the same result. Copying/pasting the “Get Address” Script into Script Editor and running it while nvALT is running might provide an indication of that, but given that the problem is intermittent, it might take a while for the problem to show up if it does happen there.

The successor of nvUltra (currently in public beta) has AppleScript support, which is more reliable than screen scripting, used by the current script.

If this happens in an app that provides a direct AppleScript method for getting the address of the current item (such as Pages), it would suggest a different line of inquiry.

@levelbest, has the missing links issue happened in the context of other apps than nvALT (excluding the external drive access case, for isolation purposes) ?

Yes. I have experienced hitting the Hook hot key combo many times and, instead of a populated Hook window, I get an empty Hook window.

I don’t believe this is specific to NVAlt - although I can’t say for sure. After making all this fuss about it, it is now up to me to start logging occurrences and taking screen shots.

The last couple of days I had to tend to other problems. As soon as get back to my project and I start using Hook heavily again, I should know something.

Post Script: It occurs to me to mention that I have two key applications which monitor keystroke activity and therefore, monitor system resources at all times.

One is Keyboard Maestro, used for creating macros, and the other is Typinator, the best text expansion tool on the market as far as I am concerned. I wouldn’t do without either one of them. I thought it might be worth mentioning in case it helps someone understand why I am sometimes getting a blank Hook window when I press my hot key trigger.

Post Post Script: I observe that even in the best of times there is about a quarter to a half second pause when I trigger the Hook menu via the hot key combo. That is, when the hot keys are pressed I get a blank Hook menu for about a quarter second or so, followed immediately by the populated Hook window.

I find it a bit disconcerting that there is such a pause when Hook is triggered. I assume that this is a normal condition and not something that I alone am experiencing but, I thought it worth mentioning - in case it helps.

1 Like

Hook needs to verify that the file link targets are still there before displaying them to you. Hook presents th links gradually rather than waiting for every one to be checked, which is more productive for the user (users can scan tand use the list). Normally, with SSD the latency is imperceptible, but sometimes it is.

If you have an older Mac model with spinning hard disk (rather than SSD), this could be perceptible. And is the external drive connected when it’s slow?

My main drive is SSD so this is not slowing it down.

I only keep the rotating drives for backups and for movie files - for entertainment. This is partially due to practicality as they work fine for non critical tasks. But, this is also due to the fact that DiskWarrior, my go to application for maintaining a healthy system, has still not been updated to work on SSD drives. Therefore, at least my backed up copies of my system can have DiskWarrior run on them as they are not SSD drives.

To sum up, based on everything in this topic, the current hypotheses for investigation (things to rule out) related to your experience of slower or non-display of links:

  1. the presence of an external drive, even if you don’t hear the access.
  2. the context of nvALT (or other apps controlled via AppleScript)
  3. interaction with specific utilities you mentioned.
  4. another background process ( background processes can interact with any application)
  5. an interaction of the above.

A common thread is timing.

Thank you. An investigation goal would be to exclude as many of the above as possible.