From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Paul Rankin Newsgroups: gmane.emacs.bugs Subject: bug#24073: 24.5; outline-on-heading-p sees any invisible text property as outline invisible Date: Tue, 02 Aug 2016 14:22:07 +1000 Message-ID: <1470111727.2442030.683311433.12321E0F@webmail.messagingengine.com> References: <1469520753.418402.676896009.00AAC0DE@webmail.messagingengine.com> <1469679952.1866840.678960241.470C9887@webmail.messagingengine.com> <1470044267.1052174.682381049.26455152@webmail.messagingengine.com> <87fuqoa82i.fsf@users.sourceforge.net> <1470108437.2199166.683287713.52EC58A4@webmail.messagingengine.com> NNTP-Posting-Host: blaine Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1470111807 29472 195.159.176.226 (2 Aug 2016 04:23:27 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 2 Aug 2016 04:23:27 +0000 (UTC) Cc: 24073@debbugs.gnu.org To: Noam Postavsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Aug 02 06:23:23 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 1bUREg-0007Ml-Kr for geb-bug-gnu-emacs@m.gmane.org; Tue, 02 Aug 2016 06:23:22 +0200 Original-Received: from localhost ([::1]:53926 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bUREd-0000LE-9i for geb-bug-gnu-emacs@m.gmane.org; Tue, 02 Aug 2016 00:23:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53330) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bURET-0000L7-6C for bug-gnu-emacs@gnu.org; Tue, 02 Aug 2016 00:23:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bUREO-0003EY-JA for bug-gnu-emacs@gnu.org; Tue, 02 Aug 2016 00:23:08 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:55994) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bUREM-0003Dy-9y for bug-gnu-emacs@gnu.org; Tue, 02 Aug 2016 00:23:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bUREM-0003xL-2y for bug-gnu-emacs@gnu.org; Tue, 02 Aug 2016 00:23:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Paul Rankin Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 02 Aug 2016 04:23:02 +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.147011173115136 (code B ref 24073); Tue, 02 Aug 2016 04:23:02 +0000 Original-Received: (at 24073) by debbugs.gnu.org; 2 Aug 2016 04:22:11 +0000 Original-Received: from localhost ([127.0.0.1]:53291 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bURDX-0003w3-9a for submit@debbugs.gnu.org; Tue, 02 Aug 2016 00:22:11 -0400 Original-Received: from out5-smtp.messagingengine.com ([66.111.4.29]:44007) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bURDV-0003vw-AX for 24073@debbugs.gnu.org; Tue, 02 Aug 2016 00:22:09 -0400 Original-Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id A8D4C2049B; Tue, 2 Aug 2016 00:22:07 -0400 (EDT) Original-Received: from web3 ([10.202.2.213]) by compute7.internal (MEProxy); Tue, 02 Aug 2016 00:22:07 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=paulwrankin.com; h=cc:content-transfer-encoding:content-type:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-sasl-enc:x-sasl-enc; s=mesmtp; bh=aGHt778aexuNsF+TXS5EZG5i+cI =; b=DrgVbOe/jm8Jzy7M5Uac269kaQuFf++hJ/0LABiMs0OAgJCYCAFOXbHzw0m S0pzawJkQSsSiJ1eDFcUXIwXkfycdTsZn45U7S6dG69GVYwYsvojzDSuulv6WJM4 0/zNK5YdXmfaiVxdFQp5VLGAxm//8xNoX9cuXbW7soePe2uw= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=aGHt778aexuNsF+ TXS5EZG5i+cI=; b=QeM1lG+eO+4GnyzcPma66aOIpsglS7GyRyKHRzXRMDo9h/U d95iVilO2ilvdn2Y1Jt49GmoVVuEIZxaTmqgT/lM09TxpH8CD37CorMOppTgka8P g/b+LJADAg3yXgYhmv5oMjVezWbinNa0Hg1df4/EKaqFoIonOLlFJfFQaH1o= Original-Received: by mailuser.nyi.internal (Postfix, from userid 99) id 730B81668C; Tue, 2 Aug 2016 00:22:07 -0400 (EDT) X-Sasl-Enc: 1qdDUPp6QEtbH/Uk3sJxIyHEvKk8qQfnA6InkheTR3Vn 1470111727 X-Mailer: MessagingEngine.com Webmail Interface - ajax-501c3c37 In-Reply-To: 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:121774 Archived-At: Noam Postavsky on Mon, 01 Aug 2016 23:47 -0400: > :) Don't like pcase? I fear what I do not understand. > > Would something like the following work? Maybe with a > > (condition-case ...) ? > > > > (let ((source (find-function-noselect 'outline-on-heading-p))) > > (with-current-buffer (car source) > > (goto-char (cdr source)) > > (eval-defun nil))) > > Yes, that's about the same, though I would still suggest (eval (read > ...)) over eval-defun for non-interactive code. Ah yes, I should have read the docs: "Read one Lisp expression as text from STREAM" - I assumed it would eval the whole buffer... Thanks I'm gonna assume if the package has (require 'outline) then it's safe to assume the existence of outline-on-heading-p too... It appears that (find-function-noselect 'missingfunction) will just hang Emacs anyway. > >> By the way, shouldn't that be > >> > >> (lambda (return) (or (eq return 'outline) return)) > > > > I think this will fail when outline-invisible-p returns foo in the > > initial example. We want to only return t when outline-invisible-p > > returns outline, not foo or otherwise. > > Oh, then your original was okay, it just had a bit of dead code. > Simply (lambda (return) (eq return 'outline)) should suffice. Then this will fail if/when outline-invisible-p is fixed to return t when I wanna future-proof this, so users don't notice the transition. Sorry my previous reply neglected to mention returning t.