From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.bugs Subject: bug#24073: 24.5; outline-on-heading-p sees any invisible text property as outline invisible Date: Mon, 1 Aug 2016 23:47:34 -0400 Message-ID: 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; charset=UTF-8 X-Trace: blaine.gmane.org 1470109702 28007 195.159.176.226 (2 Aug 2016 03:48:22 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 2 Aug 2016 03:48:22 +0000 (UTC) Cc: 24073@debbugs.gnu.org To: Paul Rankin Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Aug 02 05:48:18 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 1bUQgi-00074z-NX for geb-bug-gnu-emacs@m.gmane.org; Tue, 02 Aug 2016 05:48:16 +0200 Original-Received: from localhost ([::1]:53842 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bUQge-0000JU-Ic for geb-bug-gnu-emacs@m.gmane.org; Mon, 01 Aug 2016 23:48:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49138) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bUQgY-0000Iz-Eu for bug-gnu-emacs@gnu.org; Mon, 01 Aug 2016 23:48:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bUQgU-0005Ru-9y for bug-gnu-emacs@gnu.org; Mon, 01 Aug 2016 23:48:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:55980) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bUQgU-0005Rq-6O for bug-gnu-emacs@gnu.org; Mon, 01 Aug 2016 23:48:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bUQgT-00038C-Ow for bug-gnu-emacs@gnu.org; Mon, 01 Aug 2016 23:48:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 02 Aug 2016 03:48: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.147010966312010 (code B ref 24073); Tue, 02 Aug 2016 03:48:01 +0000 Original-Received: (at 24073) by debbugs.gnu.org; 2 Aug 2016 03:47:43 +0000 Original-Received: from localhost ([127.0.0.1]:53277 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bUQgB-00037e-0W for submit@debbugs.gnu.org; Mon, 01 Aug 2016 23:47:43 -0400 Original-Received: from mail-oi0-f51.google.com ([209.85.218.51]:34838) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bUQg9-00037R-3G for 24073@debbugs.gnu.org; Mon, 01 Aug 2016 23:47:41 -0400 Original-Received: by mail-oi0-f51.google.com with SMTP id 4so9822365oih.2 for <24073@debbugs.gnu.org>; Mon, 01 Aug 2016 20:47:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=JfjdcUeDTjHrbGJUkiwjXoDNpgxtbVrt1IUH1cxGmdA=; b=Um2O5Qq5DjJAmdLoz/EqALKf6XgFLs1Y126GZMXnbb9xeSuSkzzSIHHDDJ3flhTANV c5IdWrkazMjYvNcHMeeW9/f+6cl/LZ4m4yq7da5GjG6Cw+b9gjxM9GaKGy7cLZbRjs48 lK2aDbZ0n7tjfbX22IHev6Yv7ZX9PuR0iF6Lo2CCH1FLqRaGecg/aG2SHDLlHtarCMXa i1W4h2BoIa5Q0t8zJME/9Wp+heaNB2rTrr49TXoc/x16CRvi/8nLo8LQUBBg+WnFYyr5 w0OpvfB4IGhbZ9GniJTlu/NycR0RVI4dKRobBorXeDRXpifTUsLdcMnI4Y4oJViRVYOB F1xA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=JfjdcUeDTjHrbGJUkiwjXoDNpgxtbVrt1IUH1cxGmdA=; b=JpjbN2DdrqQqxUMTGqz8xdT7ECxg5JWcdvI9V8reMithZpHg/MBI2HQypN1L5VgY08 HxAzYqwv2izMlmgaYagvoMDIyIOxqIUIDUXxRVe1srHDql8AvyQCp1eJ7MrVVtYJ8w8N uyjQdkfESCacnY3QiBQRFq5GioLj56Wy6hfEIVZleUe86oPwfUazCoL4UM4dHztjXi4o h17ph8vZY6M9wL4Hhebt6ogtVfrwH+v5eBqkN4ybiQt+9KhKHr+pkgId5l6MPVchVebu mFoAsUQBaC41ae3URXYKCDIUsV3VpsDJoo81dCcdO63YPOFn6t7dluRCX1GIm7WqPZdz pYvg== X-Gm-Message-State: AEkoouvyC4F0j4kcYpADVr3epemvYu4nmKkc+6oms7mOAPUIDuod4lw74Fx1YCHbqhYTNBV10SMpngR7l2jgEg== X-Received: by 10.202.93.197 with SMTP id r188mr15989363oib.88.1470109655444; Mon, 01 Aug 2016 20:47:35 -0700 (PDT) Original-Received: by 10.157.7.161 with HTTP; Mon, 1 Aug 2016 20:47:34 -0700 (PDT) In-Reply-To: <1470108437.2199166.683287713.52EC58A4@webmail.messagingengine.com> X-Google-Sender-Auth: EY2jowFVuTVBoqmzkUgrQE5vV6k 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:121772 Archived-At: On Mon, Aug 1, 2016 at 11:27 PM, Paul Rankin wrote: > Whoa this is terrifying... :) Don't like pcase? > > 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. >> 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.