emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Asks user what to do with each tangle-file before overriding?


From: Nicolas Goaziou
Subject: Re: [O] Asks user what to do with each tangle-file before overriding?
Date: Sun, 18 Jun 2017 09:23:29 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)

Hello,

Chunyang Xu <address@hidden> 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



reply via email to

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