Moving a Finder file within an indexed folder destroys its DEVONthink replicants — expected?

I’m trying to keep Finder as the canonical file hierarchy while using DEVONthink for replicants/working sets. But look here —

  1. In Finder I have:
Main Indexed Folder (MIF)/
├── Subfolder of MIF (SOMIF)/
│   ├── A.webp
│   └── B.png
├── 1.png
├── 2.png
├── 3.png
└── 4.png
  1. I index MIF in DEVONthink.
  2. I make a replicant of A.webp and place that replicant in an ordinary DEVONthink group.
  3. In Finder, I move A.webp from SOMIF to the root of MIF.

So the file never leaves the indexed root. (This, all DT Forum threads say, ought to protect things.)

  1. DEVONthink correctly sees A.webp in its new location under MIF — but the replicant in the ordinary DT group disappears.

The screenshots show the sequence:

  • 01 — original Finder hierarchy
  • 02 — indexed hierarchy in DT + replicant of A
  • 03 — A moved in Finder, still inside MIF
  • 04 — DT updates the indexed hierarchy, but the replicant is gone

My questions:

  1. Is this expected behavior?
  2. Does DEVONthink identify indexed files primarily by path, so a Finder move causes the indexed record to be deleted/recreated rather than relocated?
  3. Is there any supported way to preserve replicants when files are reorganized within the same indexed root?
  4. Is there any stable file identifier exposed to AppleScript that could be used to reconnect/rebuild those replicants after a move?
  5. If replicants cannot survive ordinary Finder reorganization, what is the recommended way to build persistent DEVONthink working sets over a large indexed Finder corpus?

I ask this now because I’ve spent the last week instantiating a Johnny Decimal directory structure inside Finder. Finally, each thing gets a perma-home! But I need to use DT for projects. So my big Finder JD folder (call it FJD) is indexed. Then replicants from this are put into project Groups. DT experts say that as long as my Finder movements stay inside FJD, then DT indexing won’t be hurt.

“Dude, just import everything” isn’t a solution because it blocks my goal of making a perma-home for my files, reintroduces dupes and confusion, etc. Also, FJD is peppered with many markdown files that I access in Obsidian, and Obsidian works on the Finder directory structure.

So now what?

Replicants do not have a representation in the filesystem. In case of indexed files it’s therefore recommended to either avoid replicants completely or to organize the files only in DEVONthink, not in the Finder. And indexed files are indeed referenced by their path as that’s the only thing that is compatible to sync and multiple devices/platforms.

Do “the experts” actually say this? I no longer index but I believe the advice in the forum is nearly always “manage indexed groups/files from within DT, not in Finder” if you want to avoid unexpected issues (particularly if you’re indexing a location that’s syncing elsewhere, e.g. an iCloud folder). It won’t help with your replicant question but will avoid other issues like files being reported missing if a weird move occurs.

Is there a job Obsidian is doing that you don’t want DT to do? It feels like your system is going to get complicated, quickly, if you’re introducing replicants so I was wondering how to mitigate that (though of course “dude just import everything” is the right answer :rofl: And what I ended up doing!)

3 Likes

I think what you are saying is true, but only on opposite day.

DT mirrors Finder. You update indexed items (OPT-CMD-S) and DT will update to maintain correspondence … as long as you’ve made no replicants, nor moved anything around inside the indexed scope.

Oder?

This may also be affected by the location of the indexed folder in the Finder, and potentially any processes controlling the folder, e.g., a cloud service.

Oh, it looks like you’re right! Moving inside DT is safe (under a certain occult condition, see below).

I’m stress testing now to see what happens if I replicate an indexed thing (A), thereby making (RA), and move RA outside the indexed folder inside DT and then move A into a different indexed folder. And …

Yes, the Finder updated! And moving RA around does nothing!

So I just learned a major new thing: all along I thought A and RA were on a par. Both are replicants, it looks like, afterwards, since both have the dotted bisected square icon. But actually, DT still sees one as original and the other as replicant. DT sees this difference, but users cannot.

Herein lies the the solution to all our DT indexing-and-replication problems! If there were some way, say using AppleScript, for users to distinguish between “original replicants” and “generated replicants,” then a utility script could be written that would prevent all future Finder≠DT breakages!

1 Like

OK. I just discovered that all DT records, if replicated, contain an “original vs generated-by-replication” distinction.

You can run this script to see which is which:

