Group email conversation threads a posteriori

The import behaviour of DEVONthink is regulated mostly in the setting of preferences. I noticed that there is an option to group emails “by conversation” rather than keep them as a simple linear list of individual emails.

As far as I can make out the setting is NOT retroactive in the sense of grouping emails that have already been imported - it only groups future imports/archiving requests. As I already have 5k+ emails imported I’m wondering if there is a way of triggering a full grouping again or is the best to delete all emails and start from scratch ?

Many thanks ahead of time.

Using DT3.0 Beta 2.

1 Like

You could try the new option View > Sort > by Thread in List or Columns view instead. This setting groups messages (e.g. of a newsfeed or archived emails) on the fly.

1 Like

Very nice - it works quickly and seems to be accurate at first glance. Does this ability to switch back and forth make the setting in Preferences to group emails redundant ?

Yes, this option might be removed. But as some users might prefer a real group hierarchy it’s still there.

Just catching up on this exchange. I had both “import complete conversations” and “group conversation threads” checked when I archived my mailbox. Is it possible to remove the grouping? I cannot change it from the View->Sort menu

You could ungroup the created groups via Data > Ungroup.

1 Like

View > Sort > by Thread in List or Columns view does not seem to work or ar least not all the time. For example, today I just imported by drag and drop four email of the same Outlook thread but they are recognized as same thread in DEVONthink.

What’s the subject of the emails? This sorting uses only the name of items for grouping.

the subject is the same, just extra Re and FW suffixes added by outlook when replying or forwarding

Here is an example: two emails imported as part of the same thread in Outlook which are not grouped even after I select View > Sort > by Thread in List or Columns view

How did you import these emails, e.g. via drag & drop? The name doesn’t seem to be identical to the original subject (Re- instead of Re:)

drag&drop from Outlook

No idea why ‘Re-’ appears instead of ‘Re:’ in Outlook they have the same Subject field

This has something to do with the file system - I’ve just created a test file called Re: this is a test; it retains that name in DT, but is called Re- this is a test.txt in Finder (as is to be expected). I think in your case this has something to do with the fact that the files are indexed. As a quick experiment, could you perhaps drag & drop an e-mail with Re: in the title to a database which is not indexed? See whether it retains the name correctly there.

PS if I drag a mail with Re: in its title to an indexed folder from Mail (with DT Mail plugin installed and active), then the name is retained in DT; I don’t have Outlook, so can’t test further myself.

Just did that as requested: no difference.

Thanks for that. Would you mind simply changing the name to “Re: …” from “Re- …”, just to see whether that very simple step leads to DT recognising the thread?

Yes, it does:

Excellent. I’m assuming there is something about the way that the file is transferred from Outlook to DT which changes the name to make it conform to naming conventions encoded in the OS. Presumably it’s dropped via a temporary folder.

Two options I see here: use a smart rule with a simple script which changes “Re-” to “Re:” on import, and/or wait for Criss to write something along the lines of “fixed for the next release” :slight_smile:

on performSmartRule(theRecords)
	tell application id "DNtp"
		repeat with theRecord in theRecords
			set theName to name of theRecord
			if theName starts with "Re-" then
				set theName to texts 4 thru -1 of theName
				set theName to "Re:" & theName
				set the name of theRecord to theName
			end if
		end repeat
	end tell
end performSmartRule

In a quick test, that smart rule (set, of course, to on import) with the embedded script above seems to work (I can’t remember whether you code yourself; if you do, please excuse me rushing ahead and posting).

1 Like

What’s the name of the file after dropping the email from Outlook to the desktop?

When I drag & drop the message on the desktop, it gets the hyphen. E.g.:

Re- Your client looking for performance tuning help.eml