Hi Carsten, At Thu, 26 Nov 2009 08:42:09 +0100, Carsten Dominik wrote: > Hi David, > > you cannot reasonably expect that org-mode functions should work > in other modes. And you cannot expect these functions to check > the mode all the time. > > I don't know what you are up to here. But maybe the function > `org-run-as-in-org-mode' offers a way out?
I stumpled on this infinite loop by accident and simply avoid it by make my function refuse to work on a buffer not in org-mode. However, I decided it worth a bugreport as I didn't know the reason for this and assumed org-mode may enter this loop by itself if the right conditions are met. After debugging the loop it turns out that the loop occurs in `org-insert-property-drawer' because `org-keyword-time-regexp' is buffer local only (calculated when entering org-mode) and defaults to nil, so when `org-insert-property-drawer' tries to skip SCHEDULED, DEADLINE etc. lines it tries this by while-re-search-forwarding[1] with the regexp "^[ \t]*" -- that is what throws Emacs in this loop (for whatever reason -- I hope I am going to find out). So the question is: Is it in anyway possible that `org-keyword-time-regexp' is (re-set to) nil in regular orgmode operation? As far as I could see: No, so it should not effect the normal operations of org-mode. Regards, -- David [1] i.e.: (while (re-search-forward "^[ \t]*")) causes Emacs to loop. That means "not beeing in orgmode" not even a sine qua non for this loop. -- OpenPGP... 0x316F4BE4670716FD Jabber.... dmj...@jabber.org Email..... maus.da...@gmail.com ICQ....... 241051416 _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode