Delete tags without deleting notes

Hey!

I’m starting to use DT3 and I would like to know if there is any way to delete tags without deleting the notes… or remove tags from several notes at once.

Thanks!

1 Like

Assuming that your documents are located in groups (see e.g. location shown in Info inspector) and not only in tags then you could just remove the tag (this untags all items having this tag) or remove some items from the tag. See Sidebar > Tags.

1 Like

oh…

I tried that approach before and I saw the trash can fill up with notes and I thought I was deleting the tags and the notes. Now I see that I’m just deleting the tags.

Thanks!

From the Help > Documentation > Getting Started > Tagging:

Applying tags: When you apply a tag to an item, a replicant of that item is created in the Tags section for the current database. For each tag you apply, you will have a replicant in each tag group. These are not the original items, but only instances of the items. If you delete a tag group, the group and the replicants it contains are removed. The original items in the database remain intact.

8 Likes

Thanks goodness I found this thread! I’ve been completely baffled for days about how to remove tags without apparently deleting the documents to which they apply. I thought I’d read the help file thoroughly but clearly need to go through it again (I’m a new user of DevonThink as of this version).

I didn’t realise the items in the Tags folders were replicants because there was no indication they were such in spite of the fact that I’ve checked the preference Mark duplicates and replicants in color.

I’m really appreciating the flexibility of DevonThink but this aspect certainly exercised me!

Stephen

3 Likes

To be honest I often was wondering about this, as well – not having read the documentation ever. After ca. 15 years of using DevonThink, mind you :wink:

Perhaps it should be made more obvious from the tag view (or perhaps rather in the trash then) that you are not dealing with the original documents there.

What happens if my document is not contained in any group? Would I delete the original in that case?

I didn’t realise the items in the Tags folders were replicants because there was no indication they were such in spite of the fact that I’ve checked the preference Mark duplicates and replicants in color .

Perhaps it should be made more obvious from the tag view (or perhaps rather in the trash then) that you are not dealing with the original documents there.

That’s actually the same behavior as DEVONthink 2.x :slight_smile:

What happens if my document is not contained in any group? Would I delete the original in that case?

That would only happen if you created the documents directly in the Tag group. And the behavior in DEVONthink 3 creates the file in the root of the database if you try and create files in a Tag group.

1 Like

There is one additional (beyond the fact that tagged documents are not marked as replicants) caveat to keep in mind when looking at tags as replicants, as deletion doesn’t work exactly the same. While deleting a tag group does work as described above, the reverse is not true. Deleting the original items in the database will not result in the tagged items remaining in the respective tag groups.

4 Likes

This should be updated. This is far more confusing than it should be… because, as mentioned, replicants are never mentioned. Even if after creating a tag and selecting the original file, the properties tell me it has no replicants.

For example, if I move a tag to the trash and then ungroup the file from the tag, how on earth does someone know if the file is a file or a ‘non-replicant’ replicant?

1 Like

if I move a tag to the trash and then ungroup the file from the tag

Under what circumstance would you do this?

Under what circumstance would you do this?

Well, I did it because I was confused about what was going on.

The point is that because things aren’t shown clearly as what they are, it’s easy to move an unlisted replicant as a file and get mightily confused in the process. I mean, if a replicant is actually a replicant, why isn’t it listed as being one? Why when I click on the original file does it say 0 replicants of it exist, when one does?

Even if you could argue that it’s a different kind of replicant, there should be clear indication something has been created from the original file, and some kind of indication the tag replicant isn’t a duplicate of the original file.

1 Like

I am a little confused by the ideas discussed in this thread.

If applying a tag creates a replicant, why does the original item still indicate that it has zero replicants?

I think I want all of my items to be in actual groups and not merely in tags. Is there a way I can double check this?

They are not counted as replicants, probably in order to not confuse users.

As far as I know no, not without a script.

Since some versions it’s unlikely to encounter a situation where a record’s only parent is a tag. This is true for new records, don’t know whether the DEVONthink version that introduced the new behaviour automatically took care of old records, i.e. automatically replicated record’s whose only parent is a tag into the root or the inbox.

As far as I know now the only way you could end up with such a situation is to move a record into a tag via script. Can of course happen by accident but I doubt that’s something to worry about - given that we use test records to test scripts.

-- Replicate record to root if its only parent is a Tag

tell application id "DNtp"
	try
		set theRecords to selected records
		if theRecords = {} then error "Please select some records."
		show progress indicator "Verifying parents... " steps (count theRecords) as string with cancel button
		
		repeat with thisRecord in theRecords
			step progress indicator (name of thisRecord) as string
			set theParents to (parents of thisRecord whose location does not start with "/Tags/")
			if theParents = {} then
				replicate record thisRecord to root of database of thisRecord
				set theTags to tags of thisRecord
				set tags of thisRecord to {} -- necessary to reassign "parent 1" to a non tag record
				set tags of thisRecord to theTags
			end if
		end repeat
		
		hide progress indicator
	on error error_message number error_number
		hide progress indicator
		if the error_number is not -128 then display alert "DEVONthink" message error_message as warning
		return
	end try
end tell

Edit:

In case someone wonders why tags are temporarily removed:

Without that asking in a script for parent 1 still would return one of the tags. That means any script that uses parent 1 would then act on a tag and not on a group, i.e. we would likely run into trouble which hardly can be tracked down.

That’s not true. One can make a tag the only parent of a record by dragging the record onto a tag while pressing ⌥ ⌘.

@cgrunenberg This should be made impossible, I think.

Right now this is still supported only to improve the compatibility to version 2 and some rare workflows. Few users stored all their docs only inside Tags (although this was never recommended or suggested). As long as nobody needs this anymore, it could of course be disabled.

2 Likes

The next version will finally disable this.

1 Like

I agree, this is totally confusing! Why are replicants created at all when I only want to apply tags?

Again, you should at least MARK those replicants as replicants (highlight them in red or whatever), so I can recognise them. Will anything related to this be improved in future versions?

It is part of the mechanism relating to the underlying index and database structure. There’s more going on than a simple application of attributes.

Why do you need the replicants in the Tags marked in red? If you’re browsing in a tag group, it’s clear they are files that have that tag applied. And if you’re not in a tag group, you’d never know the difference as there are other ways to see the tags of files.

Ok, I get the point that it is a more complex process when applying tags and it is somehow needed that replicants are being created.

Still, I think what some of us users scares is when it comes to removing tags again. If I delete a tag group and than open the trash and I see all those items in there which where tagged before and now not being marked as REPLICANTS, it lets me think these are my original items. This is confusing. So it would be wonderful if I could see IN THE TRASH group, that these items are only replicants. Do you get my point?