From mboxrd@z Thu Jan 1 00:00:00 1970 From: "James Wong" Subject: How to set encoding for orgmode tangled file? Date: Fri, 6 Jan 2017 12:57:06 +0800 Message-ID: <139c01d267d9$753075c0$5f916140$@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_139D_01D2681C.83553C60" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36721) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cPMbP-0004Io-BT for emacs-orgmode@gnu.org; Thu, 05 Jan 2017 23:58:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cPMbO-0000kT-Er for emacs-orgmode@gnu.org; Thu, 05 Jan 2017 23:58:07 -0500 Received: from mail-pg0-x241.google.com ([2607:f8b0:400e:c05::241]:36335) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cPMbO-0000k3-56 for emacs-orgmode@gnu.org; Thu, 05 Jan 2017 23:58:06 -0500 Received: by mail-pg0-x241.google.com with SMTP id 75so4585854pgf.3 for ; Thu, 05 Jan 2017 20:58:04 -0800 (PST) Received: from LenovoPC ([2001:da8:5006:c00:9480:4852:d37:b37e]) by smtp.gmail.com with ESMTPSA id y189sm156670837pfy.32.2017.01.05.20.57.59 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 05 Jan 2017 20:58:02 -0800 (PST) Content-Language: zh-cn 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 This is a multipart message in MIME format. ------=_NextPart_000_139D_01D2681C.83553C60 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi, all In orgmode, is there a way to set coding system for the tangled file? For example, my default coding system is utf-8, and when I tangle some src blocks sometimes I want the tangled file to use other coding systems like chinese-gbk. It would be perfect if orgmode had a header argument (eg. :file-coding) for this. What I'm trying to do can be demonstrated with following code blocks: begin_src mylang :file-coding 'chinese-gbk :tangle tangled.txt first block end_src begin_src mylang :tangle tangled.txt second block end_src When org-babel-tangle is called, the two src blocks should be tangled into one tangled.txt file with chinese-gbk as its coding system. Note that only the first block has the :file-coding argument. ------=_NextPart_000_139D_01D2681C.83553C60 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

H= i, all

 

I= n orgmode, is there a way to set coding system for the tangled file? For = example, my default coding system is utf-8,= and when I tangle some src blocks sometimes I want the tangled file to = use other coding systems like chinese-gbk.= It would be perfect if orgmode had a header argument = (eg. :file-coding)= for this. What I'm trying to do can be demonstrated with following code = blocks:

<= o:p> 

begin_src mylang = :file-coding 'chinese-gbk :tangle = tangled.txt

  first = block

end_src

 

begin_src mylang = :tangle tangled.txt

  second = block

end_src

 =

<= o:p> 

W= hen org-babel-tangle&= nbsp;is called, the two src blocks should be tangled into = one tangled.txt = f= ile with chinese-gbk&= nbsp;as its coding system. Note that only the first block has = the :file-coding = a= rgument.

 

------=_NextPart_000_139D_01D2681C.83553C60--