From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [org-e-latex] Coding System Date: Thu, 22 Nov 2012 14:49:16 +0100 Message-ID: <87pq35d9yb.fsf@gmail.com> References: <87boet5vuc.fsf@Rainer.invalid> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:60607) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) 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 ) 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 ) 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 ; 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." 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Achim Gratz Cc: emacs-orgmode@gnu.org Hello, Achim Gratz 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