From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 2OqQH4e9K1+8dgAA0tVLHw (envelope-from ) for ; Thu, 06 Aug 2020 08:21:27 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id uDRmG4e9K1/lWQAAB5/wlQ (envelope-from ) for ; Thu, 06 Aug 2020 08:21:27 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 0CB39940367 for ; Thu, 6 Aug 2020 08:21:27 +0000 (UTC) Received: from localhost ([::1]:54876 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3b9R-0001Hr-9W for larch@yhetil.org; Thu, 06 Aug 2020 04:21:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36612) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3b91-0001Hj-QR for emacs-orgmode@gnu.org; Thu, 06 Aug 2020 04:20:59 -0400 Received: from mail-pg1-x531.google.com ([2607:f8b0:4864:20::531]:46546) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k3b90-0007ID-6W for emacs-orgmode@gnu.org; Thu, 06 Aug 2020 04:20:59 -0400 Received: by mail-pg1-x531.google.com with SMTP id p8so10186194pgn.13 for ; Thu, 06 Aug 2020 01:20:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version; bh=p5/ul+2eRbDWZNCwzHjn2jAaQPkqbolpyeDBMOVzFnw=; b=ntAX49kn5tD48tR1FhyFpOS1vt2hon3wiXqvUYVI2Xt6VJpm9soYAdMfGY5Qjkt2Mw 9pKl4UI4OrRyjvl0whYfZ1FnspNTlg7TqR98y65ndGoMxW9NEfGdeuo8lklDjNVbKI4F gkQbBalTy9fM3htPlnUgXWZY92sx9NNaMgcGBo2e4sV3yTieutko/JZeZfiD8Rze/pim Lx4jyI07P6Br2/k5wVTHSPGn5ieFxNG5jZ0s6xSyBgREUqW15Bby19sgvp15KJGVRCGa OJ7yiJBG8DPssf6jjz8qfyVO/yeGeUl1i8HbXbeB/KsDI90QNrR5cmNxh1e2PCuPF+RV dlyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=p5/ul+2eRbDWZNCwzHjn2jAaQPkqbolpyeDBMOVzFnw=; b=HLMBTAgSo1emPh5DyBqSpW5IfQrnjRJ0P7iRHuTikKiQXPPiWR929QDQL0Hw2aWMeo sIBlVK+J7T2XSHUraAm3paIfjlVVXcpmVPe5LG3N5VKrdtedmQHPTo4pPdCDInxIUQiF bNX1ClcAtU795h7j6xkd3env87hpZNYTniP8pWW7WPDlTJrS6MDIm0CBINamNCIofCTe gGL516UGrb0s0N62z9irvMO8ftgFt6hmWGw8kxxIicyI+VZjiDMOVvImWGYeCjg1Gsr6 7rD7ypPFmi+hjAcdxtyEbBnTBgD8Uj+XZjMYOz5Y/QtyHZB2zQDy5FmtZUNzHSFPsZ5v 7N/w== X-Gm-Message-State: AOAM530CL491vk0znugxceyM+CG7v+5HGJ1m/WTcmv8jexTCQNetTp9Z 5WtvqkvR8+d91Yk9cMX4PxtRNXqL X-Google-Smtp-Source: ABdhPJwFPXotJVhFL7rG5hnAJRU0ndXOPqq/7/wN4HyCjdJoOFl6BWRMEqClaVWL+xWC2rKa+S77Lg== X-Received: by 2002:a63:8ec8:: with SMTP id k191mr6333200pge.154.1596702056034; Thu, 06 Aug 2020 01:20:56 -0700 (PDT) Received: from localhost (node-1w7jr9qt7sj4zq88x0g26tins.ipv6.telus.net. [2001:569:7c17:1900:c0ad:1d9:fa56:11b8]) by smtp.gmail.com with ESMTPSA id x6sm6090005pge.61.2020.08.06.01.20.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Aug 2020 01:20:55 -0700 (PDT) From: David Rogers To: Org-mode list Subject: Re: Delete duplicate subtrees? References: Date: Thu, 06 Aug 2020 01:20:52 -0700 In-Reply-To: (Allen Li's message of "Wed, 5 Aug 2020 21:59:39 +0000") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; format=flowed Received-SPF: pass client-ip=2607:f8b0:4864:20::531; envelope-from=davidandrewrogers@gmail.com; helo=mail-pg1-x531.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=ntAX49kn; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: -0.71 X-TUID: 5DWeBDDhgiNE Allen Li writes: > On Wed, Aug 5, 2020 at 6:16 PM David Rogers > 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. > Thank you - I'm clumsy at best with modifying code, but I'll see what I can do with it. -- David