unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* outline-minor-mode-highlight really weird
@ 2021-07-15  5:36 lisa-asket
  2021-07-15  7:12 ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: lisa-asket @ 2021-07-15  5:36 UTC (permalink / raw)
  To: help-gnu-emacs


In outline-minor-mode, I do not understand what it means to have 



(setq outline-minor-mode-highlight t)



Documentation says that `t` setting highlights separately from major mode,
working when headings do not conflict with major-mode.



How can headings  conflict with major modes, I ask.  



outline-minor-mode-highlight is a really weird setting.




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: outline-minor-mode-highlight really weird
  2021-07-15  5:36 outline-minor-mode-highlight really weird lisa-asket
@ 2021-07-15  7:12 ` Eli Zaretskii
  2021-07-15  7:27   ` lisa-asket
  0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2021-07-15  7:12 UTC (permalink / raw)
  To: help-gnu-emacs

> From: lisa-asket@perso.be
> Date: Thu, 15 Jul 2021 07:36:30 +0200 (CEST)
> 
> In outline-minor-mode, I do not understand what it means to have 
> 
> (setq outline-minor-mode-highlight t)
> 
> Documentation says that `t` setting highlights separately from major mode,
> working when headings do not conflict with major-mode.
> 
> How can headings  conflict with major modes, I ask.  

Since many major modes use font-lock to highlight parts of the buffer
text, outline-minor-mode-highlight could conflict with that if it
changes those highlighted parts.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* outline-minor-mode-highlight really weird
  2021-07-15  7:12 ` Eli Zaretskii
@ 2021-07-15  7:27   ` lisa-asket
  2021-07-15  7:32     ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: lisa-asket @ 2021-07-15  7:27 UTC (permalink / raw)
  To: Eli Zaretskii, help-gnu-emacs

From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: outline-minor-mode-highlight really weird
Date: 15/07/2021 09:12:13 Europe/Paris

> From: lisa-asket@perso.be
> Date: Thu, 15 Jul 2021 07:36:30 +0200 (CEST)
> 
> In outline-minor-mode, I do not understand what it means to have 
> 
> (setq outline-minor-mode-highlight t)
> 
> Documentation says that `t` setting highlights separately from major mode,
> working when headings do not conflict with major-mode.
> 
> How can headings  conflict with major modes, I ask.  

>Since many major modes use font-lock to highlight parts of the buffer
>text, outline-minor-mode-highlight could conflict with that if it
>changes those highlighted parts.

If there is a mode with a function that highlights some matching lines, what

conflict can you get?  For instance if I make my own `outline-regexp` how 

can it conflict with the major made?



With my own `outline-regexp`, the values for outline-minor-mode-highlight

never highlight the levels with different colours.  



The only way is to use 



