emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Rasmus <rasmus@gmx.us>
To: emacs-orgmode@gnu.org
Subject: Re: [bug] org-cycle changed behavior in orgstruct-mode
Date: Tue, 11 Aug 2015 15:31:03 +0200	[thread overview]
Message-ID: <87pp2u0x60.fsf@gmx.us> (raw)
In-Reply-To: <874mk6c7sz.fsf@nicolasgoaziou.fr> (Nicolas Goaziou's message of "Tue, 11 Aug 2015 14:45:48 +0200")

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> Rasmus <rasmus@gmx.us> writes:
>
>> I tried to recompile with that line commented out but it doesn't make a
>> difference.  I also tried to remove that defun from orgstruct-setup, but
>> that also didn't make change anything.
>
> Hmm. Odd.
>>
>> If there is a way to get the buffer-string for what is actually displayed
>> in the window I could use git bisect to find the bad commit, but I don't
>> know if that is possible.
>
> See `org-copy-visible'.

Great.  The bad commit seems to be:

    commit 898cfbcac0560d1d742d939a62c5a8253fe9b66f
    Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
    Date:   Mon Aug 10 13:34:07 2015 +0200

        Implement faster `show-children' function

        * lisp/org.el (org-show-children): New function.
        (org-cycle-internal-local):
        (org-set-visibility-according-to-property):
        (org-content):
        (org-move-subtree-down):
        (orgstruct-setup):
        (org-show-set-visibility):
        * contrib/lisp/org-toc.el (org-toc-cycle-subtree):
        (org-toc-restore-config):
        * lisp/org-agenda.el (org-agenda-show-1):
        * lisp/org-feed.el (org-feed-update): Use new function.

        * etc/ORG-NEWS: Document new function.

        Suggested-by: Samuel Wales <samologist@gmail.com>
        <http://permalink.gmane.org/gmane.emacs.orgmode/99616>

I guess I will have to dissect it more to figure out what broke.

Here's my test.el

    (add-to-list 'load-path "~/src/code/org-mode/lisp")
    (require 'org)
    (let ((ol-rx ";;\\*+\\|\\`")
          (kill noninteractive))
      (with-temp-buffer
        (insert ";;* test
    ;;** subhead
    form1
    ")
        (set 'outline-regexp ol-rx)
        (set 'orgstruct-heading-prefix-regexp ol-rx)
        (orgstruct-mode)
        (org-global-cycle 3)
        (goto-char (point-min))
        (orgstruct-hijacker-org-cycle-4 nil)
        (let ((str (org-copy-visible (point-min) (point-max))))
          (if (string-match-p ";;\\* test\n+$" str)
              (progn (message "failed")
                     (and kill (kill-emacs 1)))
            (message "success")
            (and kill (kill-emacs 0)))
          str)))

And my test.sh

    #!/bin/sh
    emacs --batch --load test.el

Rasmus

-- 
Slowly unravels in a ball of yarn and the devil collects it

  reply	other threads:[~2015-08-11 13:31 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-11  9:50 [bug] org-cycle changed behavior in orgstruct-mode Rasmus
2015-08-11 12:24 ` Nicolas Goaziou
2015-08-11 12:34   ` Rasmus
2015-08-11 12:45     ` Nicolas Goaziou
2015-08-11 13:31       ` Rasmus [this message]
2015-08-14 15:53         ` Nicolas Goaziou
2015-08-16  9:10           ` Rasmus
2015-08-11 15:59     ` Nicolas Goaziou
2015-08-29 21:12       ` Rasmus
2015-08-30  7:13         ` Nicolas Goaziou
2015-08-30 18:22           ` Rasmus
2015-08-30 19:26             ` Nicolas Goaziou
2015-08-30 19:39               ` Rasmus
2015-08-30 19:56                 ` Nicolas Goaziou
2015-08-31  7:53                   ` Rasmus
2015-09-13 11:21                   ` Rasmus

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=87pp2u0x60.fsf@gmx.us \
    --to=rasmus@gmx.us \
    --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).