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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 28080 in the body.
You can then email your comments to 28080 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#28080; Package emacs. (Sun, 13 Aug 2017 17:24:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Drew Adams <drew.adams <at> oracle.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 13 Aug 2017 17:24:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 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''




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28080; Package emacs. (Wed, 16 Aug 2017 23:33:01 GMT) Full text and rfc822 format available.

Message #8 received at 28080 <at> debbugs.gnu.org (full text, mbox):

From: npostavs <at> users.sourceforge.net
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 28080 <at> debbugs.gnu.org
Subject: Re: bug#28080: 25.2;
 `outline-invisible-p' should be specific to `invisible' property of
 `outline.el'
Date: Wed, 16 Aug 2017 19:34:04 -0400
forcemerge 24073 28080
quit

Drew Adams <drew.adams <at> oracle.com> writes:

> 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))

Yup, this is the definition in master.

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

Except it is still a defsubst.  It is called within some loops, so
perhaps we should at least see some numbers before changing that?




Forcibly Merged 24073 28080. Request was from npostavs <at> users.sourceforge.net to control <at> debbugs.gnu.org. (Wed, 16 Aug 2017 23:36:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28080; Package emacs. (Wed, 16 Aug 2017 23:51:01 GMT) Full text and rfc822 format available.

Message #13 received at 28080 <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: npostavs <at> users.sourceforge.net
Cc: 28080 <at> debbugs.gnu.org
Subject: RE: bug#28080: 25.2; `outline-invisible-p' should be specific to
 `invisible' property of `outline.el'
Date: Wed, 16 Aug 2017 16:50:06 -0700 (PDT)
> Yup, this is the definition in master.

Great.
 
> > (It also should not be a `defsubst'.  1985 has come and gone.)
> 
> Except it is still a defsubst.  It is called within some loops, so
> perhaps we should at least see some numbers before changing that?

Doesn't matter what the numbers are, IMHO.  `defsubst' should be
dropped altogether now.  It was annoying 30 years ago, and it's
still annoying - for no real benefit. ;-)




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 14 Sep 2017 11:24:06 GMT) Full text and rfc822 format available.

bug unarchived. Request was from Drew Adams <drew.adams <at> oracle.com> to control <at> debbugs.gnu.org. (Mon, 02 Nov 2020 22:04:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28080; Package emacs. (Mon, 02 Nov 2020 22:06:02 GMT) Full text and rfc822 format available.

Message #20 received at 28080 <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: npostavs <at> users.sourceforge.net
Cc: 28080 <at> debbugs.gnu.org
Subject: RE: bug#28080: 25.2; `outline-invisible-p' should be specific to
 `invisible' property of `outline.el'
Date: Mon, 2 Nov 2020 14:04:56 -0800 (PST)
> > > (It also should not be a `defsubst'.  1985 has come and gone.)
> >
> > Except it is still a defsubst.  It is called within some loops, so
> > perhaps we should at least see some numbers before changing that?
> 
> Doesn't matter what the numbers are, IMHO.  `defsubst' should be
> dropped altogether now.  It was annoying 30 years ago, and it's
> still annoying - for no real benefit. ;-)

(2017 has also come and gone.)  This is still a defsubst.
Could we please get it promoted to a defun now?  Thx.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28080; Package emacs. (Mon, 02 Nov 2020 22:33:02 GMT) Full text and rfc822 format available.

Message #23 received at 28080 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Drew Adams <drew.adams <at> oracle.com>, npostavs <at> users.sourceforge.net
Cc: 28080 <at> debbugs.gnu.org
Subject: Re: bug#28080: 25.2; `outline-invisible-p' should be specific to
 `invisible' property of `outline.el'
Date: Mon, 2 Nov 2020 14:32:38 -0800
Drew Adams <drew.adams <at> oracle.com> writes:

>> > > (It also should not be a `defsubst'.  1985 has come and gone.)
>> >
>> > Except it is still a defsubst.  It is called within some loops, so
>> > perhaps we should at least see some numbers before changing that?
>>
>> Doesn't matter what the numbers are, IMHO.  `defsubst' should be
>> dropped altogether now.  It was annoying 30 years ago, and it's
>> still annoying - for no real benefit. ;-)
>
> (2017 has also come and gone.)  This is still a defsubst.
> Could we please get it promoted to a defun now?  Thx.

Noam has a point though: it would be nice to see some numbers before we
change it.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 01 Dec 2020 12:24:11 GMT) Full text and rfc822 format available.

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.