GNU bug report logs - #66023
outline-minor-mode-use-buttons depends on whitespace-space face for some reason

Previous Next

Package: emacs;

Reported by: Yilkal Argaw <yilkalargawworkneh <at> gmail.com>

Date: Sat, 16 Sep 2023 07:46:02 UTC

Severity: minor

To reply to this bug, email your comments to 66023 AT debbugs.gnu.org.

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#66023; Package emacs. (Sat, 16 Sep 2023 07:46:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Yilkal Argaw <yilkalargawworkneh <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 16 Sep 2023 07:46:02 GMT) Full text and rfc822 format available.

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

From: Yilkal Argaw <yilkalargawworkneh <at> gmail.com>
To: bug-gnu-emacs <bug-gnu-emacs <at> gnu.org>
Subject: outline-minor-mode-use-buttons depends on whitespace-space face for
 some reason
Date: Sat, 16 Sep 2023 07:45:31 +0000
Hi,

I kind of make use of the relatively new outline-minor-mode-buttons
feature. I have specfic settings regarding whitespace mode and I
observed that hides the outline buttons deeper than level 2. Trying to
debug this I found that was related to the whitespace-space face and
but looking at outline.el gave me no hit's as to why that was the
reason. So I am filing this issue with the minimal configuration to
recreate the issue.

Emacs Version
GNU Emacs 29.1 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo version
1.16.0, Xaw3d scroll bars)

The minimal config to create the issue is
(with-eval-after-load 'whitespace
  (setq whitespace-style (quote (face spaces tabs space-mark tab-mark)))
  (setq whitespace-display-mappings '((space-mark 32 [183] [46])
(tab-mark 9 [9655 9] [92 9]))))

(add-hook 'after-init-hook (global-whitespace-mode t))

(add-hook 'prog-mode-hook 'outline-minor-mode t)

(add-hook 'outline-minor-mode-hook
            (setq outline-minor-mode-use-buttons 't
                     outline-minor-mode-cycle 't
                     outline-minor-mode-cycle-filter 'bolp))

(custom-fset-faces `(whitespace-space ((t (:foreground
,(face-background 'default) :background nil))))
                               `(whitespace-tabs ((t (:foreground
,(face-background 'default) :background nil)))))


After that try and open code a python or ruby class that has method
inside it. It can be clearly seen that the outline-buttons for the
methods exist but are hidden because they are somehow affected by
whitespace-space face. (Marking the code shows that the buttons exist
but are hidden). I hope this helps in recreating the issue it was hard
to explain because it was very specific.

With Regards
Yilkal Argaw




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#66023; Package emacs. (Mon, 18 Sep 2023 07:00:03 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> linkov.net>
To: Yilkal Argaw <yilkalargawworkneh <at> gmail.com>
Cc: 66023 <at> debbugs.gnu.org
Subject: Re: bug#66023: outline-minor-mode-use-buttons depends on
 whitespace-space face for some reason
Date: Mon, 18 Sep 2023 09:42:25 +0300
> I kind of make use of the relatively new outline-minor-mode-buttons
> feature. I have specfic settings regarding whitespace mode and I
> observed that hides the outline buttons deeper than level 2. Trying to
> debug this I found that was related to the whitespace-space face and
> but looking at outline.el gave me no hit's as to why that was the
> reason. So I am filing this issue with the minimal configuration to
> recreate the issue.

Thanks for 100% reproducible case.  I don't know what whitespace-mode
does with whitespace where outline-minor-mode-buttons adds own text
properties for buttons, but it's clear there is a conflict between
these two packages each trying to do own stuff in the same shared part
of the buffer.  By default outline-minor-mode inherits text properties
at the beginning of the line together with whitespace properties that
make the buttons not visible.

So you can just override the face inherited from the buffer with
own customization:

1. M-x customize-icon RET outline-open RET and the same for outline-close
2. in the Plist section you can add own value for the face:

            Plist:
            [INS] [DEL]:
                        Key: :face
                        Value: outline-2

PS: Maybe we need to add a new boolean option that will define
whether to inherit the face attribute from the buffer or
to use the outline faces.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#66023; Package emacs. (Mon, 18 Sep 2023 08:32:02 GMT) Full text and rfc822 format available.

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

From: Yilkal Argaw <yilkalargawworkneh <at> gmail.com>
To: Juri Linkov <juri <at> linkov.net>
Cc: 66023 <at> debbugs.gnu.org
Subject: Re: bug#66023: outline-minor-mode-use-buttons depends on
 whitespace-space face for some reason
Date: Mon, 18 Sep 2023 08:31:11 +0000
[Message part 1 (text/plain, inline)]
> PS: Maybe we need to add a new boolean option that will define
> whether to inherit the face attribute from the buffer or
> to use the outline faces.

I think that might be the way to handle it. It might even be worth having
that as the default because there might be other faces that inherit from
the buffer.

On Mon, Sep 18, 2023 at 6:59 AM Juri Linkov <juri <at> linkov.net> wrote:

> > I kind of make use of the relatively new outline-minor-mode-buttons
> > feature. I have specfic settings regarding whitespace mode and I
> > observed that hides the outline buttons deeper than level 2. Trying to
> > debug this I found that was related to the whitespace-space face and
> > but looking at outline.el gave me no hit's as to why that was the
> > reason. So I am filing this issue with the minimal configuration to
> > recreate the issue.
>
> Thanks for 100% reproducible case.  I don't know what whitespace-mode
> does with whitespace where outline-minor-mode-buttons adds own text
> properties for buttons, but it's clear there is a conflict between
> these two packages each trying to do own stuff in the same shared part
> of the buffer.  By default outline-minor-mode inherits text properties
> at the beginning of the line together with whitespace properties that
> make the buttons not visible.
>
> So you can just override the face inherited from the buffer with
> own customization:
>
> 1. M-x customize-icon RET outline-open RET and the same for outline-close
> 2. in the Plist section you can add own value for the face:
>
>             Plist:
>             [INS] [DEL]:
>                         Key: :face
>                         Value: outline-2
>
> PS: Maybe we need to add a new boolean option that will define
> whether to inherit the face attribute from the buffer or
> to use the outline faces.
>
[Message part 2 (text/html, inline)]

Severity set to 'minor' from 'normal' Request was from Stefan Kangas <stefankangas <at> gmail.com> to control <at> debbugs.gnu.org. (Mon, 18 Sep 2023 22:52:01 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 270 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.