* Extracting agenda information: what encoding? @ 2009-10-11 20:22 Dave Milter 2009-10-12 8:18 ` Carsten Dominik 0 siblings, 1 reply; 6+ messages in thread From: Dave Milter @ 2009-10-11 20:22 UTC (permalink / raw) To: emacs-orgmode I try this from manual( http://orgmode.org/manual/Extracting-agenda-information.html#Extracting-agenda-information): emacs -batch -l ~/.emacs -eval '(org-batch-agenda "a")' and get some garbage on place of not English letters, encoding guessing software tell me that it is "Doubly-encoded to UTF-8 from ISO-8859-5", but I unable to recover text from it. I used Linux with utf-8 locale, I never faced with encoding problems in emacs (emacs 23), for example (message "some not English text") print right message to console if I call it using emacs -batch, so I have no guess, why org-mode convert my utf-8 text to some strange encoding, the same thing happened on another machine with emacs 22, utf-8 locale and completly empty ".emacs" (a couple of lines only). May I should set utf-8 somewhere in org-mode preferences? ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Extracting agenda information: what encoding? 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 0 siblings, 1 reply; 6+ messages in thread From: Carsten Dominik @ 2009-10-12 8:18 UTC (permalink / raw) To: Dave Milter; +Cc: emacs-orgmode 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? Thanks. - Carsten On Oct 11, 2009, at 10:22 PM, Dave Milter wrote: > I try this from manual( > http://orgmode.org/manual/Extracting-agenda-information.html#Extracting-agenda-information) > : > > emacs -batch -l ~/.emacs -eval '(org-batch-agenda "a")' > > and get some garbage on place of not English letters, > > encoding guessing software tell me that it is > "Doubly-encoded to UTF-8 from ISO-8859-5", but I unable to recover > text from it. > > I used Linux with utf-8 locale, I never faced with encoding problems > in emacs (emacs 23), for example > (message "some not English text") print right message to console > if I call it using emacs -batch, > > so I have no guess, why org-mode convert my utf-8 text to some strange > encoding, the same thing happened on another machine > with emacs 22, utf-8 locale and completly empty ".emacs" (a couple of > lines only). > > May I should set utf-8 somewhere in org-mode preferences? > > > _______________________________________________ > Emacs-orgmode mailing list > Remember: use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode - Carsten ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Extracting agenda information: what encoding? 2009-10-12 8:18 ` Carsten Dominik @ 2009-10-12 10:59 ` Dave Milter 2009-10-12 12:14 ` Carsten Dominik 0 siblings, 1 reply; 6+ messages in thread From: Dave Milter @ 2009-10-12 10:59 UTC (permalink / raw) To: Carsten Dominik; +Cc: emacs-orgmode 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) ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Extracting agenda information: what encoding? 2009-10-12 10:59 ` Dave Milter @ 2009-10-12 12:14 ` Carsten Dominik 2009-10-12 12:32 ` Dave Milter 0 siblings, 1 reply; 6+ messages in thread From: Carsten Dominik @ 2009-10-12 12:14 UTC (permalink / raw) To: Dave Milter; +Cc: emacs-orgmode 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. 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)) Thanks - Carsten ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Extracting agenda information: what encoding? 2009-10-12 12:14 ` Carsten Dominik @ 2009-10-12 12:32 ` Dave Milter 2009-10-12 12:53 ` Carsten Dominik 0 siblings, 1 reply; 6+ messages in thread From: Dave Milter @ 2009-10-12 12:32 UTC (permalink / raw) To: Carsten Dominik; +Cc: emacs-orgmode 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? ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Extracting agenda information: what encoding? 2009-10-12 12:32 ` Dave Milter @ 2009-10-12 12:53 ` Carsten Dominik 0 siblings, 0 replies; 6+ messages in thread From: Carsten Dominik @ 2009-10-12 12:53 UTC (permalink / raw) To: Dave Milter; +Cc: emacs-orgmode 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-10-12 12:53 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 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
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).