From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Infinite loop with org-log-done 'time? Date: Fri, 18 Jul 2014 09:50:30 +0200 Message-ID: <874myfksvt.fsf@nicolasgoaziou.fr> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45264) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X82vX-0008Cd-Tr for emacs-orgmode@gnu.org; Fri, 18 Jul 2014 03:50:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X82vP-00075t-Lp for emacs-orgmode@gnu.org; Fri, 18 Jul 2014 03:49:59 -0400 Received: from relay4-d.mail.gandi.net ([2001:4b98:c:538::196]:45485) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X82vP-00075g-Fl for emacs-orgmode@gnu.org; Fri, 18 Jul 2014 03:49:51 -0400 In-Reply-To: (Ethan's message of "Thu, 17 Jul 2014 14:48:31 -0400") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Ethan Cc: emacs-orgmode Hello, Ethan writes: > I'm running org-mode from git (version "8.3beta"), and recently I started > to get hangs in org files. First ensure you're using the latest Org revision. A lot of changes happened between "release_8.3beta" tag and HEAD. > The bug has been tricky to track down. I can reproduce it reliably in one > particular file by switching DONE to TODO on one particular heading. > Changing DONE to TODO on another nearby heading doesn't seem to cause the > problem. For this reason, I don't have a minimal example. > > It doesn't happen in org-mode in stock emacs. It also doesn't happen, even > with org-mode from git, if I disable my '(org-log-done 'time) > customization. I managed to get a backtrace using gdb (attached). I can > provide (off-list) the .org file that I used to induce the failure. If you can reproduce the problem with an up-to-date Org, I'm interested in the org file. You can also consider calling the function below first (defun ngz-scramble-contents () "Copy current buffer, preserving structure but not contents. The copy is done in \"*Scrambled text*\" buffer. The function assumes current major mode is `org-mode'." (interactive) (let ((tree (org-element-parse-buffer))) (org-element-map tree '(code comment comment-block example-block fixed-width keyword link node-property plain-text verbatim) (lambda (obj) (case (org-element-type obj) ((code comment comment-block example-block fixed-width keyword node-property verbatim) (let ((value (org-element-property :value obj))) (org-element-put-property obj :value (replace-regexp-in-string "[[:alnum:]]" "x" value)))) (link (unless (string= (org-element-property :type obj) "radio") (org-element-put-property obj :raw-link "http://orgmode.org"))) (plain-text (org-element-set-element obj (replace-regexp-in-string "[[:alnum:]]" "x" obj))))) nil nil nil t) (let ((buffer (get-buffer-create "*Scrambled text*"))) (with-current-buffer buffer (insert (org-element-interpret-data tree)) (goto-char (point-min))) (switch-to-buffer buffer)))) Regards, -- Nicolas Goaziou