* org-mobile-push error with no headings
@ 2010-06-09 22:53 Erik L. Arneson
2010-06-16 5:42 ` John Wiegley
0 siblings, 1 reply; 3+ messages in thread
From: Erik L. Arneson @ 2010-06-09 22:53 UTC (permalink / raw)
To: emacs-orgmode-mXXj517/zsQ
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 <dybbuk-qPb3x58jdZkAvxtiuMwx3w@public.gmane.org>
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: org-mobile-push error with no headings
2010-06-09 22:53 org-mobile-push error with no headings Erik L. Arneson
@ 2010-06-16 5:42 ` John Wiegley
2010-06-16 16:19 ` Erik L. Arneson
0 siblings, 1 reply; 3+ messages in thread
From: John Wiegley @ 2010-06-16 5:42 UTC (permalink / raw)
To: emacs-orgmode
Erik L. Arneson <dybbuk@...> writes:
> 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:
Hi Erik, I can't accept a patch whose purpose is to stub out a bug. This should
be flagged as an issue and examined properly.
Thanks, John
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: org-mobile-push error with no headings
2010-06-16 5:42 ` John Wiegley
@ 2010-06-16 16:19 ` Erik L. Arneson
0 siblings, 0 replies; 3+ messages in thread
From: Erik L. Arneson @ 2010-06-16 16:19 UTC (permalink / raw)
To: emacs-orgmode-mXXj517/zsQ
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
John Wiegley <johnw-NH40D2G0MJ/n7oBBQGLwdg@public.gmane.org> writes:
> Erik L. Arneson <dybbuk@...> writes:
>> 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:
>
> Hi Erik, I can't accept a patch whose purpose is to stub out a bug. This should
> be flagged as an issue and examined properly.
Understandable. It actually in retrospect didn't fix the error, and
instead ended up appending my entire agenda to the bottom of the file.
I'll keep working on it to see if I can track it down.
- --
Erik Arneson <dybbuk-qPb3x58jdZkAvxtiuMwx3w@public.gmane.org>
GPG Key ID: 1024D/62DA1D25
Office: +1.541.291.9776
Skype: callto://pymander
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (Darwin)
iEYEARECAAYFAkwY+XYACgkQ/hCCSGLaHSVV1QCfTQ09gD76nWhTBicSUV5Ar8x2
UQ8AnR/NS+5bBnLG8FpzYje4MtZ15H3i
=qIOb
-----END PGP SIGNATURE-----
_______________________________________________
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-06-16 16:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-09 22:53 org-mobile-push error with no headings Erik L. Arneson
2010-06-16 5:42 ` John Wiegley
2010-06-16 16:19 ` Erik L. Arneson
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).