From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: emacs-orgmode@gnu.org
Subject: Re: probable caching bug?
Date: Fri, 06 Dec 2013 08:59:40 +0700 [thread overview]
Message-ID: <874n6mbuyb.fsf@ericabrahamsen.net> (raw)
In-Reply-To: 87a9gfuwns.fsf@gmail.com
Nicolas Goaziou <n.goaziou@gmail.com> writes:
> Hello,
>
> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
>> While editing a plain list yesterday I noticed what I guess was a bug in
>> the caching mechanism.
>
> It looks like it, indeed.
>
>> The list item was wrapped to several lines, and I noticed that calling
>> C-e while on the last line gave me "wrong-type-argument
>> integer-or-marker-p nil". Trying to fill the item with M-q gave me
>> "user-error: An element cannot be parsed line 635".
>
> [...]
>
> Unfortunately, the source of the cache corruption may be totally
> unrelated to the action triggering the error. Thus, cache bugs are quite
> hard to reproduce. When hunting down one of them, I usually call the
> following function after each non-trivial buffer modification.
>
> (defun ngz-random-test (&optional n contextp)
> (save-excursion
> (dotimes (k (or n 100))
> (goto-char (1+ (random (point-max))))
> (let ((real-element (let (org-element-use-cache)
> (if contextp (org-element-context)
> (org-element-at-point)))))
> (or (equal real-element
> (if contextp (org-element-context) (org-element-at-point)))
> (message "`%s' at %d is corrupted."
> (org-element-type real-element)
> (org-element-property :begin real-element)))))))
>
> BTW, is your Org recent? I fixed a similar problem (i.e. cache
> corruption in lists) about two weeks ago in commit
> 4466af5c115b56377d7251e848860dc03212c583.
Yes, it's up to date -- after I sent this message I started wondering
if it had been a while since I updated, so I pulled and reloaded, and
not long after that saw the bug again.
I expect to see this again, so I can run the function above, but will
reporting the results be of any use to you? If I know which element is
corrupted, what should I be reporting back?
E
next prev parent reply other threads:[~2013-12-06 1:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-05 2:00 probable caching bug? Eric Abrahamsen
2013-12-05 15:47 ` Nicolas Goaziou
2013-12-06 1:59 ` Eric Abrahamsen [this message]
2013-12-06 15:30 ` Nicolas Goaziou
2013-12-07 1:58 ` Eric Abrahamsen
2013-12-07 9:19 ` Nicolas Goaziou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874n6mbuyb.fsf@ericabrahamsen.net \
--to=eric@ericabrahamsen.net \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).