Subject: Re: bug#56820: outline-minor-mode replacing the first character with an arrow

From: Jim Porter <[email-masked]>
Date: Wed, 7 Sep 2022 13:01:50 -0700

On 9/7/2022 11:36 AM, Juri Linkov wrote:
>> This is supposed to be the Emacs answer to the various IDEs being able
>> to fold code, right?  Then let's try to make it look like in those IDEs.
> 
> This is an interesting question.  I tried to search how outlines look
> in other IDEs, and found such a screenshot for VSCode.
> 
> IIUC, here the first column with a red circle for a breakpoint
> corresponds to Emacs fringes, the second column with line numbers
> is the same as display-line-numbers-mode, and the third column is
> for outline arrows.

This is a good example of a potential conflict with putting the outline 
buttons in the fringe: line 10 has both an outline arrow *and* a 
breakpoint. (Emacs usually uses the fringe for breakpoints.) As far as I 
know, there's no way to show multiple fringe icons on a single line 
(other than using the right fringe, which would be odd in this case).

In this case, it looks like gdb-mi.el supports putting breakpoint icons 
in the margin, so the conflict could be avoided that way. Still, I'm not 
sure what the general answer should be. How should Emacs present buttons 
like this in a way where they don't conflict? For example, should there 
be a guideline about what kinds of icons/buttons "belong" in the fringe, 
and what kinds belong elsewhere? Note: this guideline could just inform 
the default configuration, and then users could customize things if they 
have different preferences.

Or maybe the fringe should be enhanced in some way where it can handle 
multiple fringe icons in the same position. I'm not sure how that would 
work though...