A couple new user questions around iCloud and Notes (shortcut)

Hi,

Just installed Hook on a machine and it looks really intriguing. But after trying it on a second machine I have a couple issues, which leads me to some questions :slight_smile:

First, I use Notes almost exclusively for notes. I am able to create new notes via Hook, subject to two constraints:

  1. Thereā€™s no default setting for Notes, so cmd-N cannot ever be Notes. Why is this, when you can have it create new notes via menu item?
  2. I saw somewhere (I think on your site) that itā€™s possible to create keyboard shortcuts to the ā€œNewā€ items, and there was one set for Notes. But for the life of me, I canā€™t figure out how to do this. How can I set it so if I invoke the Hook shortcut, the next thing I can do is create a new linked note?

Second, I use iCloud to sync a lot of stuff (including my desktop and documents folders). However, if Iā€™m on a machine and set up links between a Safari web page and another document (I tried with both a Note and with a plain text file), these associations donā€™t appear on other machines. This makes thingsā€¦ much less useful for me.

Any comments/thoughts/help appreciated. Thanks!

Welcome to the Hook Productivity Forum, @CatOne! And thanks for asking about all this.

hereā€™s a quick reply this Sunday evening (Pacific Time).

Thereā€™s no default setting for Notes, so cmd-N cannot ever be Notes. Why is this, when you can have it create new notes via menu item?

Hook is currently treating database style apps (like OmniFocus , Things, etc.) and File-based apps (like TextEdit) differently. When you create a new note for a File-based app you can select a template. In this case, Hook copies the files and puts it in the Notes folder. The templates are stored in your Hook templates folder. Just put any file with the extension you want , like .doc, .graffle, .txt, or whatever, and the ā€œLink to Newā€ mechanism makes a copy of it.

This has to work somewhat differently for database style apps because they donā€™t store their objects directly on the file system. Having said that, we are open to providing a template mechanism down the road for database style apps, where possible. (the case is more complex. and weā€™re currently focusing on other user requests.)

The trick for this is to use System Preferences, Keyboard shortcuts. Like this.

You can add the command Notes and choose a keyboard shortcut for it, like āŒ˜ā‡§O. I will add screenshots or a screencast for that (though I think most current Hook users are familiar with adding keyboard shortcuts )

Also, the note template configuration is described here:
Notes Tab ā€“ Hook

Hook links currently donā€™t sync across Macs. multi-mac syncing was an early request. Even before the public beta , @timstringer requested it during the private beta. We implemented the first version of this internally in July but had to delay testing it (in favor of a UI overhaul, leading to 1.3). Itā€™s currently being tested internally, and we are fine tuning it. If all goes well it will be part of Hook 1.4, the next non-maintenance release of Hook.

However, even now it is possible to copy Hook links between computers albeit manually: Using Hook on Multiple Macs ā€“ Hook. We didnā€™t provide scripts to automate this, wanting to focus on the proper multi-mac sync, but it could be done.

I will revisit this topic tomorrow morning , and please feel free to ask more questions.

1 Like

Thanks for the quick turnaround. I see you have a SQLite database in there that stores the linksā€¦ now I know how the data is persisted. I guess in theory you could put some sort of journal file in the iCloud folder hierarchy for data that needs to sync and then import it into that tableā€¦ though of course that then assumes that all the linked files are on all machines, and that they have some sort of identifier that is the same on each machine.

The phrase isnā€™t ā€œsync is easy,ā€ I guess :wink: Anyway glad to hear itā€™s in the plans.

