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
View this message in rfc822 format
On Thu, Jul 28, 2016 at 12:25 AM, Paul Rankin <hello <at> paulwrankin.com> wrote:
> I've tried to create an advice patch for the benefit of users affected by the bug to make outline-invisible-p return t for either 'outline or t, nil otherwise...
>
> (advice-add 'outline-invisible-p :filter-return
> (lambda (return) (eq return (or 'outline t)))
> '((name . "fountain-mode-patch")))
>
> However, it appears that other compiled functions in outline that call outline-invisible-p do not respect this advice, e.g.
>
> 1. navigate to heading affected by above bug
> 2. M-: (outline-on-heading-p)
> => nil
> 3. navigate to (defun outline-on-heading-p ...) in outline.el
> 4. C-M-x
> 5. repeat 1. and 2.
> => t
>
> Do compiled functions not respect advice added to functions that they call?
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.
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.