From mboxrd@z Thu Jan  1 00:00:00 1970
From: Nicolas Goaziou <n.goaziou@gmail.com>
Subject: Re: [org-e-latex] Coding System
Date: Thu, 22 Nov 2012 14:49:16 +0100
Message-ID: <87pq35d9yb.fsf@gmail.com>
References: <loom.20121119T082130-542@post.gmane.org>
	<87boet5vuc.fsf@Rainer.invalid>
Mime-Version: 1.0
Content-Type: text/plain
Return-path: <emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org>
Received: from eggs.gnu.org ([208.118.235.92]:60607)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <n.goaziou@gmail.com>) id 1TbXDj-00051T-Ls
	for emacs-orgmode@gnu.org; Thu, 22 Nov 2012 08:53:39 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <n.goaziou@gmail.com>) id 1TbXDd-0004sR-UR
	for emacs-orgmode@gnu.org; Thu, 22 Nov 2012 08:53:35 -0500
Received: from mail-wi0-f177.google.com ([209.85.212.177]:56463)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <n.goaziou@gmail.com>) id 1TbXDd-0004sI-Od
	for emacs-orgmode@gnu.org; Thu, 22 Nov 2012 08:53:29 -0500
Received: by mail-wi0-f177.google.com with SMTP id c10so560043wiw.12
	for <emacs-orgmode@gnu.org>; Thu, 22 Nov 2012 05:53:28 -0800 (PST)
In-Reply-To: <87boet5vuc.fsf@Rainer.invalid> (Achim Gratz's message of "Mon,
	19 Nov 2012 18:46:51 +0100")
List-Id: "General discussions about Org-mode." <emacs-orgmode.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/emacs-orgmode>,
	<mailto:emacs-orgmode-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/emacs-orgmode>
List-Post: <mailto:emacs-orgmode@gnu.org>
List-Help: <mailto:emacs-orgmode-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/emacs-orgmode>,
	<mailto:emacs-orgmode-request@gnu.org?subject=subscribe>
Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org
Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org
To: Achim Gratz <Stromeko@nexgo.de>
Cc: emacs-orgmode@gnu.org

Hello,

Achim Gratz <Stromeko@nexgo.de> writes:

> I looked at the code/documentation and it seems the intention is to do
> the reverse lookup, that is look at the buffer encoding and decide what
> to give inputenc as argument (when it is specified as "AUTO" in the
> header template).  I maintain that the other way around (looking at the
> header template and deciding the coding system) is probably easier to
> understand and it is also what's already been used by Emacs: see
> latexenc-find-file-coding-system and latex-inputenc-coding-alist.

Emacs also provides `latexenc-coding-system-to-inputenc', so it doesn't
look like one way is more legitimate than the other.

Note that we can have both ways: with AUTO, let coding-system decide and
without AUTO, let inputenc decide. Also, it isn't necessary to change
the global coding system to change the coding system used to write the
file: see `org-export-coding-system'.

Anyway, if you think it's useful to provide a patch, I suggest to
dynamically bind `org-export-coding-system' in
`org-e-latex-export-to-latex' before `org-export-to-file' is called.
You'll have to open "outfile" in order to apply
`latexenc-find-file-coding-system'.

Do you want to provide such patch?


Regards,

-- 
Nicolas Goaziou