From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Extracting agenda information: what encoding? Date: Mon, 12 Oct 2009 14:53:29 +0200 Message-ID: <69EF852F-1908-40E0-BE12-D9739A44EB01@gmail.com> References: <2a382c6e0910111322t3feed4edif40c3b7185775a5b@mail.gmail.com> <7F44A486-71D8-497B-9E09-1F07D05755BD@gmail.com> <2a382c6e0910120359l7da2eea3nd59cb3eec1353d77@mail.gmail.com> <848839FA-79FC-49D3-96D0-6DCC5FE52393@gmail.com> <2a382c6e0910120532p847b354x5ce0205d95763e4d@mail.gmail.com> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MxKPC-0000l0-To for emacs-orgmode@gnu.org; Mon, 12 Oct 2009 08:53:38 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MxKP8-0000jn-MP for emacs-orgmode@gnu.org; Mon, 12 Oct 2009 08:53:38 -0400 Received: from [199.232.76.173] (port=56119 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MxKP8-0000jh-Ju for emacs-orgmode@gnu.org; Mon, 12 Oct 2009 08:53:34 -0400 Received: from ey-out-1920.google.com ([74.125.78.148]:49227) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MxKP8-0007h8-2W for emacs-orgmode@gnu.org; Mon, 12 Oct 2009 08:53:34 -0400 Received: by ey-out-1920.google.com with SMTP id 3so7960161eyh.34 for ; Mon, 12 Oct 2009 05:53:33 -0700 (PDT) In-Reply-To: <2a382c6e0910120532p847b354x5ce0205d95763e4d@mail.gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Dave Milter Cc: emacs-orgmode@gnu.org Hi Dave, On Oct 12, 2009, at 2:32 PM, Dave Milter wrote: > On 10/12/09, Carsten Dominik wrote: >> >> On Oct 12, 2009, at 12:59 PM, Dave Milter wrote: >> >>> On 10/12/09, Carsten Dominik wrote: >>>> Hi DAve, >>>> >>>> I have little knowledge about coding systems myself. >>>> >>>> Could you please let me know, what if the value of `buffer-file- >>>> coding- >>>> system' in an agenda buffer, when you create the agenda by hand? >>>> >>> >>> I ran org-agenda in emacs, then press "a", and >>> chose in menu "Describe coding system", and got: >>> >>> Coding system for saving this buffer: >>> Not set locally, use the default. >>> Default coding system (for new files): >>> U -- utf-8-unix (alias: mule-utf-8-unix) >> >> Could you please do `C-h v buffer-file-coding-system RET' >> Just to be sure that we are talking about the same thing. >> > > buffer-file-coding-system is a variable defined in `C source code'. > Its value is utf-8-unix > >> Also, could you try to run with the following in .emacs, to see >> if the problem disappears? >> >> (eval-after-load "org-agenda" >> '(defun org-encode-for-stdout (s) s)) >> > > yes, this fix problem, > > may be you be so kind and explain magic? Before printing to STDOUT, I process text in this way (defun org-encode-for-stdout (string) (if (fboundp 'encode-coding-string) (encode-coding-string string buffer-file-coding-system) string)) This is done in the good intention that this is necessary to produce the text in the correct encoding. The code I sent you in my last mail just replaces this function with a dummy no-operation function, to skip this encoding step. Apparently, at least in your case, this does more harm than good, and frankly, I am not sure it ever does anything good. Maybe I implemented this because a mule-Emacs produced bad output in this way. I will change it to make the default behavior work for you, and then see if anyone comes back and complains... :-) So if you pull again from git, this should work without the snippet in .emacs. - Carsten