One other thing I noticed with Notes (itā€™s possible this is related to your comments on Notes issues with macOS Catalina): If I actually generate hook links (by using the keyboard shortcut followed by command-C) and paste these into Notes, they only work on the machine I create them on (whereby ā€œworkā€ I mean "when I click this link, it takes me to the note whose link I clicked on), but they donā€™t work on other machines. I donā€™t know if this is because the Note URL isnā€™t valid across machines? I am using iCloud to sync.

I can also use Notes ā€œsharingā€ functionality (itā€™s pretty much of a kludge) to ā€œshareā€ a note with someone, then after entering their email, I can use ā€œcopy linkā€ and get an icloud:// URL which will do what I want across all machines. But itā€™s time consuming and gross (and it may be persisting something in iCloud on the server side which gives abilities you canā€™t do client side).

Overall, given I have 4 Macs I use on a regular basis (2 at work; 2 at home), if Iā€™m going to put a bunch of time into developing a workflow, I need something I can use everywhere, as I canā€™t always predict which machine Iā€™ll be in front of. But Hook looks very promising (I first heard about it in the TidBITS book about DEVONthink 3 FYI). And the only other thing that gives me a bit of concern is that all the generated links have ā€˜hookā€™ in the URL itself (rather than being direct links like to a native Message URL or Notes URL) which means that if for some reason I ever stop using the tool, nothing Iā€™ve built up will work anymore without Hook installed.

Iā€™m still going to keep tinkering a bit because youā€™ve hit on something thatā€™s super interesting and has the potential to be fantastically useful!

Thanks, @CatOne.

just some quick replies for this eveningā€¦

there will be a sync folder with entries for individual links. More on that towards 1.4ā€¦

Actually, whenever possible Hook returns links with standard protocols (e.g., https:// ) or third-party app links (e.g., OmniFocus). There are only a few cases where we need to use hook:// links (hook://file, hook://email, hook://notes), to provide important functionality. For instance, that allows Hook to refer to emails in an email app agnostic manner (other reasons for that too). See Copy Link ā€“ Hook.

thanks for the extra info, tinkering with Hook, etc.

Ah, good to know about the custom links. I spent some time tinkering further with URLs in Notes, and I think I see an issue (maybe the issue, but Iā€™m not sure).

Anyway, Hookā€™s script to grab the Note ID comes up with something like this:

notes://FD026190-FFE5-42FD-B8A6-816CF4C44B7A/ICNote/p5781

Hook then generates itā€™s ā€œHookā€ URL of this format:

hook://notes/FD026190-FFE5-42FD-B8A6-816CF4C44B7A/ICNote/p5781

But if I then go to a second machine and grab the URL of the note, I get this:

notes://A03F3288-441A-4A23-8231-AE347D450E4B/ICNote/p5756

So that note URL itself differs between the machines, meaning anything that Hook builds on top of it would as well.

I donā€™t know whether thereā€™s a solution to this. Now this is me trying to tinker with your wonderful software and make it solve a specific problem that I have, but ā€¦ argh ā€¦ :slight_smile:

Iā€™ll keep playing, and Iā€™m very much looking forward to what you come up with in syncing for 1.4!

notes://A03F3288-441A-4A23-8231-AE347D450E4B/ICNote/p5753

That has recently come up in our multi-mac and related tests which we are also looking into --over and beyond the Catalina Apple Notes issues. Hook relies on Appleā€™s Notes AppleScript ā€œidā€ field, defined as ā€œthe unique identifier of the noteā€. One would assume that in the iCloud Notes case, this would be the same across devices for the same user, but it is not. We are looking into how /whether to work-around it. (Apple Notes internally must maintain a mapping between its local ID and the iCloud ID).

Looking towards the multi-mac future, the safest bet would be to assume that the IDā€™s wonā€™t be uniform (across devices) soon.

This has led to a more significant implication, for the single user case, however, in that after turning turning off iCloud for Notes, and turning it back on, Apple Notes returns a different ID for the same Apple note. That would mean that users would need not turn off Apple Notes to preserve their single Mac iCloud Notes links. We will file a third bug report to Apple re their Notes AppleScript, this time regarding this ID issue.

The Apple Notes database itself must maintain an ID / iCloud URL mapping because otherwise sync would not work. We know that Alfred has made use of info in Apple Notes zip file, so in principle this should be possible for Hook (though not necessarily via scripts). We are looking into that.

A work-around for apps whose URLs are not sufficient, and whose data are indexed by Spotlight, is to generate unique IDā€™s (via Hook gear menu, or any other way) and paste them into their objects. They can then create Hook Search links (hook://search) which essentially call Spotlight to look for the search string. (See Gear Menu.) I will detail this work-around more specifically for the Notes case. (The Hook Search feature is useful for all kinds of search beyond this type of issue.)

None of this affects the non-iCloud Notes usages.

Once we conclude our investigation, which will be very soon as this is a priority, we will add an integrations page in the integration section of Hook documentation about Notes generally ā€“ we currently have one for Catalina Notes in particular. Some of the entries in the What Mac Apps Work with Hook? ā€“ Hook have hyperlinks to Integration pages, but most link to posts on this forum.

1 Like

Thanks for the detailed reply.

The main issue is likely the ā€œthis only happens with iCloud notesā€ which is probably the 90% case or more. Local notes isnā€™t backed up and doesnā€™t sync anywhere and I donā€™t think itā€™s even visible by default. And using Notes with other accounts (i.e. other Mail servers youā€™ve configured in Settings > Accounts) kinda stinksā€¦ it uses IMAP vs CloudKit for syncing which means something like 50% of the functionality that was introduced in Notes ~3 years ago is unavailable.

Iā€™d suggest focusing on making the ā€œHook + Notes with iCloud sync enabledā€ use case your priority, and providing all the feedback to Apple on whatā€™s broken, with special note of things that worked in Mojave that were specifically broken in Catalina.

1 Like

Absolutely! I just was mentioning the other case for completeness.

and yes we provided bug reports on Catalina specific issues to Apple, with one coming for the other case.

In addition to our page about macOS 10.15 Apple Notes issues, we published a more general page in the same integration section of Hook Help: Hook Linking with Apple Notes ā€“ Hook. This summarizes the current state of affairs and describes options/workarounds.

Alfred had ways of extracting note identifiers from the Notes zip file for versions prior to 10.15 (if they have gotten this to work for 10.15, we are not aware of it). Still, that would be relying on undocumented features. When we looked into the Catalina notes representation, we were unable to extract the iCloud address.

Weā€™ve logged an additional issues with Apple apart from the Catalina one, and are about to log another one.

We regret that we didnā€™t catch the Apple Notes ID issue earlier. Hook integrates with other note-taking apps some of which provide addresses that work across multiple devices ā€“ those developers/vendors understand that their users , in this era, need to be able to reference notes across devices.