From mboxrd@z Thu Jan 1 00:00:00 1970 From: Milan Zamazal Subject: [PATCH] Create visibility overlays properly Date: Mon, 31 Oct 2011 22:40:28 +0100 Message-ID: <87sjm8262b.fsf@blackbird.nest.zamazal.org> References: <87ipna7kjx.fsf@blackbird.nest.zamazal.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([140.186.70.92]:55510) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKzb3-0003sB-Em for emacs-orgmode@gnu.org; Mon, 31 Oct 2011 17:40:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RKzb1-0005eb-Nt for emacs-orgmode@gnu.org; Mon, 31 Oct 2011 17:40:45 -0400 Received: from lo.gmane.org ([80.91.229.12]:45083) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKzb1-0005eB-B1 for emacs-orgmode@gnu.org; Mon, 31 Oct 2011 17:40:43 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RKzay-0003Jm-4W for emacs-orgmode@gnu.org; Mon, 31 Oct 2011 22:40:40 +0100 Received: from ip51.strelice.net ([217.66.176.51]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 31 Oct 2011 22:40:40 +0100 Received: from pdm by ip51.strelice.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 31 Oct 2011 22:40:40 +0100 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 * org.el (org-set-outline-overlay-data): Use outline-flag-region to make a region invisible. This ensures all necessary actions, especially adding isearch-open-invisible property, are applied. --- lisp/org.el | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index a75f96e..c4196e8 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -6599,8 +6599,7 @@ DATA should have been made by `org-outline-overlay-data'." (widen) (show-all) (mapc (lambda (c) - (setq o (make-overlay (car c) (cdr c))) - (overlay-put o 'invisible 'outline)) + (outline-flag-region (car c) (cdr c) t)) data))))) ;;; Folding of blocks -- 1.7.2.5