emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <carsten.dominik@gmail.com>
To: Dave Milter <davemilter@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Extracting agenda information: what encoding?
Date: Mon, 12 Oct 2009 14:53:29 +0200	[thread overview]
Message-ID: <69EF852F-1908-40E0-BE12-D9739A44EB01@gmail.com> (raw)
In-Reply-To: <2a382c6e0910120532p847b354x5ce0205d95763e4d@mail.gmail.com>

Hi Dave,

On Oct 12, 2009, at 2:32 PM, Dave Milter wrote:

> On 10/12/09, Carsten Dominik <carsten.dominik@gmail.com> wrote:
>>
>> On Oct 12, 2009, at 12:59 PM, Dave Milter wrote:
>>
>>> On 10/12/09, Carsten Dominik <carsten.dominik@gmail.com> 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

      reply	other threads:[~2009-10-12 12:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-11 20:22 Extracting agenda information: what encoding? Dave Milter
2009-10-12  8:18 ` Carsten Dominik
2009-10-12 10:59   ` Dave Milter
2009-10-12 12:14     ` Carsten Dominik
2009-10-12 12:32       ` Dave Milter
2009-10-12 12:53         ` Carsten Dominik [this message]

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

  List information: https://www.orgmode.org/

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

  git send-email \
    --in-reply-to=69EF852F-1908-40E0-BE12-D9739A44EB01@gmail.com \
    --to=carsten.dominik@gmail.com \
    --cc=davemilter@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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).