emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] New feature? Remove duplicate subheadings, preserving order


From: Florian Beck
Subject: Re: [O] New feature? Remove duplicate subheadings, preserving order
Date: Tue, 2 Jan 2018 16:28:42 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0


AFAIK, this is the first time this need is expressed on this ML. There
is no equivalent in "org-list.el" either.

A way to handle duplicates would be useful, indeed. But a basic function should only remove duplicates that are truly identical (same properties, same tags, same/no content). Still, removing true duplicates from subtrees (AND lists) would be useful.

More useful would be a slightly more general approach. I have three kinds of duplicates:
 - duplicate IDs (which are handled rather poorly),
 - duplicate content (which often is only almost identical) and
 - duplicate headings (which usually I want to rectify when they are on
   the same level of the same subtree)

As you can see, a fixed concept of duplication is probably not going to work.

What I'd like is a function finds duplicates according to scope, match (as in `org-map-entries') and a user defined function. This function should then display the problem cases (via agenda view?). Then we need a couple of convenience functions like
 - delete all duplicates but the one at point,
 - mark duplicates I want to keep,
 - uniquify entries (tricky; for headlines maybe prompt the user; for
   IDs, we should check if the ID is referenced from somewhere)
 - merge entries.

But then, I also have duplicates (in content) I want to keep, e.g. one in my notes and in a writing project. So, we'd need a property like "DUPLICATE_OF".






reply via email to

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