unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: npostavs@users.sourceforge.net
To: Paul Rankin <hello@paulwrankin.com>
Cc: 24073@debbugs.gnu.org
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	[thread overview]
Message-ID: <87fuqoa82i.fsf@users.sourceforge.net> (raw)
In-Reply-To: <1470044267.1052174.682381049.26455152@webmail.messagingengine.com> (Paul Rankin's message of "Mon, 01 Aug 2016 19:37:47 +1000")

Paul Rankin <hello@paulwrankin.com> writes:

> Noam Postavsky <npostavs@users.sourceforge.net> 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")))






  reply	other threads:[~2016-08-01 14:16 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-26  8:12 bug#24073: 24.5; outline-on-heading-p sees any invisible text property as outline inviisble Paul Rankin
2016-07-26  9:29 ` Paul Rankin
2016-07-26 15:14   ` Eli Zaretskii
2016-07-27  5:43     ` Paul Rankin
2016-07-28  4:25 ` bug#24073: 24.5; outline-on-heading-p sees any invisible text property as outline invisible Paul Rankin
2016-07-29  2:07   ` Noam Postavsky
2016-08-01  9:37     ` Paul Rankin
2016-08-01 14:16       ` npostavs [this message]
2016-08-02  3:27         ` Paul Rankin
2016-08-02  3:47           ` Noam Postavsky
2016-08-02  4:22             ` Paul Rankin
2016-08-02 14:27               ` Noam Postavsky
2016-08-02  7:20             ` Paul Rankin
2016-08-02 14:31               ` Noam Postavsky
2016-08-03  3:18                 ` Paul Rankin
2016-08-31  1:12 ` bug#24073: 25.1-rc2 Paul Rankin
2016-08-31  2:41   ` Eli Zaretskii
2016-08-31  2:56     ` Paul Rankin
2016-08-31  8:59       ` John Wiegley
2016-08-31  9:12       ` Nicolas Petton
2016-08-31 14:25       ` Eli Zaretskii
2016-09-03  4:38         ` Paul Rankin
2016-09-18 14:39           ` Eli Zaretskii
2016-09-18 14:45             ` Nicolas Goaziou
2016-09-18 14:53               ` Eli Zaretskii
2016-09-19  9:40                 ` Paul Rankin
2016-09-19 16:48                   ` Eli Zaretskii
2016-09-20  5:37                     ` Bastien Guerry
2016-09-30  8:06                     ` Bastien Guerry
2017-03-30  8:18                       ` Paul Rankin
2017-03-31  0:16                         ` npostavs
2017-04-01  6:40                           ` Paul Rankin
2017-04-01  7:20                             ` Andreas Schwab
2017-04-01  8:06                               ` Paul Rankin
2017-04-01  8:20                                 ` Andreas Schwab
2017-04-01  9:11                                   ` Paul Rankin
2017-04-01  9:37                                     ` Andreas Schwab
2017-04-01 10:18                                       ` Paul Rankin
2017-04-01 11:44                                         ` Eli Zaretskii
2017-04-01 12:05                                           ` Paul Rankin
2017-04-01 11:48                                         ` Andreas Schwab
2016-09-18 15:34               ` Bastien Guerry

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fuqoa82i.fsf@users.sourceforge.net \
    --to=npostavs@users.sourceforge.net \
    --cc=24073@debbugs.gnu.org \
    --cc=hello@paulwrankin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).