From mboxrd@z Thu Jan 1 00:00:00 1970 From: Giacomo M Subject: Re: Controlling new line characters during tangle Date: Thu, 22 Jun 2017 11:40:50 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:32928) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNybj-0008AT-Ak for emacs-orgmode@gnu.org; Thu, 22 Jun 2017 05:41:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dNybg-0000IH-7O for emacs-orgmode@gnu.org; Thu, 22 Jun 2017 05:40:59 -0400 Received: from mail-wr0-x233.google.com ([2a00:1450:400c:c0c::233]:34186) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dNybg-0000HJ-0l for emacs-orgmode@gnu.org; Thu, 22 Jun 2017 05:40:56 -0400 Received: by mail-wr0-x233.google.com with SMTP id 77so15550596wrb.1 for ; Thu, 22 Jun 2017 02:40:54 -0700 (PDT) In-Reply-To: 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: Kaushal Modi , emacs-org list

Ok, rudimentary elisp knowledge seems to help here:

#+BEGIN_SRC emacs-lisp
(defun jack/dos2unix-post-tangle-hook ()
  (set-buffer-file-coding-system 'unix 't)
  (save-buffer)
  )
(add-hook 'org-babel-post-tangle-hook 'jack/dos2unix-post-tangle-hook)
#+END_SRC

Thanks,

Giacomo

Il 6/21/2017 1:02 PM, Kaushal Modi ha scritto:
On Wed, Jun 21, 2017, 5:21 AM Giacomo M <jackjackk@gmail.com> wrote:
Hi all,

I'm using emacs also under Windows, and would need to tangle
scripts/config files to be used under Unix.

Is there any header argument
to enforce the desired new line characters in the tangled files?

At which point would you like to enforce the new line characters?

Can you post a MWE and explain what that it tangles to vs what you'd actually like to see in the tangled file?
--

Kaushal Modi