emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Assistant to remove unused IDs of org-id
@ 2020-04-13 16:45 Marc-Oliver Ihm
  2020-04-13 20:04 ` Adam Porter
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Marc-Oliver Ihm @ 2020-04-13 16:45 UTC (permalink / raw)
  To: emacs-orgmode

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Assistant to remove unused IDs of org-id
  2020-04-13 16:45 Assistant to remove unused IDs of org-id Marc-Oliver Ihm
@ 2020-04-13 20:04 ` Adam Porter
  2020-04-14 20:55   ` Marc Ihm
  2020-04-14  3:02 ` Ihor Radchenko
  2020-05-22 15:21 ` Bastien
  2 siblings, 1 reply; 6+ messages in thread
From: Adam Porter @ 2020-04-13 20:04 UTC (permalink / raw)
  To: emacs-orgmode

Marc-Oliver Ihm <marc@ihm.name> writes:

> 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).

Hi Marc,

Thanks, this looks useful.  I posted some feedback as an issue on the
repository.

Adam



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Assistant to remove unused IDs of org-id
  2020-04-13 16:45 Assistant to remove unused IDs of org-id Marc-Oliver Ihm
  2020-04-13 20:04 ` Adam Porter
@ 2020-04-14  3:02 ` Ihor Radchenko
  2020-04-14 20:50   ` Marc Ihm
  2020-05-22 15:21 ` Bastien
  2 siblings, 1 reply; 6+ messages in thread
From: Ihor Radchenko @ 2020-04-14  3:02 UTC (permalink / raw)
  To: Marc-Oliver Ihm, emacs-orgmode

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 <marc@ihm.name> 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
>

-- 
Ihor Radchenko,
PhD,
Center for Advancing Materials Performance from the Nanoscale (CAMP-nano)
State Key Laboratory for Mechanical Behavior of Materials, Xi'an Jiaotong University, Xi'an, China
Email: yantar92@gmail.com, ihor_radchenko@alumni.sutd.edu.sg


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Assistant to remove unused IDs of org-id
  2020-04-14  3:02 ` Ihor Radchenko
@ 2020-04-14 20:50   ` Marc Ihm
  0 siblings, 0 replies; 6+ messages in thread
From: Marc Ihm @ 2020-04-14 20:50 UTC (permalink / raw)
  To: emacs-orgmode

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 <marc@ihm.name> 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
>>
> 




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Assistant to remove unused IDs of org-id
  2020-04-13 20:04 ` Adam Porter
@ 2020-04-14 20:55   ` Marc Ihm
  0 siblings, 0 replies; 6+ messages in thread
From: Marc Ihm @ 2020-04-14 20:55 UTC (permalink / raw)
  To: emacs-orgmode

Hi Adam,
thanx for your feedback !
Your main point (the central function beeing to long) is undisputed;
will fix this during the next refactoring ...
Best regards,
Marc
Am 13.04.2020 um 22:04 schrieb Adam Porter:
> Marc-Oliver Ihm <marc@ihm.name> writes:
> 
>> 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).
> 
> Hi Marc,
> 
> Thanks, this looks useful.  I posted some feedback as an issue on the
> repository.
> 
> Adam
> 
> 
> 




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Assistant to remove unused IDs of org-id
  2020-04-13 16:45 Assistant to remove unused IDs of org-id Marc-Oliver Ihm
  2020-04-13 20:04 ` Adam Porter
  2020-04-14  3:02 ` Ihor Radchenko
@ 2020-05-22 15:21 ` Bastien
  2 siblings, 0 replies; 6+ messages in thread
From: Bastien @ 2020-05-22 15:21 UTC (permalink / raw)
  To: Marc-Oliver Ihm; +Cc: emacs-orgmode

Hi Marc-Oliver,

Marc-Oliver Ihm <marc@ihm.name> writes:

> 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

This looks useful - if you some place where to document this on worg,
please go ahead!

Best,

-- 
 Bastien


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-05-22 15:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-13 16:45 Assistant to remove unused IDs of org-id Marc-Oliver Ihm
2020-04-13 20:04 ` Adam Porter
2020-04-14 20:55   ` Marc Ihm
2020-04-14  3:02 ` Ihor Radchenko
2020-04-14 20:50   ` Marc Ihm
2020-05-22 15:21 ` Bastien

Code repositories for project(s) associated with this inbox:

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).