From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: [bug] org-cycle changed behavior in orgstruct-mode Date: Tue, 11 Aug 2015 15:31:03 +0200 Message-ID: <87pp2u0x60.fsf@gmx.us> References: <87fv3q2lxs.fsf@gmx.us> <878u9ic8sv.fsf@nicolasgoaziou.fr> <87zj1y0zst.fsf@gmx.us> <874mk6c7sz.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40953) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZP9e2-0008GK-6V for emacs-orgmode@gnu.org; Tue, 11 Aug 2015 09:31:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZP9dz-00015v-0K for emacs-orgmode@gnu.org; Tue, 11 Aug 2015 09:31:10 -0400 Received: from mout.gmx.net ([212.227.17.21]:54197) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZP9dy-000145-Lu for emacs-orgmode@gnu.org; Tue, 11 Aug 2015 09:31:06 -0400 Received: from W530 ([91.64.37.213]) by mail.gmx.com (mrgmx103) with ESMTPSA (Nemesis) id 0Le69A-1Z1raG2V9Y-00pwvW for ; Tue, 11 Aug 2015 15:31:04 +0200 In-Reply-To: <874mk6c7sz.fsf@nicolasgoaziou.fr> (Nicolas Goaziou's message of "Tue, 11 Aug 2015 14:45:48 +0200") 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: emacs-orgmode@gnu.org Nicolas Goaziou writes: > Rasmus 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 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 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