emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* PATCH: org-mobile.el, fix line encoding for checksums.dat
@ 2009-11-12 19:06 Charles Sebold
  2009-11-12 23:51 ` Carsten Dominik
  0 siblings, 1 reply; 2+ messages in thread
From: Charles Sebold @ 2009-11-12 19:06 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 1793 bytes --]

After discussing the problem briefly with Richard, I have a suggested patch
for org-mobile.el.

This will force checksums.dat to always be Unix line encoding.

--- a/lisp/org-mobile.el
+++ b/lisp/org-mobile.el
@@ -409,6 +409,7 @@ The table of checksums is written to the file
mobile-checksums."
     (files org-mobile-checksum-files)
     entry file sum)
     (with-temp-file sumfile
+      (set-buffer-file-coding-system 'undecided-unix nil)
       (while (setq entry (pop files))
     (setq file (car entry) sum (cdr entry))
     (insert (format "%s  %s\n" sum file))))))

He said he may update MobileOrg to handle other linefeed encodings, but for
the meantime this seems to work for me.

On Thu, Nov 12, 2009 at 11:47 AM, Charles Sebold <csebold@gmail.com> wrote:

> I wonder, does MobileOrg always expect Unix-style line feeds?
>
> I ask because it seems to me as if, when I push from Emacs on Windows, from
> then on every time I sync, I have to download and read in every single org
> file.  I have 20-30 org files and a couple of them are over 200K so this
> takes a while.
>
> If I take the same org files and push them from Linux, I have to reread
> everything once, and then every sync from Linux after that only seems to
> force it to reread the files that changed.
>
> So, I'm wondering if it's not reading one of the files correctly:
> checksums.dat, or one of the agenda files.  I don't know enough about the
> iPhone app source to figure that one out, but I could think of workarounds
> for org-mobile.el if it always needs to produce Unix-style files for
> pushing.
> --
> Charles Sebold
> http://triablogue.blogspot.com/
> http://merbc.invigorated.org/
> Ego delendus sum
>



-- 
Charles Sebold
http://triablogue.blogspot.com/
http://merbc.invigorated.org/
Ego delendus sum

[-- Attachment #1.2: Type: text/html, Size: 2427 bytes --]

[-- Attachment #2: Type: text/plain, Size: 204 bytes --]

_______________________________________________
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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: PATCH: org-mobile.el, fix line encoding for checksums.dat
  2009-11-12 19:06 PATCH: org-mobile.el, fix line encoding for checksums.dat Charles Sebold
@ 2009-11-12 23:51 ` Carsten Dominik
  0 siblings, 0 replies; 2+ messages in thread
From: Carsten Dominik @ 2009-11-12 23:51 UTC (permalink / raw)
  To: Charles Sebold; +Cc: emacs-orgmode

Applied, thanks.

- Carsten

On Nov 12, 2009, at 8:06 PM, Charles Sebold wrote:

> After discussing the problem briefly with Richard, I have a  
> suggested patch for org-mobile.el.
>
> This will force checksums.dat to always be Unix line encoding.
>
> --- a/lisp/org-mobile.el
> +++ b/lisp/org-mobile.el
> @@ -409,6 +409,7 @@ The table of checksums is written to the file  
> mobile-checksums."
>      (files org-mobile-checksum-files)
>      entry file sum)
>      (with-temp-file sumfile
> +      (set-buffer-file-coding-system 'undecided-unix nil)
>        (while (setq entry (pop files))
>      (setq file (car entry) sum (cdr entry))
>      (insert (format "%s  %s\n" sum file))))))
>
> He said he may update MobileOrg to handle other linefeed encodings,  
> but for the meantime this seems to work for me.
>
> On Thu, Nov 12, 2009 at 11:47 AM, Charles Sebold <csebold@gmail.com>  
> wrote:
> I wonder, does MobileOrg always expect Unix-style line feeds?
>
> I ask because it seems to me as if, when I push from Emacs on  
> Windows, from then on every time I sync, I have to download and read  
> in every single org file.  I have 20-30 org files and a couple of  
> them are over 200K so this takes a while.
>
> If I take the same org files and push them from Linux, I have to  
> reread everything once, and then every sync from Linux after that  
> only seems to force it to reread the files that changed.
>
> So, I'm wondering if it's not reading one of the files correctly:  
> checksums.dat, or one of the agenda files.  I don't know enough  
> about the iPhone app source to figure that one out, but I could  
> think of workarounds for org-mobile.el if it always needs to produce  
> Unix-style files for pushing.
> -- 
> Charles Sebold
> http://triablogue.blogspot.com/
> http://merbc.invigorated.org/
> Ego delendus sum
>
>
>
> -- 
> Charles Sebold
> http://triablogue.blogspot.com/
> http://merbc.invigorated.org/
> Ego delendus sum
> _______________________________________________
> 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] 2+ messages in thread

end of thread, other threads:[~2009-11-12 23:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-12 19:06 PATCH: org-mobile.el, fix line encoding for checksums.dat Charles Sebold
2009-11-12 23:51 ` 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).