all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "James Wong" <jianwang.academic@gmail.com>
To: emacs-orgmode@gnu.org
Subject: How to set encoding for orgmode tangled file?
Date: Fri, 6 Jan 2017 12:57:06 +0800	[thread overview]
Message-ID: <139c01d267d9$753075c0$5f916140$@gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 762 bytes --]

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. 

 


[-- Attachment #2: Type: text/html, Size: 7769 bytes --]

                 reply	other threads:[~2017-01-06  4:58 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='139c01d267d9$753075c0$5f916140$@gmail.com' \
    --to=jianwang.academic@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.