From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Rankin Subject: Re: Backward incompatible outline-invisible-p change in emacs master for Org Date: Thu, 15 Jun 2017 06:28:09 +1000 Message-ID: <1497472089.767910.1009650952.07E5CDA4@webmail.messagingengine.com> References: <87a85i2nji.fsf@nicolasgoaziou.fr> <87mv9ay02y.fsf@bzg.fr> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33650) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dLEtm-0007YP-Qd for emacs-orgmode@gnu.org; Wed, 14 Jun 2017 16:28:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dLEtl-0004re-Ny for emacs-orgmode@gnu.org; Wed, 14 Jun 2017 16:28:18 -0400 In-Reply-To: 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" To: Kaushal Modi Cc: Bastien Guerry , emacs-org list , Nicolas Goaziou On Thu, 15 Jun 2017, at 03:18 AM, Kaushal Modi wrote: > On Wed, Jun 14, 2017 at 1:02 PM Bastien Guerry wrote: > > > The question is: why this patch in the first place? Paul authored it > > and I committed it, so I should know--but I don't. Maybe Paul know or > > you know better? > > > > I later found the reason for that commit here: > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=24073 > > Here is the emacs -Q recipe that Paul posted on that debbugs report: > > 1. emacs -Q > 2. insert ";;; heading" > 3. M-: (outline-on-heading-p) > => t > 4. C-a > 5. M-: (put-text-property (point) (1+ (point)) 'invisible 'foo) > 6. M-; (outline-on-heading-p) > => nil > > Expected results: > > (outline-on-heading-p) > => t > > Actual results: > > (outline-on-heading-p) > => nil > > This shows the relation between outline-on-heading-p and > outline-invisible-p: > > (defun outline-on-heading-p (&optional invisible-ok) > "Return t if point is on a (visible) heading line. > If INVISIBLE-OK is non-nil, an invisible heading line is ok too." > (save-excursion > (beginning-of-line) > (and (bolp) (or invisible-ok (not (outline-invisible-p))) > (looking-at outline-regexp)))) > > Basically the expectation is that a outline heading be not marked as > "invisible" by any 'foo invisible property. Outline headings should be > marked invisible by only 'outline invisible property. > > Also as the function is prefixed with "outline-", that kind of makes sense. > > On the other hand, in org, we need a function that returns non-nil for > *any* invisible property. So that commit breaks org's expectation. > > This looks fine, > > > Thanks. > > > > but I'd rather revert the faulty Emacs commit if > > it is not necessary. > > > > Until Paul enlighten us, I'll have a deeper look. > > > > After reviewing debbugs 24073, the commit looks correct for emacs master > and outline package. WDYT? Glad the mystery looks like it's solved. Btw I looped in the orgmode list back here http://lists.gnu.org/archive/html/emacs-orgmode/2016-09/msg00029.html Thanks. -- www.paulwrankin.com