From mboxrd@z Thu Jan 1 00:00:00 1970 From: Achim Gratz Subject: Re: [Bug] Export Coding System Date: Fri, 22 Feb 2013 22:29:41 +0100 Message-ID: <87ehg8nika.fsf@Rainer.invalid> References: <87zjywjxjp.fsf@gmail.com> <87ppzsjp0t.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:38603) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U90C4-0007cG-Ox for emacs-orgmode@gnu.org; Fri, 22 Feb 2013 16:30:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U90Bx-0006FR-ER for emacs-orgmode@gnu.org; Fri, 22 Feb 2013 16:30:12 -0500 Received: from plane.gmane.org ([80.91.229.3]:56356) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U90Bx-0006D9-8F for emacs-orgmode@gnu.org; Fri, 22 Feb 2013 16:30:05 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1U90CD-0006X9-UR for emacs-orgmode@gnu.org; Fri, 22 Feb 2013 22:30:21 +0100 Received: from pd9eb3624.dip.t-dialin.net ([217.235.54.36]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 22 Feb 2013 22:30:21 +0100 Received: from Stromeko by pd9eb3624.dip.t-dialin.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 22 Feb 2013 22:30:21 +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: emacs-orgmode@gnu.org Nicolas Goaziou writes: >> Depends on what language environment is set to, but with the default setting of >> my Emacs (German) it becomes iso-latin-1, independently of what the coding >> system in the original Org buffer was. > > In this case, it should be `utf-8', shouldn't it? I want it to be utf-8, but it isn't. The course of events is apparently that when a new buffer gets created it will have the default coding system. You are then apparently asking that buffer for the coding system (always the default) and set inputenc accordingly, but should have asked the parent Org buffer. Or so I think, a few details are probably still wrong. >> I think that the export buffer coding system should be explicitly set (via >> buffer-file-coding-system, which is automatically buffer-local) to copy the >> coding of the parent buffer (or the coding specified via export options if >> anything like that exists) so that the default choice of the language >> environment doesn't kick in. > > Still trying to understand: is the coding system wrong when you export > to a file, to a (temporary) buffer, or both? Both. > Note that `org-export-to-file' use `coding-system-for-write', which > overrides `buffer-file-coding-system'. So this variable is probably > irrelevant here. No it is not irrelevant, it simply gets set too late in the game: it asks for the new coding system when it is time to save the buffer, while the content of the buffer has been cobbled together while assuming a different coding system. The only way I know (from browsing the documentation) to override the coding system for a buffer that does not yet have a file association is to set that variable directly, preferrably directly after the buffer is created. Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ SD adaptations for KORG EX-800 and Poly-800MkII V0.9: http://Synth.Stromeko.net/Downloads.html#KorgSDada