Browse Source

Keep compiler happy and fix issue with musing the mobile agenda

Richard Moreland writes:

> (setq org-agenda-custom-commands
>      '(("X" agenda "" nil ("agenda.html"))))
> ;; This seems to break org-mobile-push?
> ;;(setq org-agenda-exporter-settings
> ;;      '((org-agenda-add-entry-text-maxlines 5)
> ;;       (htmlize-output-type 'font)))
>
> I have the lines above in my .emacs file.  When I uncomment the 3
> commented lines, org-mobile-push just hangs after OVERVIEW.
>
> I don't understand exactly what is going on, but if I hit C-g or
> C-c enough I can regain control, but the sync never finishes.
Carsten Dominik 15 years ago
parent
commit
2fa2cbaa2c
3 changed files with 10 additions and 4 deletions
  1. 5 0
      lisp/ChangeLog
  2. 2 1
      lisp/org-agenda.el
  3. 3 3
      lisp/org-clock.el

+ 5 - 0
lisp/ChangeLog

@@ -1,3 +1,8 @@
+2009-10-26  Carsten Dominik  <carsten.dominik@gmail.com>
+
+	* org-agenda.el (org-agenda-add-entry-text): Never add entry text
+	while pushing the mobile agenda.
+
 2009-10-25  John Wiegley  <jwiegley@gmail.com>
 
 	* org-clock.el

+ 2 - 1
lisp/org-agenda.el

@@ -2376,7 +2376,8 @@ VALUE defaults to t."
 This will add a maximum of `org-agenda-add-entry-text-maxlines' lines of the
 entry text following headings shown in the agenda.
 Drawers will be excluded, also the line with scheduling/deadline info."
-  (when (> org-agenda-add-entry-text-maxlines 0)
+  (when (and (> org-agenda-add-entry-text-maxlines 0)
+	     (not (org-bound-and-true-p org-mobile-creating-agendas)))
     (let (m txt)
       (goto-char (point-min))
       (while (not (eobp))

+ 3 - 3
lisp/org-clock.el

@@ -1827,6 +1827,9 @@ This function is made for clock tables."
 			tot))))
 	0))))
 
+(defvar org-clock-loaded nil
+  "Was the clock file loaded?")
+
 (defun org-clock-save ()
   "Persist various clock-related data to disk.
 The details of what will be saved are regulated by the variable
@@ -1875,9 +1878,6 @@ The details of what will be saved are regulated by the variable
 	  (save-buffer)
 	  (kill-buffer (current-buffer)))))))
 
-(defvar org-clock-loaded nil
-  "Was the clock file loaded?")
-
 (defun org-clock-load ()
   "Load clock-related data from disk, maybe resuming a stored clock."
   (when (and org-clock-persist (not org-clock-loaded))