Bug? Clicking on a link in a formatted note to another note

Clicking on a link in a formatted note to another formatted note opens the linked formatted note as uneditable HTML.

I have about 500 files saved as DEVONthink’s “formatted notes” format in an external folder that is indexed in DEVONthink Pro.

I am setting up wiki-like hyperlinks within these files using the standard HTML relative link format, for example

<a href="Name.html">Name</a>

instead of using DEVONthink’s link format, for example

<a href="x-devonthink-item://71EA1E1B-696C-436A-8C1B-79348CA7582B">Name</a>

because I want the links to function properly when I open the files on a different computer that cannot run DEVONthink. (DEVONthink’s formatted notes are, of course, saved in a simple form of HTML with an identifying meta tag, so they can be opened in a web browser or HTML editor.)

Here is the problem, which appears to be a bug: In DEVONthink Pro, when I click on a relative link, for example

<a href="Name.html">Name</a>

in a DEVONthink formatted note that links to another DEVONthink formatted note, the linked formatted note opens as a read-only HTML file rather than as an editable formatted note, even though it IS an editable formatted note. It should open as an editable formatted note because it IS one, not as a read-only HTML file. It is indexed as a formatted note.

I am using the latest version of DEVONthink Pro (2.8.10) on OS X 10.9.5 Mavericks.

Are you saying the link opens in DEVONthink as uneditable HTML, or in your system default web browser (in which case, it would obviosuly be uneditable)?

Simply clicking on the link opens the formatted note in the system default web browser. Control-clicking or right-clicking on the link and selecting “Open Link in New Tab” from the contextual menu opens the link in DEVONthink as uneditable HTML. Either way, the formatted note is opened as uneditable HTML.

I’m confused. What is your procedure for adding/editing the inter-note links of the form:

<a href="Name.html">Name</a>

the HTML in a Formatted Note cannot be directly edited in DEVONthink, so I assume you are editing it somewhere else?

It is true that Formatted notes indexed in DEVONthink are HTML, but because of this meta tag

<meta name="DT:isEditableNote" content="Yes">

DEVONthink treats them as formatted note. I think this might be the source of the observation that these are “uneditable HTML”. They are not exactly that, but rather they are editable Formatted Notes; with the native HTML not editable.

How are you validating that these files are “read only” – are you inspecting their permissions in Finder or elsewhere?

There is a simpler method to accomplish the root requirement: " I want the links to function properly when I open the files on a different computer that cannot run DEVONthink"

Build your note base using DEVONthink’s wikilink features and then export the whole with File > Export > As Website. DEVONthink will create all the html linking necessary (at export time) to maintain the stand-alone inter-document links without using DEVONthink internal x-devonthink-item URLs.

Thanks for the responses. I have more requirements than I told in my initial post, but I wanted to keep my explanation as simple as possible. Let me say a little more about why using DEVONthink’s wikilink features and exporting as website doesn’t fit my requirements.

I’m familiar with all of the technical details you mentioned, and let me clarify that when I say the linked formatted notes open as a read-only or uneditable HTML files, I only mean that they open in DEVONthink in a way that does not permit normal WYSIWYG editing of formatted notes. They are all editable with normal WYSIWYG editing of formatted notes when opened directly from the list view, but not when clicking from one to another using the relative links that I described. I don’t mean that they are “read only” at the system level (they are not) or that they can’t be edited in other apps (they can be, and as you have correctly concluded, that’s how I am adding the inter-note links).

My other requirement is that all of my formatted notes are in an external folder that I plan to be version controlled with Git. This external folder is on an external drive. This external drive will be shared between multiple computers (mainly two computers), only one of which can run DEVONthink. I fear that using DEVONthink’s URL scheme and exporting as website would not work with the version control system. It would also be extra work (since I don’t always know when I will need to have my external drive with me, I would end up having to export as website constantly), and editable formatted notes should just open as editable formatted notes.

