From mboxrd@z Thu Jan 1 00:00:00 1970 From: Charles Sebold Subject: PATCH: org-mobile.el, fix line encoding for checksums.dat Date: Thu, 12 Nov 2009 13:06:15 -0600 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0876920310==" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N8ezu-0006Kd-Dz for emacs-orgmode@gnu.org; Thu, 12 Nov 2009 14:06:22 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N8ezp-0006GS-Lu for emacs-orgmode@gnu.org; Thu, 12 Nov 2009 14:06:22 -0500 Received: from [199.232.76.173] (port=51819 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N8ezp-0006GM-HD for emacs-orgmode@gnu.org; Thu, 12 Nov 2009 14:06:17 -0500 Received: from mail-fx0-f225.google.com ([209.85.220.225]:52415) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N8ezp-0007Im-1l for emacs-orgmode@gnu.org; Thu, 12 Nov 2009 14:06:17 -0500 Received: by fxm25 with SMTP id 25so2610862fxm.26 for ; Thu, 12 Nov 2009 11:06:16 -0800 (PST) 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: emacs-orgmode@gnu.org --===============0876920310== Content-Type: multipart/alternative; boundary=00032555a39ac97ee30478313c1c --00032555a39ac97ee30478313c1c Content-Type: text/plain; charset=ISO-8859-1 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 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 --00032555a39ac97ee30478313c1c Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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<= br> @@ -409,6 +409,7 @@ The table of checksums is written to the file mobile-ch= ecksums."
=A0=A0=A0=A0 (files org-mobile-checksum-files)
=A0=A0= =A0=A0 entry file sum)
=A0=A0=A0=A0 (with-temp-file sumfile
+=A0=A0= =A0=A0=A0 (set-buffer-file-coding-system 'undecided-unix nil)
=A0=A0=A0=A0=A0=A0 (while (setq entry (pop files))
=A0=A0=A0=A0 (setq fi= le (car entry) sum (cdr entry))
=A0=A0=A0=A0 (insert (format "%s=A0= %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.<= br>
On Thu, Nov 12, 2009 at 11:47 AM, Charles Se= bold <csebold@gma= il.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 Windo= ws, from then on every time I sync, I have to download and read in every si= ngle org file.=A0 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 f= orce it to reread the files that changed.

So, I'm wondering if i= t's not reading one of the files correctly: checksums.dat, or one of th= e agenda files.=A0 I don't know enough about the iPhone app source to f= igure that one out, but I could think of workarounds for org-mobile.el if i= t always needs to produce Unix-style files for pushing.
--
Charles Sebold
http://triablogue.blogspot.com/
http://merbc.invigorated.org/
Eg= o delendus sum



--
Charles Seboldhttp://triablogue.blogspot.co= m/
http://merbc.invigorate= d.org/
Ego delendus sum
--00032555a39ac97ee30478313c1c-- --===============0876920310== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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 --===============0876920310==--