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 wBkoFykill5AXwAA0tVLHw (envelope-from ) for ; Tue, 14 Apr 2020 20:50:49 +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 6M0ZEiwill79LwAAB5/wlQ (envelope-from ) for ; Tue, 14 Apr 2020 20:50:52 +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 5AA60940CB2 for ; Tue, 14 Apr 2020 20:50:50 +0000 (UTC) Received: from localhost ([::1]:38958 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jOSW8-00053y-Po for larch@yhetil.org; Tue, 14 Apr 2020 16:50:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52875) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jOSVl-00053k-O7 for emacs-orgmode@gnu.org; Tue, 14 Apr 2020 16:50:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jOSVk-0005Qk-K1 for emacs-orgmode@gnu.org; Tue, 14 Apr 2020 16:50:25 -0400 Received: from ciao.gmane.io ([159.69.161.202]:39116) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jOSVj-0005PS-3p for emacs-orgmode@gnu.org; Tue, 14 Apr 2020 16:50:23 -0400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1jOSVf-0000XN-F3 for emacs-orgmode@gnu.org; Tue, 14 Apr 2020 22:50:19 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org From: Marc Ihm Subject: Re: Assistant to remove unused IDs of org-id Date: Tue, 14 Apr 2020 22:50:09 +0200 Message-ID: References: <1244245671.1302763.1586796345440@www.ud-mail.de> <87y2qyu5vc.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 In-Reply-To: <87y2qyu5vc.fsf@localhost> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 159.69.161.202 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 X-Spam-Score: -0.51 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; 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-Scan-Result: default: False [-0.51 / 13.00]; ARC_NA(0.00)[]; GENERIC_REPUTATION(0.00)[-0.57541660114514]; RCVD_COUNT_FIVE(0.00)[6]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.51.188.0/24:c]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[ihm.name]; HAS_LIST_UNSUB(-0.01)[]; RCPT_COUNT_ONE(0.00)[1]; RCVD_TLS_LAST(0.00)[]; IP_REPUTATION_HAM(0.00)[asn: 22989(0.27), country: US(-0.01), ip: 209.51.188.17(-0.58)]; MX_GOOD(-0.50)[cached: eggs.gnu.org]; FORGED_SENDER_MAILLIST(0.00)[]; MAILLIST(-0.20)[mailman]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:22989, ipnet:209.51.188.0/24, country:US]; TAGGED_FROM(0.00)[larch=yhetil.org]; FROM_NEQ_ENVFROM(0.00)[marc@ihm.name,emacs-orgmode-bounces@gnu.org] X-TUID: XoCKSvsVSI69 Hi Ihor, Thanx ! Fixed it. Details: I am now checking (string= (org-attach-dir-from-id id) (org--attach-dir)) to see if the ID is used in the attachment dir (if it exists). Background: I do not use attachments myself; did not remember, they use IDs :-/ Best regards, Marc Am 14.04.2020 um 05:02 schrieb Ihor Radchenko: > I quickly looked through the code. It seems that you do not consider > attachments, which are normally stored in a folder named after the > entry's ID property. Deleting those ID is terrible idea. > > Best, > Ihor > > > Marc-Oliver Ihm writes: > >> Hi, >> >> as I use the excellent package org-id in a somewhat non-standard way, I tend to produce IDs, that are not referenced from anywhere. Org-id handles this great and does not suffer in performance, but eventually I want to remove those unreferenced IDs. >> Therefore I have written a small interactive assistant: >> >> https://github.com/marcIhm/org-working-set/blob/master/org-id-cleanup.el >> >> to help with removing those IDs. >> The assistant (interactive function: org-id-cleanup) is quite detailed with its instructions and checks, so that the risk of doing harm ist reduced to a minimum, although not to zero (therefore the first step is to ask for a backup). >> >> In any case I wonder, if this functionality (removing unreferenced IDs) could be helpful for anyone else. >> >> So please feel free to have a look. >> Finally I would be grateful for any comment whatsoever >> (e.g. regarding the name of org-id-cleanup.el). >> >> Best regards >> Marc >> >