But there’s one other reason why I am doing things this way: I am trying to migrate from Journler to DEVONthink. (If you are really interested, there is more backstory in another thread.) So guess where those 500 formatted notes in my external folder came from? Not from DEVONthink, since I’ve only been experimenting with DEVONthink for a few days. No, those files were exported from Journler via the Cocoa text system’s HTML writer. I (correctly) deduced that by using BBEdit to batch insert the requisite meta tag into all the HTML files before indexing them in DEVONthink, they would be indexed as formatted notes. Now I am reinserting all the inter-note links that were stripped out when I exported the files from Journler. (A side note: Although DEVONthink lacks a few of Journler’s features, in most other ways DEVONthink is a big improvement over Journler.)

This bug is not necessarily a dealbreaker in my migration away from Journler, but it surprises me.

I would like to reproduce this, but I cannot. I have no problem with editing formatted notes opened in DEVONthink the way that the OP and followup posts described. Perhaps it’s not a “bug”, but something else in the local user’s configuration or in the data? I have no idea. It’s not a bug over here, though.

That’s not what I suggested. What I said was that when DEVONthink exports to a website it eliminates its own URL scheme and uses standard HTML links. Don’t take my word for it – experiment. Read the HTML output.

The whole process outlined in the second post is very complex, it seems. Not sure why GIT needs to get involved, but that’s because I severely lack imagination.

If you considered using DEVONthink Pro Office you could use DTPO’s Server feature and avoid all the pain. DTPO is available for trial, if you want to give it a go.

Here are some steps to reproduce the problem:

  1. Create a folder in the Finder and index it in DEVONthink
  2. In DEVONthink, create two formatted notes in that folder, one named “New” and one named “Old”
  3. In DEVONthink, select both notes, control-click, and select Move to External Folder from the contextual menu
  4. In DEVONthink, select the file named “New” and edit it so that the content of the file reads “Here is a link to Old”
  5. In DEVONthink, select the file named “Old” and edit it so that the content of the file reads “Here is a link to New”
  6. In DEVONthink, select both notes, control-click, and select Open With from the contextual menu and choose a plain text editor such as BBEdit or TextWrangler (but not TextEdit)
  7. In your plain text editor, change Here is a link to New to Here is a link to New, and change Here is a link to Old to Here is a link to Old, then save and close both files
  8. In DEVONthink, select the file named “New” and then within the view/edit pane click on the link named “Old”: You will then see the problem described above
  9. In DEVONthink, select the file named “Old” and then within the view/edit pane click on the link named “New”: You will again see the problem described above

I understood perfectly that when DEVONthink exports to a website it eliminates its own URL scheme and uses standard HTML links. I don’t want to do that for the reasons I described above.

If the idea of using version control with writing is new to you (as it was to me until recently), there is much you could read online, for example: Git for Zettelkasten; Using git in my writing workflow; What’s the best version control system for a book writer?; Do you use any version controlling software/methods as writers?; Git/other versioning control at National Novel Writing Month, Using Git for writing thesis; Git and version control for novelists, screenwriters, academics, and the general public. I should note that I don’t use Git from the command line; I use a GUI client.

Thanks for all the suggestions, but I don’t want or need a server. And none of this is a pain: it may not sound like it, but I am having fun! I expected the migration from Journler to be a nightmare but it has been fairly easy, and I love DEVONthink’s formatted notes, which combines the benefits of WYSIWYG rich text editing without the behind-the-scenes ugliness of RTF, which was the native format of Journler. (If you’ve ever tried doing batch content changes with grep on RTF files, you know what I mean by ugliness.)

But I still consider this problem to be a bug. It should just work.

Well, OK. Thanks.

Here is another reason why exporting as website will not work for me: It clobbers the file metadata (in the exported files). Original creation dates and modification dates of files? Gone. Tags? Gone. That may be good enough for some people, but is unacceptable for my purposes. Integrity of that metadata is important to me.

I’ve also discovered that Git does not support OS X extended file attributes such as tags, so I won’t be using Git for version control as I had hoped.