From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: New feature? Remove duplicate subheadings, preserving order Date: Tue, 02 Jan 2018 11:36:28 -0500 Message-ID: <87r2r8w73n.fsf@alphaville.usersys.redhat.com> References: <87a7xxx5c5.fsf@nicolasgoaziou.fr> <87tvw5cu5t.fsf@nicolasgoaziou.fr> <87mv1wvr70.fsf@alphapapa.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41488) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eWPYa-0005vq-Fv for emacs-orgmode@gnu.org; Tue, 02 Jan 2018 11:36:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eWPYX-0003Eg-Bb for emacs-orgmode@gnu.org; Tue, 02 Jan 2018 11:36:52 -0500 Received: from [195.159.176.226] (port=46797 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eWPYX-0003DL-3e for emacs-orgmode@gnu.org; Tue, 02 Jan 2018 11:36:49 -0500 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1eWPWU-0000aa-JY for emacs-orgmode@gnu.org; Tue, 02 Jan 2018 17:34:42 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org 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 them manually. Perhaps >>> that would be a useful additional feature however (like uniq -d). >> >> I think warning or asking for confirmation should be the default action, >> because it's the safest option. Users who want to skip that could use a >> prefix argument or call it from a custom command. > > 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 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* happened: there have been multiple postings in the ML about such problems. Whenever it has happened, the devs have always modified org to make it safer: that is the prudent thing to do and the correct course of action IMO. Hell hath no fury like an orgmode user who lost part of his/her precious org file because of an errant keystroke a month ago and was not aware of the loss until it was too late. -- Nick