From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ethan Subject: Re: Infinite loop with org-log-done 'time? Date: Wed, 23 Jul 2014 13:03:56 -0400 Message-ID: References: <874myfksvt.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a1133fd6692853904fedf54e9 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38592) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X9zxn-0002Vs-Be for emacs-orgmode@gnu.org; Wed, 23 Jul 2014 13:04:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X9zxi-0000jz-8K for emacs-orgmode@gnu.org; Wed, 23 Jul 2014 13:04:23 -0400 Received: from mail-vc0-x234.google.com ([2607:f8b0:400c:c03::234]:50580) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X9zxi-0000jv-1l for emacs-orgmode@gnu.org; Wed, 23 Jul 2014 13:04:18 -0400 Received: by mail-vc0-f180.google.com with SMTP id ij19so2651246vcb.25 for ; Wed, 23 Jul 2014 10:04:17 -0700 (PDT) In-Reply-To: <874myfksvt.fsf@nicolasgoaziou.fr> 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 , emacs-orgmode --001a1133fd6692853904fedf54e9 Content-Type: text/plain; charset=UTF-8 Sorry for the late reply. Thanks for the advice Nicolas. Today I tried to reproduce it with the same file and couldn't. However, I have hit the bug (whatever it is) without org-log-done 'time, so I guess that was a red herring. I'll keep an eye on it. Ethan On Fri, Jul 18, 2014 at 3:50 AM, Nicolas Goaziou wrote: > 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 > --001a1133fd6692853904fedf54e9 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Sorry for the late reply. Thanks for the advice Nicolas. T= oday I tried to reproduce it with the same file and couldn't. However, = I have hit the bug (whatever it is) without org-log-done 'time, so I gu= ess that was a red herring. I'll keep an eye on it.

Ethan



On Fri, Jul 18, 2014 at 3:50 AM, Nicolas Goaziou <mail@nico= lasgoaziou.fr> wrote:
Hello,

Ethan <ethan.glasser.cam= p@gmail.com> writes:

> I'm running org-mode from git (version "8.3beta"), and r= ecently I started
> to get hangs in org files.

First ensure you're using the latest Org revision. A lot of chang= es
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 ca= use 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)<= br> > customization. I managed to get a backtrace using gdb (attached). I ca= n
> 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 inte= rested
in the org file. You can also consider calling the function below first

=C2=A0 (defun ngz-scramble-contents ()
=C2=A0 =C2=A0 "Copy current buffer, preserving structure but not conte= nts.
=C2=A0 The copy is done in \"*Scrambled text*\" buffer. =C2=A0The= function
=C2=A0 assumes current major mode is `org-mode'."
=C2=A0 =C2=A0 (interactive)
=C2=A0 =C2=A0 (let ((tree (org-element-parse-buffer)))
=C2=A0 =C2=A0 =C2=A0 (org-element-map tree '(code comment comment-block= example-block fixed-width
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0keyword link node-prope= rty plain-text verbatim)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (lambda (obj)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (case (org-element-type obj)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ((code comment comment-block exam= ple-block fixed-width keyword
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0node-p= roperty verbatim)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(let ((value (org-element-p= roperty :value obj)))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(org-element-put-pro= perty
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 obj :value (replace= -regexp-in-string "[[:alnum:]]" "x" value))))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (link
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(unless (string=3D (org-ele= ment-property :type obj) "radio")
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(org-element-put-pro= perty obj :raw-link "= http://orgmode.org")))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (plain-text
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(org-element-set-element =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 obj (replace-regexp-in-str= ing "[[:alnum:]]" "x" obj)))))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 nil nil nil t)
=C2=A0 =C2=A0 =C2=A0 (let ((buffer (get-buffer-create "*Scrambled text= *")))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (with-current-buffer buffer
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (insert (org-element-interpret-data tree= ))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (goto-char (point-min)))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (switch-to-buffer buffer))))


Regards,

--
Nicolas Goaziou

--001a1133fd6692853904fedf54e9--