emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <n.goaziou@gmail.com>
To: Bastien <bzg@gnu.org>
Cc: emacs-orgmode@gnu.org
Subject: Re: Bug when cycling
Date: Thu, 28 Nov 2013 12:02:21 +0100	[thread overview]
Message-ID: <87li08u6v6.fsf@gmail.com> (raw)
In-Reply-To: <871u20n6lv.fsf@bzg.ath.cx> (Bastien's message of "Thu, 28 Nov 2013 11:49:48 +0100")

Bastien <bzg@gnu.org> writes:

> PS: This is a rather crude fix, don't hesitate to proofread the
> patch just in case.  Thanks!

Actually, I'm rather surprised this problem happens (I wasn't able to
reproduce it FWIW).

In `org-cycle-hide-drawers, END is, at the bare minimum, the next
headline. The error happens with the last line

  (goto-char (org-element-property :end drawer))

Though, according to Org syntax, a drawer cannot go past a headline (IOW
it cannot contain the headline). Therefore, there's no reason for
(org-element-property :end drawer) to be greater than END.

This patch may fix something, but I tend to think that the problem is
elsewhere. Either the parser is wrong (but then, I would have been able
to reproduce the bug), or there's a cache error.

Assuming you remove your fix for a while, do you have a reproducible
recipe from a fresh Org buffer available? Also, does it happen with
`org-element-use-cache' set to nil?


Regards,

-- 
Nicolas Goaziou

  reply	other threads:[~2013-11-28 11:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-26 23:24 Bug when cycling Bastien
2013-11-28  5:29 ` Bastien
2013-11-28 10:47   ` Nicolas Goaziou
2013-11-28 10:49     ` Bastien
2013-11-28 11:02       ` Nicolas Goaziou [this message]
2013-11-28 11:15         ` Bastien
2013-11-28 11:17         ` Nicolas Goaziou
2013-11-28 11:30           ` Bastien

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=87li08u6v6.fsf@gmail.com \
    --to=n.goaziou@gmail.com \
    --cc=bzg@gnu.org \
    --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).