GNU bug report logs - #28080
25.2; `outline-invisible-p' should be specific to `invisible' property of `outline.el'

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Sun, 13 Aug 2017 17:24:02 UTC

Severity: normal

Merged with 24073

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

From: Drew Adams <drew.adams <at> oracle.com>
To: 28080 <at> debbugs.gnu.org
Subject: bug#28080: 25.2; `outline-invisible-p' should be specific to `invisible' property of `outline.el'
Date: Sun, 13 Aug 2017 17:22:48 +0000 (UTC)
This is the definition of `outline-invisible-p' in `outline.el':

(defsubst outline-invisible-p (&optional pos)
  "Non-nil if the character after POS is invisible.
If POS is nil, use `point' instead."
  (get-char-property (or pos (point)) 'invisible))

That's wrong.  Outline should recognize and respect, for its purposes,
only the invisibility that it, itself, imposes.

Here is a correct definition, AFAICT.  My own use of this indicates that
it DTRT.  In particular, I believe that it handles all of the invisible
text that Outline itself imposes, so that `outline.el' loses nothing by
using it.

(defun outline-invisible-p (&optional pos)
  "Non-nil if the character after point is invisible for outline purposes."
  (eq (get-char-property (or pos (point)) 'invisible) 'outline))

(It also should not be a `defsubst'.  1985 has come and gone.)

This fix is important for letting `outline.el' play with other code that
uses text invisibility for other reasons.  For example, I use it with
Info mode in a TOC buffer.  (That lets you show/hide parts of the TOC,
move parts around, etc., while still keeping hidden *Note:: etc.)

In GNU Emacs 25.2.1 (x86_64-w64-mingw32)
 of 2017-04-24
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --without-dbus --without-compress-install 'CFLAGS=-O2
 -static -g3''




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.