From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [bug] canonical context not work in 8.3 Date: Sat, 08 Aug 2015 11:19:46 +0200 Message-ID: <87mvy2b0i5.fsf@nicolasgoaziou.fr> References: <87mvy4eywo.fsf@nicolasgoaziou.fr> <8737zvfpvc.fsf@nicolasgoaziou.fr> <87y4hmb3vb.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44302) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZO0Gg-00018q-Ss for emacs-orgmode@gnu.org; Sat, 08 Aug 2015 05:18:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZO0Gd-0008V3-Ko for emacs-orgmode@gnu.org; Sat, 08 Aug 2015 05:18:18 -0400 Received: from relay2-d.mail.gandi.net ([217.70.183.194]:48431) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZO0Gd-0008Sv-Eg for emacs-orgmode@gnu.org; Sat, 08 Aug 2015 05:18:15 -0400 In-Reply-To: <87y4hmb3vb.fsf@nicolasgoaziou.fr> (Nicolas Goaziou's message of "Sat, 08 Aug 2015 10:07:04 +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: Samuel Wales Cc: emacs-orgmode Correcting myself, > I think it is as good as it can get. You probably have an awful lot of > children to display. This one may improve the situation: (defun show-children (&optional level) (save-excursion (org-back-to-heading t) (let* ((current-level (funcall outline-level)) (level (if level (+ (prefix-numeric-value level) current-level) (save-excursion (outline-next-heading) (if (eobp) current-level (funcall outline-level))))) (re (format "^\\*\\{%d,%d\\} +" current-level level)) (end (save-excursion (org-end-of-subtree t t)))) (while (re-search-forward re end t) (outline-flag-region (line-end-position 0) (line-end-position) nil))))) Would you mind testing it? Regards,