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

2018-01-03 Thread Adam Porter
Ihor Radchenko writes: > Is there any possible way to prevent it more reliably? > > I am aware of org-catch-invisible-edits, but this is obviously not > enough. Does it make sense to generate some kind of subtree based diff > after each change, so that user can review all

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

2018-01-03 Thread Ihor Radchenko
Is there any possible way to prevent it more reliably? I am aware of org-catch-invisible-edits, but this is obviously not enough. Does it make sense to generate some kind of subtree based diff after each change, so that user can review all recent changes in org files? Ihor Adam Porter

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

2018-01-02 Thread Adam Porter
Nick Dokos writes: > There be dragons. > > The problem is that some things happen invisibly and far away from > where you are, so you don't know about it and you don't find out for a > couple of weeks. Undo and automatic backups are useless in that case. > > That *has*

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

2018-01-02 Thread Adam Porter
Allen Li writes: > Designing around actual use cases that users have an immediate use for > is better than trying to predict what users might need in the far > future, especially if adding those features requires extra complexity. You seem to be approaching this from a

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

2018-01-02 Thread Allen Li
On Tue, Jan 2, 2018 at 6:36 AM, Robert Horn wrote: > > Allen Li writes: > >> On Mon, Jan 1, 2018 at 8:07 PM, Adam Porter wrote: >> >> I don’t see a use case for checking all heading data. >> > > I can see such cases arising from templates and time

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

2018-01-02 Thread Allen Li
On Tue, Jan 2, 2018 at 7:28 AM, Florian Beck wrote: > >> 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

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

2018-01-02 Thread Allen Li
On Tue, Jan 2, 2018 at 8:36 AM, Nick Dokos wrote: > Allen Li writes: >> >> There is always undo and automatic Emacs file backups. >> > > There be dragons. > > The problem is that some things happen invisibly and far away from > where you are, so you

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

2018-01-02 Thread Nick Dokos
Allen Li writes: > > I don’t see a use case for checking all heading data. > >>> Since the point would be remove duplicates from lists, I don’t think >>> warning is very useful. I would want to remove the duplicate list >>> items, not get a warning about it and delete

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

2018-01-02 Thread Florian Beck
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).

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

2018-01-02 Thread Robert Horn
Allen Li writes: > On Mon, Jan 1, 2018 at 8:07 PM, Adam Porter wrote: > > I don’t see a use case for checking all heading data. > I can see such cases arising from templates and time tracking. I can have a template that captures telephone calls. The call comes in and I

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

2018-01-01 Thread Allen Li
On Mon, Jan 1, 2018 at 8:07 PM, Adam Porter wrote: > Allen Li writes: > >> I don’t know if a more intelligent way of handling tags and todo >> keywords is worth the extra complexity, but in the use case that I >> imagine it makes sense to match using

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

2018-01-01 Thread Adam Porter
Allen Li writes: > I don’t know if a more intelligent way of handling tags and todo > keywords is worth the extra complexity, but in the use case that I > imagine it makes sense to match using only the heading/list item: > > * Things to buy > ** TODO cabbage > ** DONE

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

2018-01-01 Thread Allen Li
On Mon, Jan 1, 2018 at 10:26 AM, Nicolas Goaziou wrote: > Allen Li writes: > >> Org mode is fundamentally an outliner, and one often makes lists with >> an outliner. Filtering out duplicates from a list seems to me like a >> common need. > >

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

2018-01-01 Thread Nicolas Goaziou
Allen Li writes: > Org mode is fundamentally an outliner, and one often makes lists with > an outliner. Filtering out duplicates from a list seems to me like a > common need. AFAIK, this is the first time this need is expressed on this ML. There is no equivalent in

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

2018-01-01 Thread Allen Li
On Mon, Jan 1, 2018 at 2:04 AM, Nicolas Goaziou wrote: > Duplicates headings are not necessarily wrong. I think this is too > specific to be integrated in Org proper. > > Maybe we could add a check for duplicates headings in Org Lint instead, > and add this to Worg, in a

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

2018-01-01 Thread Nicolas Goaziou
Hello, Allen Li writes: > I wrote a command to remove duplicate subheadings, which I use to > remove duplicate captured links among other things. Would this be a > useful addition to Org mode? > > I have included it below for reference. I will clean it up a bit if >

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

2017-12-31 Thread Marcin Borkowski
On 2018-01-01, at 03:42, Allen Li wrote: > I wrote a command to remove duplicate subheadings, which I use to > remove duplicate captured links among other things. Would this be a > useful addition to Org mode? IMHO yes. -- Marcin Borkowski