From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Asks user what to do with each tangle-file before overriding? Date: Sun, 18 Jun 2017 09:23:29 +0200 Message-ID: <87mv95daj2.fsf@nicolasgoaziou.fr> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42244) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dMUYb-0006F9-MR for emacs-orgmode@gnu.org; Sun, 18 Jun 2017 03:23:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dMUYW-0005bn-Nk for emacs-orgmode@gnu.org; Sun, 18 Jun 2017 03:23:37 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:57880) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dMUYW-0005aD-GX for emacs-orgmode@gnu.org; Sun, 18 Jun 2017 03:23:32 -0400 In-Reply-To: (Chunyang Xu's message of "Fri, 16 Jun 2017 13:09:52 +0800") 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: Chunyang Xu Cc: emacs-orgmode@gnu.org Hello, Chunyang Xu writes: > Currently 'C-c C-v C-t' ('org-babel-tangle') simply overrides existing > tangle-file, I would like org to ask me what to do? such as > > a) yes (override) > b) no (don't override) > c) show the diff then ask again > > In addition, if there is no diff (i.e., having the same contents), user > can choose (e.g., via a user option) to simply pass this tangle-file > without overriding. I don't think it is a good idea to have file that can be both edited manually, and auto-generated (i.e., tangled). Or, to put it differently, the idea behind tangling is that you only handle the code block, not the file itself. > I am asking for this feature because I am storing my dotfiles in a > single Org file [1], and when I change my Bash configuration then > tangle, I don't need to worry if Org is tangling other configuration > correctly, especially ~/.ssh/id_rsa and ~/.authinfo.gpg. I would rather > leave these unchanged files than override (even only file modification > timestamps are updated). You could add :tangle no on top of the sensitive blocks and remove the flag only when you want to generate them. Regards, -- Nicolas Goaziou