* Bug: org-mobile "Bad file encoding" [6.33trans]
@ 2009-11-22 20:20 Ben Alexander
[not found] ` <12BAC43B-2E3B-4297-B1A5-6C7FCBA408F5@ncogni.to>
0 siblings, 1 reply; 4+ messages in thread
From: Ben Alexander @ 2009-11-22 20:20 UTC (permalink / raw)
To: org-mode Mailinglist
Thanks for org-mode and MobileOrg! I'm very grateful for all the
helpful hints I've seen on the mailing list too.
I an have a small problem with MobileOrg. After doing an
org-mobile-push and syncing the results to the iPod touch, the
agendas.org file doesn't appear on the iPod. Instead, it appears as if
the only heading is "Bad file encoding" and the body text is "Unable to
detect file encoding, please re-save this file using the proper
encoding.
At first I thought it was because I've got things like the
pounds-sterling, t-with-a-comma, a-with-breve, and i-with-circumflex
characters in my text (some of which contains Romanian, hence the
especially odd t-with-a-comma). But I'm pretty sure I've expunged those
characters from my files, and anyway, the agendas.org file should only
contain the characters that my original org files contain.
So, I'm happy enough to use the proper encoding, but I don't know what
that is, and I don't save the adgendas.org file myself: org-mobile-push
must do that on my behalf.
If it is relevant, I am using a 5dollarhosting.com website for my webdav
server, not my local machine, so I don't have complete control over the
webserver configuration.
I'm stumped as to what I should try next. Any pointers will be
appreciated,
Ben Alexander
==============
Emacs : GNU Emacs 22.3.1 (i386-apple-darwin9.7.0, Carbon Version 1.6.0)
of 2009-06-07 on scarlett.local - Aquamacs Distribution 1.8c
Package: Org-mode version 6.33trans
current state:
==============
(setq
org-remember-default-headline "Remember Tasks"
org-todo-keyword-faces '(("PROJECT" :foreground "blue" :weight bold))
org-special-ctrl-a/e t
org-agenda-custom-commands '(("b" "Buy" tags #("+TODO=\"BUY\"" 0 11
(face org-warning)) nil) ("A" "Angella related questions" tags
#("angella" 0 7 (face org-warning)) nil)
("u" "unscheduled" todo #("TODO|DEFER"
0 10 (face org-warning))
((org-agenda-skip-function (lambda nil
(org-agenda-skip-entry-if (quote scheduled) (quote deadline) (quote
regexp) "<[^>\n]+>")))
(org-agenda-overriding-header
"Unscheduled TODO entries: ") (org-agenda-sorting-strategy (quote
(todo-state-up))))
)
)
org-agenda-files '("/Users/ben/Reference/GTD/Reference.org" "/Users/
ben/Reference/GTD/birthdays.org" "/Users/ben/Reference/GTD/craiova.org"
"/Users/ben/Reference/GTD/diary.org" "/Users/ben/
Reference/GTD/filetabs.org" "/Users/ben/Reference/GTD/projects.org")
org-agenda-include-diary t
org-agenda-window-setup 'current-window
org-hide-leading-stars t
org-completion-use-ido t
org-metaup-hook '(org-babel-load-in-session-maybe)
org-agenda-skip-timestamp-if-done t
org-after-todo-state-change-hook '(org-clock-out-if-current)
org-agenda-todo-ignore-scheduled t
org-odd-levels-only t
org-log-state-notes-insert-after-drawers t
org-special-ctrl-k t
org-agenda-sorting-strategy '((agenda time-up tag-up) (todo category-
keep priority-down) (tags category-keep priority-down) (search
category-keep))
org-deadline-warning-days 7
org-stuck-projects '("/PROJECT" ("TODO" "BUY") nil "")
org-export-preprocess-hook '(org-export-blocks-preprocess)
org-mobile-inbox-for-pull "~/Reference/GTD/from-mobile.org"
org-tab-first-hook '(org-babel-hide-result-toggle-maybe org-hide-
block-toggle-maybe)
org-src-mode-hook '(org-src-mode-configure-edit-buffer)
org-cycle-global-at-bob t
org-confirm-shell-link-function 'yes-or-no-p
org-todo-keywords '((sequence "TODO(t)" "WAITING(w)" "DONE(d!)")
(type "PROJECT(p)" "CLOSED(c!)") (sequence "BUY(b)" "BOUGHT(B!)"))
org-agenda-before-write-hook '(org-agenda-add-entry-text)
org-default-notes-file "~/Reference/GTD/projects.org"
org-directory "~/Reference/GTD/"
org-tag-alist '((:startgroup) (#("ben" 0 3 (face nil)) . 98)
(#("angella" 0 7 (face nil)) . 97) (#("vendor" 0 6 (face nil)) . 118)
(:endgroup) (:startgroup)
(#("us" 0 2 (face nil)) . 117) (#("london" 0 6 (face
nil)) . 108) (#("romania" 0 7 (face nil)) . 114) (:endgroup)
(:startgroup)
(#("@home" 0 5 (face org-todo)) . 104) (#("@phone" 0
6 (face nil)) . 112) (#("@out" 0 4 (face nil)) . 111) (#("@computer" 0
9 (face nil)) . 99) (:endgroup))
org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-
drawers org-cycle-show-empty-lines org-optimize-window-after-
visibility-change)
org-publish-project-alist '((alexanderonline :base-directory "~/
alexanderonline.org" :publishing-directory "~/
alexanderonline.html" :table-of-contents nil))
org-mode-hook '((lambda nil (setq org-mouse-context-menu-function
(quote org-mouse-context-menu))
(when (memq (quote context-menu) org-mouse-
features) (define-key org-mouse-map (if (featurep (quote xemacs))
[button3] [mouse-3]) nil)
(define-key org-mode-map [mouse-3] (quote org-
mouse-show-context-menu)))
(define-key org-mode-map [down-mouse-1] (quote org-
mouse-down-mouse))
(when (memq (quote context-menu) org-mouse-
features) (define-key org-mouse-map [C-drag-mouse-1] (quote org-mouse-
move-tree))
(define-key org-mouse-map [C-down-mouse-1] (quote
org-mouse-move-tree-start)))
(when (memq (quote yank-link) org-mouse-features)
(define-key org-mode-map [S-mouse-2] (quote org-mouse-yank-link))
(define-key org-mode-map [drag-mouse-3] (quote org-
mouse-yank-link)))
(when (memq (quote move-tree) org-mouse-features)
(define-key org-mouse-map [drag-mouse-3] (quote org-mouse-move-tree))
(define-key org-mouse-map [down-mouse-3] (quote
org-mouse-move-tree-start)))
(when (memq (quote activate-stars) org-mouse-
features)
(font-lock-add-keywords nil (\` (((\, outline-
regexp) 0 (\` (face org-link mouse-face highlight keymap (\, org-mouse-
map))) (quote prepend)))) t))
(when (memq (quote activate-bullets) org-mouse-
features)
(font-lock-add-keywords nil
(\` (("^[ ]*\\([-+*]\\|[0-9]+[.)]\\) +" (1 (\`
(face org-link keymap (\, org-mouse-map) mouse-face highlight)) (quote
prepend))))) t)
)
(when (memq (quote activate-checkboxes) org-mouse-
features)
(font-lock-add-keywords nil
(\` (("^[ ]*\\([-+*]\\|[0-9]+[.)]\\) +\\(\\[[ X]\
\]\\)" (2 (\` (face bold keymap (\, org-mouse-map) mouse-face
highlight)) t)))) t)
)
(defadvice org-open-at-point (around org-mouse-open-
at-point activate)
(let ((context (org-context)))
(cond ((assq :headline-stars context) (org-
cycle)) ((assq :checkbox context) (org-toggle-checkbox))
((assq :item-bullet context) (let ((org-cycle-
include-plain-lists t)) (org-cycle))) (t ad-do-it))
)
)
)
(lambda nil (org-add-hook (quote change-major-mode-
hook) (quote org-babel-show-result-all) (quote append) (quote local)))
org-babel-result-hide-spec
org-babel-hide-all-hashes #[nil
"\300\301\302\303\304$\207" [org-add-hook change-major-mode-hook org-
show-block-all append local] 5])
org-agenda-ndays 1
org-refile-targets '((org-agenda-files :todo . "PROJECT")
(nil :maxlevel . 2))
org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point org-babel-execute-
src-block-maybe)
org-confirm-elisp-link-function 'yes-or-no-p
org-refile-use-outline-path t
org-agenda-mode-hook '((lambda nil (setq org-mouse-context-menu-
function (quote org-mouse-agenda-context-menu))
(define-key org-agenda-mode-map (if
(featurep (quote xemacs)) [button3] [mouse-3]) (quote org-mouse-show-
context-menu))
(define-key org-agenda-mode-map [down-
mouse-3] (quote org-mouse-move-tree-start))
(define-key org-agenda-mode-map (if
(featurep (quote xemacs)) [(control mouse-4)] [C-mouse-4]) (quote org-
agenda-earlier))
(define-key org-agenda-mode-map (if
(featurep (quote xemacs)) [(control mouse-5)] [C-mouse-5]) (quote org-
agenda-later))
(define-key org-agenda-mode-map [drag-mouse-3]
(quote (lambda (event) (interactive "e")
(case (org-mouse-get-gesture event) (:left (org-agenda-earlier 1))
(:right (org-agenda-later 1))))))
)
)
org-agenda-start-on-weekday nil
org-agenda-todo-ignore-with-date t
org-agenda-skip-deadline-if-done t
org-reverse-note-order t
org-occur-hook '(org-first-headline-recenter)
org-from-is-user-regexp "\\<Ben Alexander\\>"
org-mobile-directory "/Volumes/alexanderonline.org"
org-drawers '("PROPERTIES" "CLOCK" "DETAILS" "AGENDA")
org-export-with-section-numbers nil
org-tags-column -75
org-modules '(org-bbdb org-bibtex org-gnus org-id org-info org-
jsinfo org-irc org-mac-message org-mhe org-rmail org-vm org-wl org-
mouse org-annotate-file
org-annotation-helper org-bookmark org-depend org-
elisp-symbol org-eval org-expiry org-interactive-query org-mairix org-
man org-panel org-registry)
org-remember-templates '(("Todo today" 116 "*** TODO %?\n
SCHEDULED: %t\n" nil nil nil)
("Buy" 98 "*** BUY
%? :@out:
\n" nil "Shopping List" nil)
("Phone" 112 "*** TODO Call
%? :@phone:
\n" nil nil nil)
("Do deferred" 100 "*** PROJECT
%? :@out
:" nil nil (org-mode org-agenda-mode)))
org-metadown-hook '(org-babel-pop-to-session-maybe)
)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Bug: org-mobile "Bad file encoding" [6.33trans]
[not found] ` <0F00222B-8B42-4B37-BA25-9C739F0A75C7@ncogni.to>
@ 2009-11-23 18:53 ` Ben Alexander
2009-11-26 10:27 ` Ben Alexander
0 siblings, 1 reply; 4+ messages in thread
From: Ben Alexander @ 2009-11-23 18:53 UTC (permalink / raw)
To: org-mode Mailinglist
I added the following lines (to my ~/.emacs file), as suggested by
Richard and they work immediately.
For what it's worth, I am running on Mac OS X 10.5.8 on an Intel
MacBook, and I've had it for a few years and tweaked any number of
little things. This may be a 'default' problem, but it might also be
just because I've copied old customization buffers forward from other
machines.
Thanks, Richard, for the tip, and thanks to all the rest of you for
the org-mode community.
-Ben
On 2009-Nov-23, at 02:37, Richard Moreland wrote:
> Hi Ben,
>
> I'm replying off-list because I'm not sure this is the answer, but:
>
> (prefer-coding-system 'utf-8)
> (set-default-coding-systems 'utf-8)
> (set-terminal-coding-system 'utf-8)
> (set-keyboard-coding-system 'utf-8)
> (setq default-buffer-file-coding-system 'utf-8)
>
> Between that mess of options, it seems that you be able to have your
> files default to UTF-8 (which is the encoding MobileOrg is looking
> for).
>
> If this works for you, would please let the list know so the
> solution is archived? I'll also update the website with the
> appropriate details.
>
> Thanks!
> Richard
>
> On Nov 22, 2009, at 3:20 PM, Ben Alexander wrote:
>
>>
>> Thanks for org-mode and MobileOrg! I'm very grateful for all the
>> helpful hints I've seen on the mailing list too.
>>
>> I an have a small problem with MobileOrg. After doing an
>> org-mobile-push and syncing the results to the iPod touch, the
>> agendas.org file doesn't appear on the iPod. Instead, it appears
>> as if
>> the only heading is "Bad file encoding" and the body text is
>> "Unable to
>> detect file encoding, please re-save this file using the proper
>> encoding.
>>
>> At first I thought it was because I've got things like the
>> pounds-sterling, t-with-a-comma, a-with-breve, and i-with-circumflex
>> characters in my text (some of which contains Romanian, hence the
>> especially odd t-with-a-comma). But I'm pretty sure I've expunged
>> those
>> characters from my files, and anyway, the agendas.org file should
>> only
>> contain the characters that my original org files contain.
>>
>> So, I'm happy enough to use the proper encoding, but I don't know
>> what
>> that is, and I don't save the adgendas.org file myself: org-mobile-
>> push
>> must do that on my behalf.
>>
>> If it is relevant, I am using a 5dollarhosting.com website for my
>> webdav
>> server, not my local machine, so I don't have complete control over
>> the
>> webserver configuration.
>>
>> I'm stumped as to what I should try next. Any pointers will be
>> appreciated,
>>
>> Ben Alexander
>>
>> ==============
>>
>> Emacs : GNU Emacs 22.3.1 (i386-apple-darwin9.7.0, Carbon Version
>> 1.6.0)
>> of 2009-06-07 on scarlett.local - Aquamacs Distribution 1.8c
>> Package: Org-mode version 6.33trans
>>
>> current state:
>> ==============
>> (setq
>> org-remember-default-headline "Remember Tasks"
>> org-todo-keyword-faces '(("PROJECT" :foreground "blue" :weight bold))
>> org-special-ctrl-a/e t
>> org-agenda-custom-commands '(("b" "Buy" tags #("+TODO=\"BUY\"" 0 11
>> (face org-warning)) nil) ("A" "Angella related questions" tags
>> #("angella" 0 7 (face org-warning)) nil)
>> ("u" "unscheduled" todo #("TODO|DEFER" 0
>> 10 (face org-warning))
>> ((org-agenda-skip-function (lambda nil
>> (org-agenda-skip-entry-if (quote scheduled) (quote deadline) (quote
>> regexp) "<[^>\n]+>")))
>> (org-agenda-overriding-header
>> "Unscheduled TODO entries: ") (org-agenda-sorting-strategy (quote
>> (todo-state-up))))
>> )
>> )
>> org-agenda-files '("/Users/ben/Reference/GTD/Reference.org" "/Users/
>> ben/Reference/GTD/birthdays.org" "/Users/ben/Reference/GTD/
>> craiova.org"
>> "/Users/ben/Reference/GTD/diary.org" "/Users/ben/
>> Reference/GTD/filetabs.org" "/Users/ben/Reference/GTD/projects.org")
>> org-agenda-include-diary t
>> org-agenda-window-setup 'current-window
>> org-hide-leading-stars t
>> org-completion-use-ido t
>> org-metaup-hook '(org-babel-load-in-session-maybe)
>> org-agenda-skip-timestamp-if-done t
>> org-after-todo-state-change-hook '(org-clock-out-if-current)
>> org-agenda-todo-ignore-scheduled t
>> org-odd-levels-only t
>> org-log-state-notes-insert-after-drawers t
>> org-special-ctrl-k t
>> org-agenda-sorting-strategy '((agenda time-up tag-up) (todo
>> category-keep priority-down) (tags category-keep priority-down)
>> (search category-keep))
>> org-deadline-warning-days 7
>> org-stuck-projects '("/PROJECT" ("TODO" "BUY") nil "")
>> org-export-preprocess-hook '(org-export-blocks-preprocess)
>> org-mobile-inbox-for-pull "~/Reference/GTD/from-mobile.org"
>> org-tab-first-hook '(org-babel-hide-result-toggle-maybe org-hide-
>> block-toggle-maybe)
>> org-src-mode-hook '(org-src-mode-configure-edit-buffer)
>> org-cycle-global-at-bob t
>> org-confirm-shell-link-function 'yes-or-no-p
>> org-todo-keywords '((sequence "TODO(t)" "WAITING(w)" "DONE(d!)")
>> (type "PROJECT(p)" "CLOSED(c!)") (sequence "BUY(b)" "BOUGHT(B!)"))
>> org-agenda-before-write-hook '(org-agenda-add-entry-text)
>> org-default-notes-file "~/Reference/GTD/projects.org"
>> org-directory "~/Reference/GTD/"
>> org-tag-alist '((:startgroup) (#("ben" 0 3 (face nil)) . 98)
>> (#("angella" 0 7 (face nil)) . 97) (#("vendor" 0 6 (face nil)) .
>> 118) (:endgroup) (:startgroup)
>> (#("us" 0 2 (face nil)) . 117) (#("london" 0 6 (face
>> nil)) . 108) (#("romania" 0 7 (face nil)) . 114) (:endgroup)
>> (:startgroup)
>> (#("@home" 0 5 (face org-todo)) . 104) (#("@phone" 0 6
>> (face nil)) . 112) (#("@out" 0 4 (face nil)) . 111) (#("@computer"
>> 0 9 (face nil)) . 99) (:endgroup))
>> org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-
>> drawers org-cycle-show-empty-lines org-optimize-window-after-
>> visibility-change)
>> org-publish-project-alist '((alexanderonline :base-directory "~/
>> alexanderonline.org" :publishing-directory "~/
>> alexanderonline.html" :table-of-contents nil))
>> org-mode-hook '((lambda nil (setq org-mouse-context-menu-function
>> (quote org-mouse-context-menu))
>> (when (memq (quote context-menu) org-mouse-features)
>> (define-key org-mouse-map (if (featurep (quote xemacs)) [button3]
>> [mouse-3]) nil)
>> (define-key org-mode-map [mouse-3] (quote org-mouse-
>> show-context-menu)))
>> (define-key org-mode-map [down-mouse-1] (quote org-
>> mouse-down-mouse))
>> (when (memq (quote context-menu) org-mouse-features)
>> (define-key org-mouse-map [C-drag-mouse-1] (quote org-mouse-move-
>> tree))
>> (define-key org-mouse-map [C-down-mouse-1] (quote
>> org-mouse-move-tree-start)))
>> (when (memq (quote yank-link) org-mouse-features)
>> (define-key org-mode-map [S-mouse-2] (quote org-mouse-yank-link))
>> (define-key org-mode-map [drag-mouse-3] (quote org-
>> mouse-yank-link)))
>> (when (memq (quote move-tree) org-mouse-features)
>> (define-key org-mouse-map [drag-mouse-3] (quote org-mouse-move-tree))
>> (define-key org-mouse-map [down-mouse-3] (quote org-
>> mouse-move-tree-start)))
>> (when (memq (quote activate-stars) org-mouse-features)
>> (font-lock-add-keywords nil (\` (((\, outline-
>> regexp) 0 (\` (face org-link mouse-face highlight keymap (\, org-
>> mouse-map))) (quote prepend)))) t))
>> (when (memq (quote activate-bullets) org-mouse-
>> features)
>> (font-lock-add-keywords nil
>> (\` (("^[ ]*\\([-+*]\\|[0-9]+[.)]\\) +" (1 (\`
>> (face org-link keymap (\, org-mouse-map) mouse-face highlight))
>> (quote prepend))))) t)
>> )
>> (when (memq (quote activate-checkboxes) org-mouse-
>> features)
>> (font-lock-add-keywords nil
>> (\` (("^[ ]*\\([-+*]\\|[0-9]+[.)]\\) +\\(\\[[ X]\\]
>> \\)" (2 (\` (face bold keymap (\, org-mouse-map) mouse-face
>> highlight)) t)))) t)
>> )
>> (defadvice org-open-at-point (around org-mouse-open-
>> at-point activate)
>> (let ((context (org-context)))
>> (cond ((assq :headline-stars context) (org-cycle))
>> ((assq :checkbox context) (org-toggle-checkbox))
>> ((assq :item-bullet context) (let ((org-cycle-
>> include-plain-lists t)) (org-cycle))) (t ad-do-it))
>> )
>> )
>> )
>> (lambda nil (org-add-hook (quote change-major-mode-
>> hook) (quote org-babel-show-result-all) (quote append) (quote
>> local))) org-babel-result-hide-spec
>> org-babel-hide-all-hashes #[nil "\300\301\302\303\304$
>> \207" [org-add-hook change-major-mode-hook org-show-block-all
>> append local] 5])
>> org-agenda-ndays 1
>> org-refile-targets '((org-agenda-files :todo . "PROJECT")
>> (nil :maxlevel . 2))
>> org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point org-babel-execute-
>> src-block-maybe)
>> org-confirm-elisp-link-function 'yes-or-no-p
>> org-refile-use-outline-path t
>> org-agenda-mode-hook '((lambda nil (setq org-mouse-context-menu-
>> function (quote org-mouse-agenda-context-menu))
>> (define-key org-agenda-mode-map (if (featurep
>> (quote xemacs)) [button3] [mouse-3]) (quote org-mouse-show-context-
>> menu))
>> (define-key org-agenda-mode-map [down-mouse-3]
>> (quote org-mouse-move-tree-start))
>> (define-key org-agenda-mode-map (if (featurep
>> (quote xemacs)) [(control mouse-4)] [C-mouse-4]) (quote org-agenda-
>> earlier))
>> (define-key org-agenda-mode-map (if (featurep
>> (quote xemacs)) [(control mouse-5)] [C-mouse-5]) (quote org-agenda-
>> later))
>> (define-key org-agenda-mode-map [drag-mouse-3]
>> (quote (lambda (event) (interactive "e")
>> (case (org-mouse-get-gesture event) (:left (org-agenda-earlier 1))
>> (:right (org-agenda-later 1))))))
>> )
>> )
>> org-agenda-start-on-weekday nil
>> org-agenda-todo-ignore-with-date t
>> org-agenda-skip-deadline-if-done t
>> org-reverse-note-order t
>> org-occur-hook '(org-first-headline-recenter)
>> org-from-is-user-regexp "\\<Ben Alexander\\>"
>> org-mobile-directory "/Volumes/alexanderonline.org"
>> org-drawers '("PROPERTIES" "CLOCK" "DETAILS" "AGENDA")
>> org-export-with-section-numbers nil
>> org-tags-column -75
>> org-modules '(org-bbdb org-bibtex org-gnus org-id org-info org-
>> jsinfo org-irc org-mac-message org-mhe org-rmail org-vm org-wl org-
>> mouse org-annotate-file
>> org-annotation-helper org-bookmark org-depend org-elisp-
>> symbol org-eval org-expiry org-interactive-query org-mairix org-man
>> org-panel org-registry)
>> org-remember-templates '(("Todo today" 116 "*** TODO %?\n
>> SCHEDULED: %t\n" nil nil nil)
>> ("Buy" 98 "*** BUY
>> %? :@out:
>> \n" nil "Shopping List" nil)
>> ("Phone" 112 "*** TODO Call
>> %? :@phone
>> :\n" nil nil nil)
>> ("Do deferred" 100 "*** PROJECT
>> %? :@out
>> :" nil nil (org-mode org-agenda-mode)))
>> org-metadown-hook '(org-babel-pop-to-session-maybe)
>> )
>>
>>
>>
>> _______________________________________________
>> Emacs-orgmode mailing list
>> Please use `Reply All' to send replies to the list.
>> Emacs-orgmode@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Bug: org-mobile "Bad file encoding" [6.33trans]
2009-11-23 18:53 ` Ben Alexander
@ 2009-11-26 10:27 ` Ben Alexander
2009-11-27 8:01 ` Eric S Fraga
0 siblings, 1 reply; 4+ messages in thread
From: Ben Alexander @ 2009-11-26 10:27 UTC (permalink / raw)
To: Ben Alexander; +Cc: org-mode Mailinglist
Well, the problem came back :-(
I tried to go to the agendas.org file on my WebDAV server and save it
in utf-8 manually (using the command M-x set-buffer-file-encoding
utf-8) but because the checksums.dat don't change, the iPod doesn't
reload the newly saved file. So I deleted checksums.dat and then it
copied all the files and the agendas.org file showed up properly.
Then I tried one more time, making a small change on my laptop and
trying to save the agendas.org file manually *before* doing a sync on
the iPod, and now I can't make it work. The agendas.org file is the
only file that won't display at all, giving the "Bad file encoding"
message instead of the file text. Yet on the WebDAV share, from my
laptop, I can cat the file, no problem.
I have now removed the only non-ascii character from my org file that
is picked up by the agenda (the letter ă, lowercase-a-with-breve-
accent). And so now there is no 'bad-encoding'.
Clearly there is some emacs magic going on here, because I thought of
trying the £ symbol, but in another, smaller, file, and when I tried
to save the file, I was told:
These default coding systems were tried to encode text
in the buffer `birthdays.org':
iso-8859-2-unix
However, each of them encountered characters it couldn't encode:
iso-8859-2-unix cannot encode these: £
I thought the earlier emacs code specified utf-8 as the default coding
system
Strangely (to me) the a-with-breve did not have an issue in the
default coding system.
I once had a problem with my original org files, but now I can't
recreate that problem either.
Sorry to bring bad news.
On 2009-Nov-23, at 20:53, Ben Alexander wrote:
>
> I added the following lines (to my ~/.emacs file), as suggested by
> Richard and they work immediately.
>
> For what it's worth, I am running on Mac OS X 10.5.8 on an Intel
> MacBook, and I've had it for a few years and tweaked any number of
> little things. This may be a 'default' problem, but it might also
> be just because I've copied old customization buffers forward from
> other machines.
>
> Thanks, Richard, for the tip, and thanks to all the rest of you for
> the org-mode community.
>
> -Ben
>
> On 2009-Nov-23, at 02:37, Richard Moreland wrote:
>
>> Hi Ben,
>>
>> I'm replying off-list because I'm not sure this is the answer, but:
>>
>> (prefer-coding-system 'utf-8)
>> (set-default-coding-systems 'utf-8)
>> (set-terminal-coding-system 'utf-8)
>> (set-keyboard-coding-system 'utf-8)
>> (setq default-buffer-file-coding-system 'utf-8)
>>
>> Between that mess of options, it seems that you be able to have
>> your files default to UTF-8 (which is the encoding MobileOrg is
>> looking for).
>>
>> If this works for you, would please let the list know so the
>> solution is archived? I'll also update the website with the
>> appropriate details.
>>
>> Thanks!
>> Richard
>>
>> On Nov 22, 2009, at 3:20 PM, Ben Alexander wrote:
>>
>>>
>>> Thanks for org-mode and MobileOrg! I'm very grateful for all the
>>> helpful hints I've seen on the mailing list too.
>>>
>>> I an have a small problem with MobileOrg. After doing an
>>> org-mobile-push and syncing the results to the iPod touch, the
>>> agendas.org file doesn't appear on the iPod. Instead, it appears
>>> as if
>>> the only heading is "Bad file encoding" and the body text is
>>> "Unable to
>>> detect file encoding, please re-save this file using the proper
>>> encoding.
>>>
>>> At first I thought it was because I've got things like the
>>> pounds-sterling, t-with-a-comma, a-with-breve, and i-with-circumflex
>>> characters in my text (some of which contains Romanian, hence the
>>> especially odd t-with-a-comma). But I'm pretty sure I've expunged
>>> those
>>> characters from my files, and anyway, the agendas.org file should
>>> only
>>> contain the characters that my original org files contain.
>>>
>>> So, I'm happy enough to use the proper encoding, but I don't know
>>> what
>>> that is, and I don't save the adgendas.org file myself: org-mobile-
>>> push
>>> must do that on my behalf.
>>>
>>> If it is relevant, I am using a 5dollarhosting.com website for my
>>> webdav
>>> server, not my local machine, so I don't have complete control
>>> over the
>>> webserver configuration.
>>>
>>> I'm stumped as to what I should try next. Any pointers will be
>>> appreciated,
>>>
>>> Ben Alexander
>>>
>>> ==============
>>>
>>> Emacs : GNU Emacs 22.3.1 (i386-apple-darwin9.7.0, Carbon Version
>>> 1.6.0)
>>> of 2009-06-07 on scarlett.local - Aquamacs Distribution 1.8c
>>> Package: Org-mode version 6.33trans
>>>
>>> current state:
>>> ==============
>>> (setq
>>> org-remember-default-headline "Remember Tasks"
>>> org-todo-keyword-faces '(("PROJECT" :foreground "blue" :weight
>>> bold))
>>> org-special-ctrl-a/e t
>>> org-agenda-custom-commands '(("b" "Buy" tags #("+TODO=\"BUY\"" 0
>>> 11 (face org-warning)) nil) ("A" "Angella related questions" tags
>>> #("angella" 0 7 (face org-warning)) nil)
>>> ("u" "unscheduled" todo #("TODO|DEFER" 0
>>> 10 (face org-warning))
>>> ((org-agenda-skip-function (lambda nil
>>> (org-agenda-skip-entry-if (quote scheduled) (quote deadline)
>>> (quote regexp) "<[^>\n]+>")))
>>> (org-agenda-overriding-header
>>> "Unscheduled TODO entries: ") (org-agenda-sorting-strategy (quote
>>> (todo-state-up))))
>>> )
>>> )
>>> org-agenda-files '("/Users/ben/Reference/GTD/Reference.org" "/
>>> Users/ben/Reference/GTD/birthdays.org" "/Users/ben/Reference/GTD/
>>> craiova.org"
>>> "/Users/ben/Reference/GTD/diary.org" "/Users/ben/
>>> Reference/GTD/filetabs.org" "/Users/ben/Reference/GTD/projects.org")
>>> org-agenda-include-diary t
>>> org-agenda-window-setup 'current-window
>>> org-hide-leading-stars t
>>> org-completion-use-ido t
>>> org-metaup-hook '(org-babel-load-in-session-maybe)
>>> org-agenda-skip-timestamp-if-done t
>>> org-after-todo-state-change-hook '(org-clock-out-if-current)
>>> org-agenda-todo-ignore-scheduled t
>>> org-odd-levels-only t
>>> org-log-state-notes-insert-after-drawers t
>>> org-special-ctrl-k t
>>> org-agenda-sorting-strategy '((agenda time-up tag-up) (todo
>>> category-keep priority-down) (tags category-keep priority-down)
>>> (search category-keep))
>>> org-deadline-warning-days 7
>>> org-stuck-projects '("/PROJECT" ("TODO" "BUY") nil "")
>>> org-export-preprocess-hook '(org-export-blocks-preprocess)
>>> org-mobile-inbox-for-pull "~/Reference/GTD/from-mobile.org"
>>> org-tab-first-hook '(org-babel-hide-result-toggle-maybe org-hide-
>>> block-toggle-maybe)
>>> org-src-mode-hook '(org-src-mode-configure-edit-buffer)
>>> org-cycle-global-at-bob t
>>> org-confirm-shell-link-function 'yes-or-no-p
>>> org-todo-keywords '((sequence "TODO(t)" "WAITING(w)" "DONE(d!)")
>>> (type "PROJECT(p)" "CLOSED(c!)") (sequence "BUY(b)" "BOUGHT(B!)"))
>>> org-agenda-before-write-hook '(org-agenda-add-entry-text)
>>> org-default-notes-file "~/Reference/GTD/projects.org"
>>> org-directory "~/Reference/GTD/"
>>> org-tag-alist '((:startgroup) (#("ben" 0 3 (face nil)) . 98)
>>> (#("angella" 0 7 (face nil)) . 97) (#("vendor" 0 6 (face nil)) .
>>> 118) (:endgroup) (:startgroup)
>>> (#("us" 0 2 (face nil)) . 117) (#("london" 0 6 (face
>>> nil)) . 108) (#("romania" 0 7 (face nil)) . 114) (:endgroup)
>>> (:startgroup)
>>> (#("@home" 0 5 (face org-todo)) . 104) (#("@phone" 0 6
>>> (face nil)) . 112) (#("@out" 0 4 (face nil)) . 111) (#("@computer"
>>> 0 9 (face nil)) . 99) (:endgroup))
>>> org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-
>>> drawers org-cycle-show-empty-lines org-optimize-window-after-
>>> visibility-change)
>>> org-publish-project-alist '((alexanderonline :base-directory "~/
>>> alexanderonline.org" :publishing-directory "~/
>>> alexanderonline.html" :table-of-contents nil))
>>> org-mode-hook '((lambda nil (setq org-mouse-context-menu-function
>>> (quote org-mouse-context-menu))
>>> (when (memq (quote context-menu) org-mouse-features)
>>> (define-key org-mouse-map (if (featurep (quote xemacs)) [button3]
>>> [mouse-3]) nil)
>>> (define-key org-mode-map [mouse-3] (quote org-mouse-
>>> show-context-menu)))
>>> (define-key org-mode-map [down-mouse-1] (quote org-
>>> mouse-down-mouse))
>>> (when (memq (quote context-menu) org-mouse-features)
>>> (define-key org-mouse-map [C-drag-mouse-1] (quote org-mouse-move-
>>> tree))
>>> (define-key org-mouse-map [C-down-mouse-1] (quote
>>> org-mouse-move-tree-start)))
>>> (when (memq (quote yank-link) org-mouse-features)
>>> (define-key org-mode-map [S-mouse-2] (quote org-mouse-yank-link))
>>> (define-key org-mode-map [drag-mouse-3] (quote org-
>>> mouse-yank-link)))
>>> (when (memq (quote move-tree) org-mouse-features)
>>> (define-key org-mouse-map [drag-mouse-3] (quote org-mouse-move-
>>> tree))
>>> (define-key org-mouse-map [down-mouse-3] (quote org-
>>> mouse-move-tree-start)))
>>> (when (memq (quote activate-stars) org-mouse-features)
>>> (font-lock-add-keywords nil (\` (((\, outline-
>>> regexp) 0 (\` (face org-link mouse-face highlight keymap (\, org-
>>> mouse-map))) (quote prepend)))) t))
>>> (when (memq (quote activate-bullets) org-mouse-
>>> features)
>>> (font-lock-add-keywords nil
>>> (\` (("^[ ]*\\([-+*]\\|[0-9]+[.)]\\) +" (1 (\`
>>> (face org-link keymap (\, org-mouse-map) mouse-face highlight))
>>> (quote prepend))))) t)
>>> )
>>> (when (memq (quote activate-checkboxes) org-mouse-
>>> features)
>>> (font-lock-add-keywords nil
>>> (\` (("^[ ]*\\([-+*]\\|[0-9]+[.)]\\) +\\(\\[[ X]\\]
>>> \\)" (2 (\` (face bold keymap (\, org-mouse-map) mouse-face
>>> highlight)) t)))) t)
>>> )
>>> (defadvice org-open-at-point (around org-mouse-open-
>>> at-point activate)
>>> (let ((context (org-context)))
>>> (cond ((assq :headline-stars context) (org-cycle))
>>> ((assq :checkbox context) (org-toggle-checkbox))
>>> ((assq :item-bullet context) (let ((org-cycle-
>>> include-plain-lists t)) (org-cycle))) (t ad-do-it))
>>> )
>>> )
>>> )
>>> (lambda nil (org-add-hook (quote change-major-mode-
>>> hook) (quote org-babel-show-result-all) (quote append) (quote
>>> local))) org-babel-result-hide-spec
>>> org-babel-hide-all-hashes #[nil "\300\301\302\303\304$
>>> \207" [org-add-hook change-major-mode-hook org-show-block-all
>>> append local] 5])
>>> org-agenda-ndays 1
>>> org-refile-targets '((org-agenda-files :todo . "PROJECT")
>>> (nil :maxlevel . 2))
>>> org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point org-babel-execute-
>>> src-block-maybe)
>>> org-confirm-elisp-link-function 'yes-or-no-p
>>> org-refile-use-outline-path t
>>> org-agenda-mode-hook '((lambda nil (setq org-mouse-context-menu-
>>> function (quote org-mouse-agenda-context-menu))
>>> (define-key org-agenda-mode-map (if (featurep
>>> (quote xemacs)) [button3] [mouse-3]) (quote org-mouse-show-context-
>>> menu))
>>> (define-key org-agenda-mode-map [down-mouse-3]
>>> (quote org-mouse-move-tree-start))
>>> (define-key org-agenda-mode-map (if (featurep
>>> (quote xemacs)) [(control mouse-4)] [C-mouse-4]) (quote org-agenda-
>>> earlier))
>>> (define-key org-agenda-mode-map (if (featurep
>>> (quote xemacs)) [(control mouse-5)] [C-mouse-5]) (quote org-agenda-
>>> later))
>>> (define-key org-agenda-mode-map [drag-mouse-3]
>>> (quote (lambda (event) (interactive "e")
>>> (case (org-mouse-get-gesture event) (:left (org-agenda-earlier 1))
>>> (:right (org-agenda-later 1))))))
>>> )
>>> )
>>> org-agenda-start-on-weekday nil
>>> org-agenda-todo-ignore-with-date t
>>> org-agenda-skip-deadline-if-done t
>>> org-reverse-note-order t
>>> org-occur-hook '(org-first-headline-recenter)
>>> org-from-is-user-regexp "\\<Ben Alexander\\>"
>>> org-mobile-directory "/Volumes/alexanderonline.org"
>>> org-drawers '("PROPERTIES" "CLOCK" "DETAILS" "AGENDA")
>>> org-export-with-section-numbers nil
>>> org-tags-column -75
>>> org-modules '(org-bbdb org-bibtex org-gnus org-id org-info org-
>>> jsinfo org-irc org-mac-message org-mhe org-rmail org-vm org-wl org-
>>> mouse org-annotate-file
>>> org-annotation-helper org-bookmark org-depend org-elisp-
>>> symbol org-eval org-expiry org-interactive-query org-mairix org-
>>> man org-panel org-registry)
>>> org-remember-templates '(("Todo today" 116 "*** TODO %?\n
>>> SCHEDULED: %t\n" nil nil nil)
>>> ("Buy" 98 "*** BUY
>>> %? :@out
>>> :\n" nil "Shopping List" nil)
>>> ("Phone" 112 "*** TODO Call
>>> %? :@phone
>>> :\n" nil nil nil)
>>> ("Do deferred" 100 "*** PROJECT
>>> %? :@out
>>> :" nil nil (org-mode org-agenda-mode)))
>>> org-metadown-hook '(org-babel-pop-to-session-maybe)
>>> )
>>>
>>>
>>>
>>> _______________________________________________
>>> Emacs-orgmode mailing list
>>> Please use `Reply All' to send replies to the list.
>>> Emacs-orgmode@gnu.org
>>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>>
>
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Bug: org-mobile "Bad file encoding" [6.33trans]
2009-11-26 10:27 ` Ben Alexander
@ 2009-11-27 8:01 ` Eric S Fraga
0 siblings, 0 replies; 4+ messages in thread
From: Eric S Fraga @ 2009-11-27 8:01 UTC (permalink / raw)
To: Ben Alexander; +Cc: org-mode Mailinglist, Ben Alexander
At Thu, 26 Nov 2009 12:27:06 +0200,
Ben Alexander wrote:
>
> Well, the problem came back :-(
Sorry to hear that. Annoying.
> Clearly there is some emacs magic going on here, because I thought of
> trying the £ symbol, but in another, smaller, file, and when I tried
> to save the file, I was told:
> These default coding systems were tried to encode text
> in the buffer `birthdays.org':
> iso-8859-2-unix
> However, each of them encountered characters it couldn't encode:
> iso-8859-2-unix cannot encode these: £
The £ symbol is available in 8859-1 but not -2 unfortunately.
> I thought the earlier emacs code specified utf-8 as the default coding
> system
I find the whole coding system in Emacs beyond comprehension, having
been fighting it for a long time now. With respect to org, although
not necessarily for mobile org, I have solved all my problems by
putting the following line as the first line of every single org file
I have:
# -*- coding: utf-8; -*-
(not indented) All my problems have disappeared even though this is
not a recommended solution, from what I understand.
HTH.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-11-27 8:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-22 20:20 Bug: org-mobile "Bad file encoding" [6.33trans] Ben Alexander
[not found] ` <12BAC43B-2E3B-4297-B1A5-6C7FCBA408F5@ncogni.to>
[not found] ` <8F8BA972-5177-4A16-B8A4-0CFBD7B6EAC7@alexanderonline.org>
[not found] ` <0F00222B-8B42-4B37-BA25-9C739F0A75C7@ncogni.to>
2009-11-23 18:53 ` Ben Alexander
2009-11-26 10:27 ` Ben Alexander
2009-11-27 8:01 ` Eric S Fraga
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).