(setq outline-minor-mode-highlight 'override)









^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: outline-minor-mode-highlight really weird
  2021-07-15  7:27   ` lisa-asket
@ 2021-07-15  7:32     ` Eli Zaretskii
  2021-07-15  7:52       ` lisa-asket
  2021-07-15  8:32       ` lisa-asket
  0 siblings, 2 replies; 6+ messages in thread
From: Eli Zaretskii @ 2021-07-15  7:32 UTC (permalink / raw)
  To: help-gnu-emacs

> From: lisa-asket@perso.be
> Date: Thu, 15 Jul 2021 09:27:38 +0200 (CEST)
> 
> > How can headings  conflict with major modes, I ask.  
> 
> >Since many major modes use font-lock to highlight parts of the buffer
> >text, outline-minor-mode-highlight could conflict with that if it
> >changes those highlighted parts.
> 
> If there is a mode with a function that highlights some matching lines, what
> conflict can you get?

If the same region of text is highlighted both by the major mode and
by outline-minor-mode, the resulting colors will be different from
what you might expect, because Emacs will merge the two faces.

> For instance if I make my own `outline-regexp` how 
> can it conflict with the major made?

By highlighting the same parts of the buffer text.  You basically tell
Emacs to use two different faces for the same text, so the result will
be the merge of the two faces.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* outline-minor-mode-highlight really weird
  2021-07-15  7:32     ` Eli Zaretskii
@ 2021-07-15  7:52       ` lisa-asket
  2021-07-15  8:32       ` lisa-asket
  1 sibling, 0 replies; 6+ messages in thread
From: lisa-asket @ 2021-07-15  7:52 UTC (permalink / raw)
  To: Eli Zaretskii, help-gnu-emacs

From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: outline-minor-mode-highlight really weird
Date: 15/07/2021 09:32:53 Europe/Paris

> From: lisa-asket@perso.be
> Date: Thu, 15 Jul 2021 09:27:38 +0200 (CEST)
> 
> > How can headings  conflict with major modes, I ask.  
> 
> >Since many major modes use font-lock to highlight parts of the buffer
> >text, outline-minor-mode-highlight could conflict with that if it
> >changes those highlighted parts.
> 
> If there is a mode with a function that highlights some matching lines, what
> conflict can you get?

> If the same region of text is highlighted both by the major mode and
> by outline-minor-mode, the resulting colors will be different from
> what you might expect, because Emacs will merge the two faces.

> > For instance if I make my own `outline-regexp` how 
> > can it conflict with the major made?

> By highlighting the same parts of the buffer text. You basically tell
> Emacs to use two different faces for the same text, so the result will

> be the merge of the two faces.



If I make headings starting with comment label, the command 

(setq outline-minor-mode-highlight t) does not highlight the levels.


Is that a conflict?








^ permalink raw reply	[flat|nested] 6+ messages in thread

* outline-minor-mode-highlight really weird
  2021-07-15  7:32     ` Eli Zaretskii
  2021-07-15  7:52       ` lisa-asket
@ 2021-07-15  8:32       ` lisa-asket
  1 sibling, 0 replies; 6+ messages in thread
From: lisa-asket @ 2021-07-15  8:32 UTC (permalink / raw)
  To: Eli Zaretskii, help-gnu-emacs

For me,  'append should not exist, but handled by (setq outline-minor-mode-highlight t)



Then, if you want outline-minor-mode to force its highlight on the major mode, use

(setq outline-minor-mode-highlight 'override).  



outline-minor-mode could call it (setq outline-minor-mode-highlight 'force) if that is more

understandable.  



Is there the possibility to use headings and keep the highlight of the major mode?

But for the others use that from outline-minor-mode.



At another level, how about having the possibility of using multiple outline-regexp

and for each be able to decide whether to override or not.  Currently there is only one 

highlighting setting for all regexp. 



What should be tackled first?













.  





From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: outline-minor-mode-highlight really weird
Date: 15/07/2021 09:32:53 Europe/Paris

> From: lisa-asket@perso.be
> Date: Thu, 15 Jul 2021 09:27:38 +0200 (CEST)
> 
> > How can headings  conflict with major modes, I ask.  
> 
> >Since many major modes use font-lock to highlight parts of the buffer
> >text, outline-minor-mode-highlight could conflict with that if it
> >changes those highlighted parts.
> 
> If there is a mode with a function that highlights some matching lines, what
> conflict can you get?

If the same region of text is highlighted both by the major mode and
by outline-minor-mode, the resulting colors will be different from
what you might expect, because Emacs will merge the two faces.

> For instance if I make my own `outline-regexp` how 
> can it conflict with the major made?

By highlighting the same parts of the buffer text. You basically tell
Emacs to use two different faces for the same text, so the result will
be the merge of the two faces.




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-07-15  8:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-15  5:36 outline-minor-mode-highlight really weird lisa-asket
2021-07-15  7:12 ` Eli Zaretskii
2021-07-15  7:27   ` lisa-asket
2021-07-15  7:32     ` Eli Zaretskii
2021-07-15  7:52       ` lisa-asket
2021-07-15  8:32       ` lisa-asket

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).