tell application id "DNtp"
	set theRecord to selected record 1
	set shownIn to current group
	set filesystemHome to location group of theRecord
	
	if shownIn is filesystemHome then
		display dialog "FILESYSTEM-BEARING INSTANCE"
	else
		display dialog "DEVONTHINK-ONLY REPLICANT"
	end if
end tell

Vielleicht bricht jetzt die Morgendämmerung an?

1 Like

Yes — very much so. Obsidian is doing a job that I don’t want DEVONthink to do.

There are a bunch of things that are trivial/native in Obsidian but awkward, slow, or effectively absent in DT’s Markdown editor. Just a few examples:

  • rapidly cycling a line between bullet → numbered list → plain paragraph
  • creating/editing callouts
  • working directly with YAML/frontmatter/properties
  • moving whole headings/sections around while drafting
  • nested outline reordering with hotkeys
  • backlinks, and link refactoring
  • block references / embeds / transclusion
  • templates and text-expansion-type operations
  • keyboard-driven structural editing through commands/hotkeys/plugins
  • manipulating metadata and note structure as part of the writing process rather than as database metadata

And there are probably twenty other little things like this. DT can store Markdown and edit it, of course, but its Markdown editor is nowhere near Obsidian as an actual Markdown-native thinking/writing environment.

So I’m not really trying to make Obsidian into a second DEVONthink. The division I’m aiming for is more like:

DEVONthink = corpus / document management / indexing / retrieval
Obsidian = Markdown-native authoring + semantic/linking layer

The indexed Finder files are what let the same Markdown objects participate in both systems without my having two competing copies.

And yes, I agree with you about the usual forum advice: “move indexed things from inside DT” is certainly the conservative rule. Thanks to you comment, I learned that DT retains a hidden distinction between “original” and “replicant”—the former is the indexed record that corresponds to the actual Finder object, the latter denotes all additional replicants made from it, even though the UI gives all of them the same replicant icon.

If only there were a way to visibly mark this distinction in the files—that would be a game changer.

This makes sense, and I can see that your Obsidian use-case is separate to DT. I was just asking in case it was going to boil down to “but Obsidian is pretty” (which is personally where I ended up). There are lots of sensible reasons for maintaining two apps of course. While the forum does default to ‘import is king’, I think it’s because for many people it is all they need. DT is the tool, not the work. But sometimes we need complexity and that’s ok too!

It’s very satisfying when you get your system running the way you’d like! (As a fellow Johnny Decimal user -with tweaks- I also appreciate your commitment to a clear file structure. Now if only I could get my colleagues to see the light!)

1 Like

Stay tuned :wink:

Callouts are supported since version 4.3.

Possible via drag & drop in the Table of Contents inspector since version 4.0.

The Links inspectors lists both incoming/outgoing Wiki & item links. Version 4 is also able to automatically rename item and Wiki links, see Settings > WikiLinks

Transclusions are supported since version 3.

4 Likes
  • nested outline reordering with hotkeys
  • keyboard-driven structural editing through commands/hotkeys/plugins

You can move selected text via hotkeys, Control-Command-Up/Down arrows.

  • templates

DEVONthink has had templates much longer than Obsidian has been around.

1 Like

Thanks, DT Lead Team, for your detailed reply. I’m glad to stand corrected on some of those editing points. [Edited: Your outline mover does indeed work well. Sorry I’d missed that!]

Now, as for the real scary problem of not being allowed to move things in Finder: I did some more testing, and I think I finally understand what is happening.

If I move an indexed file inside DEVONthink, Finder updates correctly and its replicants survive. If I move the same file in Finder, DEVONthink sees the path change and the replicants can be destroyed.

The really surprising thing is that, after replication, the two visible instances look equivalent: both get the dotted “replicant” icon. But they are not operationally equivalent. One occurrence is still the record’s location-group instance; the others are contextual replicants. Moving the location instance can change the filesystem location. Moving one of the other instances merely changes where that replicant appears in DEVONthink.

That distinction seems extremely important, especially with indexed material, but the UI does not expose it.

A tiny AppleScript test makes it visible: compare the current group with the record’s location group. If they match, you are looking at the home/location occurrence; if not, you are looking at another replicant.

So this makes me wonder whether DEVONthink could someday expose that distinction visually—a badge, icon variant, Inspector indication, anything. For indexed records in particular, it would tell the user:

This occurrence represents the filesystem location. Moving it has filesystem consequences.

versus:

This is only an additional DEVONthink occurrence.

That would turn what currently feels like an occult rule into something users could actually reason about safely.

Was haltet ihr alle davon?

1 Like