From mboxrd@z Thu Jan 1 00:00:00 1970 From: dybbuk-qPb3x58jdZkAvxtiuMwx3w@public.gmane.org (Erik L. Arneson) Subject: org-mobile-push error with no headings Date: Wed, 09 Jun 2010 15:53:58 -0700 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: 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-mXXj517/zsQ@public.gmane.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org Howdy all, I just upgraded to org-mode 6.36c, and for some reason `org-mobile-push' started throwing an error when it got to a file with no headings in it. The error was in `org-back-to-heading'. This little one-line patch fixes it, though I'm not certain it's the right thing to do at all: diff --git a/lisp/org.el b/lisp/org.el index c041db1..81f9866 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -10851,7 +10851,7 @@ Returns the new TODO keyword, or nil if no state change should occur." (defun org-get-todo-state () (save-excursion - (org-back-to-heading t) + (ignore-errors (org-back-to-heading t)) (and (looking-at org-todo-line-regexp) (match-end 2) (match-string 2)))) -- Erik Arneson GPG Key ID: 1024D/62DA1D25 Office: +1.541.291.9776 Skype: pymander _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode-mXXj517/zsQ@public.gmane.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode