GNU bug report logs -
#24073
24.5; outline-on-heading-p sees any invisible text property as outline inviisble
Previous Next
Reported by: Paul Rankin <hello <at> paulwrankin.com>
Date: Tue, 26 Jul 2016 08:13:02 UTC
Severity: normal
Merged with 28080
Found in versions 24.5, 25.2
Fixed in version 26.1
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #26 received at 24073 <at> debbugs.gnu.org (full text, mbox):
Paul Rankin <hello <at> paulwrankin.com> writes:
> Noam Postavsky <npostavs <at> 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")))
This bug report was last modified 4 years and 202 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.