An Urgent Mori 1.6.10 Release To Correct Bugs, and Workaround Spotlight Flaws

27 02 2008

While making the changes to Mori’s code for 1.7, I encountered some oddities in test results, and it turned out there was a bug which I had introduced in an earlier release. While it doesn’t appear to endanger data in Mori notebooks, it might not return all the results you expect in a search, or in entry summaries.

In addition, it has what I hope are a couple of performance improvements, continued improvements to Italian localization, and a work-around for Leopard’s insistence to treat non-Apple Spotlight metadata files as third-class citizens.

Normally when Spotlight discovers a file has been created or changed, it will ask the responsible program to figure out what’s inside, and feed it back to Spotlight. But one of the drawbacks to Spotlight’s design is it lacks the ability to define containers, or documents which contain logically distinct elements such as the chapters of a book, pictures in a photo album, or entries from a Mori notebook; and which can nest other containers as well. Treating a document as a single entity, Spotlight will open a document at the beginning (or maybe the place where the cursor was the last time it was open), even if what you’re looking for is somewhere near the end.

Because it doesn’t understand that a file can have distinct elements, the development teams for other Apple software (e.g., iPhoto, Safari, Stickies, etc.) came up with a scheme to trick Spotlight by creating new files with the data for those elements. So that’s how Jesse coded Mori’s behavior: duplicate the data for that logically distinct element in its own file. A separate copy of each element’s data in its own file. One extra file per element. That means the space taken up by your data is easily half again more than if Apple just added a container definition for Spotlight metadata (once for the notebook, another for the entry metadata file, and the third copy in Spotlight’s database).

But that isn’t all. While we’d like to keep all those extra files inside a notebook bundle (a directory which Finder treats as a file), because Spotlight treats a document as a single element it won’t look for those files inside the bundle. So Mori creates those files in the metadata cache folder (in your Library/Caches/Metadata folder), along with the metadata files from some of Apple’s programs. If you open the metadata folder and look at these files, you’ll see they have numbers to help Mori figure out which entry contains that data. But when you do a search using the Spotlight menu, and when you select menu item ‘Show All’ and the results are displayed in the Finder, you won’t see the numbers; you’ll see the titles for the entries they represent.

Leopard however, isn’t so democratic; which is why users where complaining about the entries when Leopard was released. First off, it ignores any non-Apple metadata files in the cache folder unless you set your Spotlight preferences to use those files. Secondly, it will ignore the title info embedded in the entry metadata file and just display the file’s actual title, meaning the number. How’s that for Apple undermining the work of third-party developers?

So the workaround I came up with is to add the entry’s title (or Untitled, if it has none) at the beginning of the filename, so you at least have an idea which entry matches your search terms.

Spotlight Filename Workaround (Thanks for wasting about a whole month total of my development time on that alone, Apple. I feel the love.)

I am, of course, more than happy to eat crow should I be proven to be completely mistaken or speaking from out-dated information. It’s easily worth it in order to improve the user experience.

Regardless of the rationale for the design decisions, enjoy, and thank you for being part of the community and continuing to support Mori!


Actions

Informations

4 responses to “An Urgent Mori 1.6.10 Release To Correct Bugs, and Workaround Spotlight Flaws”

28 02 2008
Rolf Schmolling (05:31:01) :

Hi Alfonso!

Since I was one major complainer (whiner) I want to thank you for your successful effort to overcome that restriction! It seems that the fix for the mGTD-plugin I got recently for Mori 1.6.9 has not stopped working so that is good as well. Looking forward to further improvements in the future,

keep up the good work,

Greetings, Rolf

28 02 2008
huperniketes (06:21:32) :

I’m glad to hear that the fixes have improved things for your experience. And I don’t mind the complaints (you certainly weren’t whining!) when using things in Mori are pretty painful.

And the main pain we’re all experiencing is the view system. It hurts me (code, ouch.), and it hurts users (inline-edits, ouch. printing, ouch. linkback, ouch. outlines, ouch. font styles, ouch.). At least the pain is lessening for me, and soon will be for you as well.

Alfonso

13 07 2008
um.. (04:47:58) :

wow…

what happened here?

hog bay notebook was pretty groovy back in the day…

this is…

uhm

different.

14 07 2008
huperniketes (10:00:43) :

Yeah, the CIA was pretty groovy back in the day, too.

Hog Bay Notebook, however, was a different animal from Mori in that it was a simpler note-taking app with less sophisticated workflow, organizational tools and expandability. Hog Bay Notebook made it a little easier to write up entries (”files” in its lexicon), having an interface that will have a better incarnation in Mori’s 1.7 release. But Mori was rewritten from the ground up to be a more powerful notebook app, with more flexibility in adjusting to your workflow, allows more sophisticated notebooks with user-defined columns, plugin support for support for even more data and user-interfaces, tags, smart folders, aliases, etc.

Leave a comment

You can use these tags : <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>