From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: npostavs@users.sourceforge.net Newsgroups: gmane.emacs.bugs Subject: bug#24073: 24.5; outline-on-heading-p sees any invisible text property as outline invisible Date: Mon, 01 Aug 2016 10:16:05 -0400 Message-ID: <87fuqoa82i.fsf@users.sourceforge.net> References: <1469520753.418402.676896009.00AAC0DE@webmail.messagingengine.com> <1469679952.1866840.678960241.470C9887@webmail.messagingengine.com> <1470044267.1052174.682381049.26455152@webmail.messagingengine.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1470061061 13438 80.91.229.8 (1 Aug 2016 14:17:41 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 1 Aug 2016 14:17:41 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.93 (gnu/linux) Cc: 24073@debbugs.gnu.org To: Paul Rankin Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Aug 01 16:17:26 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bUE20-00031p-H0 for geb-bug-gnu-emacs@m.gmane.org; Mon, 01 Aug 2016 16:17:24 +0200 Original-Received: from localhost ([::1]:50618 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bUE1w-0002Hr-K7 for geb-bug-gnu-emacs@m.gmane.org; Mon, 01 Aug 2016 10:17:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53621) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bUE1j-0002E3-52 for bug-gnu-emacs@gnu.org; Mon, 01 Aug 2016 10:17:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bUE1d-0001PO-VF for bug-gnu-emacs@gnu.org; Mon, 01 Aug 2016 10:17:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:55755) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bUE1d-0001PK-RK for bug-gnu-emacs@gnu.org; Mon, 01 Aug 2016 10:17:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bUE1d-0006EA-NB for bug-gnu-emacs@gnu.org; Mon, 01 Aug 2016 10:17:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 01 Aug 2016 14:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24073 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 24073-submit@debbugs.gnu.org id=B24073.147006097823872 (code B ref 24073); Mon, 01 Aug 2016 14:17:01 +0000 Original-Received: (at 24073) by debbugs.gnu.org; 1 Aug 2016 14:16:18 +0000 Original-Received: from localhost ([127.0.0.1]:53052 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bUE0w-0006Cy-Ej for submit@debbugs.gnu.org; Mon, 01 Aug 2016 10:16:18 -0400 Original-Received: from mail-it0-f50.google.com ([209.85.214.50]:34575) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bUE0v-0006Ch-E1 for 24073@debbugs.gnu.org; Mon, 01 Aug 2016 10:16:17 -0400 Original-Received: by mail-it0-f50.google.com with SMTP id j8so38537926itb.1 for <24073@debbugs.gnu.org>; Mon, 01 Aug 2016 07:16:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=RXp8WpjjKY1zHdPrnZpimqPsiMm8VNZ/v10TyzMu7fo=; b=CkLuOFHCGmhrmjWcctMjZ7HuH9ayySXab/bmY8Cc1r2ljy8Z/IqabBsKx/dFaBez13 wy2ooZb9+6QmEmg43dmsT+znoq/oOwD+BuKo7xWHm7ICL8rem3w9kFvRTnx25Fa3eraP QZ4Cxo6M6H4RRCBD62NTfopzbgWLwzdNAsL3M2n+ZkewimqiuGXLi+8cTZCGvDvu4i+R M5vxAmZQY1+PYf+eIAY4evsYn6VpFkDKQEBP+yfpkAG6bGvoWlX3FRs1fQBMqtqlwewi va+uqzZ+OdZSuWvVrHuY0SLVA4HWvwz0yzmSf1CTy4112VthA04etEmnQ4LvcPQ5Fykq jQ+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=RXp8WpjjKY1zHdPrnZpimqPsiMm8VNZ/v10TyzMu7fo=; b=me3/Sd47WsPB4zUdj1oY7Ce5j1krStRbOrP92uXuOSd4xIPxVAn2vDsw519SgYPIHD 2g3pHpD1nlDOWYw87xy1uGylR8OhhIHiku3CakFga5d3IyKZ1DHE8ghSjQ9ooVLvR8r0 rLe2tSMkBjVadlgoQCm8RnYzYBj33Z6UZ50tmD7Y22jsHNrv1jLzIZsnwuwn89/Szo+Q y9jz0Y0GpVrziSa5vetLRa5GyYhnKrC5/b4YLKFqpwBmaCTPGEHTsP21ndBdKl3bhkQV +DMCkCL/JL8Yt9zvalEC6pobsNW+RFIea+l4TR72ZHfXvdyu3iQPP2Dn4tPrgvpa10C0 TnVg== X-Gm-Message-State: AEkoouvjRBUDQnWMwxHInzoR/WWl2GJKBWsXrKe5qg13K4Qqio5S27/s66LNKF4k+WHc1w== X-Received: by 10.36.69.36 with SMTP id y36mr13549411ita.72.1470060971643; Mon, 01 Aug 2016 07:16:11 -0700 (PDT) Original-Received: from zony (206-188-64-44.cpe.distributel.net. [206.188.64.44]) by smtp.googlemail.com with ESMTPSA id o15sm10861376ith.2.2016.08.01.07.16.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Aug 2016 07:16:11 -0700 (PDT) In-Reply-To: <1470044267.1052174.682381049.26455152@webmail.messagingengine.com> (Paul Rankin's message of "Mon, 01 Aug 2016 19:37:47 +1000") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:121756 Archived-At: Paul Rankin writes: > Noam Postavsky on Thu, 28 Jul 2016 22:07 -0400: >> I think it's because outline-invisible-p is a defsubst, so when >> compiled, callers don't actually reference the symbol >> `outline-invisible-p' at all. > > Ah yes. Thanks. A predicate function that doesn't return a t or nil > and misuses defsubst! I don't think it's necessarily a misuse of defsubst, that just happens to be one of the limitations. > > Is there any way for a package to work around this with outline in its present state? Well, as you saw, re`eval'uating outline-on-heading-p (so that it becomes uncompiled) seems to work, you could try doing that from lisp: (pcase (find-function-noselect 'outline-on-heading-p) (`(,buffer . ,position) (with-current-buffer buffer (goto-char position) (eval (read (current-buffer))))) (_ (error "Couldn't find `outline-on-heading-p'"))) Or advise :override outline-on-heading-p instead of outline-invisible-p. > (advice-add 'outline-invisible-p :filter-return > (lambda (return) (eq return (or 'outline t))) By the way, shouldn't that be (lambda (return) (or (eq return 'outline) return)) > '((name . "fountain-mode-patch")))