emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Delete duplicate subtrees?


From: David Rogers
Subject: Re: Delete duplicate subtrees?
Date: Thu, 06 Aug 2020 18:07:42 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

Allen Li <darkfeline@felesatra.moe> writes:

On Wed, Aug 5, 2020 at 6:16 PM David Rogers <davidandrewrogers@gmail.com> wrote:

Hello

I've copied text from several different sources into an org
buffer, and now I find I have a large number of subtrees that are exactly the same. All headlines are at the top level, so there are
no duplicates at different levels from each other - but there
*are* some where the headline matches but the contents don't
match. Is there an efficient way to delete all-but-one of the
exactly duplicate subtrees, but avoid deleting any whose contents
are different? (When the large number of exact duplicates are
gone, it will be easy for me to resolve the partial matches one by
one.)

Maybe this will be useful to you.

https://lists.gnu.org/archive/html/emacs-orgmode/2017-12/msg00626.html
https://lists.gnu.org/archive/html/emacs-orgmode/2018-01/msg00000.html

You will have to modify the code since IIRC the linked code only
matches by heading and not body.


After reading the discussion about the code you provided, it's clear to me that what I need is exactly what the "naysayers" were pointing out - something that definitely scans the full text, and maybe gives notice of what's being changed. I don't have the ability to correctly build in those kinds of things myself.

--
Thanks
David



reply via email to

[Prev in Thread] Current Thread [Next in Thread]