Fill column indicator functionality

classic Classic list List threaded Threaded
92 messages Options
12345
Reply | Threaded
Open this post in threaded view
|

Fill column indicator functionality

Ergus
Hi guys:

I am not sure if this is the right mailing list to ask for this.

I can't find any fill column indication functionality in emacs. For 80
(or 120) sacred column rule.

Looking around there is the fill-column-indicator package in melpa that
I have been using for a while, but recently it has been abandoned, but
also it is incompatible with native functionalities like
show-trailing-whitespace, so it enforces to use whitespace-mode instead.

Is it too difficult to add such a functionality native in emacs as you
did with the line numbers in the last release? So it will be much better
and it is not a so fancy functionality?

Thanks in advance.

Reply | Threaded
Open this post in threaded view
|

Re: Fill column indicator functionality

Eli Zaretskii
> Date: Tue, 5 Feb 2019 11:53:40 +0100
> From: Ergus <[hidden email]>
>
> I can't find any fill column indication functionality in emacs. For 80
> (or 120) sacred column rule.

ruler-mode does it, but maybe you are looking for a different kind of
indicator.  If so, would you like to describe how you'd like it to
look?

> Is it too difficult to add such a functionality native in emacs as you
> did with the line numbers in the last release?

Hard to answer this without knowing what functionality is being
sought.

Reply | Threaded
Open this post in threaded view
|

Re: Fill column indicator functionality

Ergus
Hi Eli:

Yes, I tried rule mode first, but it is a little bit too much
distracting.

I would like to have something simple like fill-column-indicator mode
package https://github.com/alpaker/Fill-Column-Indicator.

(but without it's conflicts and many issues) even if it only brings the
most basic functionalities. This is a very basic code editing
functionality that shouldn't depend of external packages (like line
numbers for example) in my opinion.

It could be a line | or a background color change up to the X column. This
is very useful, when coding old Fortran or Cobol, but also in C.

The alternative package now is hl-fill-column but I personally don't
like it because I only see the line when is crossed already.

I know you should be very busy, but maybe it is not that hard to
implement, so I had to ask at least.

Regards,

On Tue, Feb 05, 2019 at 06:41:44PM +0200, Eli Zaretskii wrote:

>> Date: Tue, 5 Feb 2019 11:53:40 +0100
>> From: Ergus <[hidden email]>
>>
>> I can't find any fill column indication functionality in emacs. For 80
>> (or 120) sacred column rule.
>
>ruler-mode does it, but maybe you are looking for a different kind of
>indicator.  If so, would you like to describe how you'd like it to
>look?
>
>> Is it too difficult to add such a functionality native in emacs as you
>> did with the line numbers in the last release?
>
>Hard to answer this without knowing what functionality is being
>sought.

Reply | Threaded
Open this post in threaded view
|

RE: Fill column indicator functionality

Drew Adams
> I would like to have something simple like fill-column-indicator mode
> (but without it's conflicts and many issues) even if it only brings the
> most basic functionalities. This is a very basic code editing
> functionality that shouldn't depend of external packages (like line
> numbers for example) in my opinion.
>
> It could be a line | or a background color change up to the X column.

Haven't been following this thread; sorry.

Have you looked at this Emacs Wiki page? Perhaps it will help - it mentions a few ways to indicate a particular column.

https://www.emacswiki.org/emacs/EightyColumnRule


Reply | Threaded
Open this post in threaded view
|

Re: Fill column indicator functionality

Ergus
Hi Drew:

Thanks for replying. I saw the page and I tried almost all the options.

My feature request comes from the fact that almost all the options there
are unmaintained and some look like patches in new clothes.

- Column-marker creates a mark only in the crossed lines. But it is more
  intuitive to have something indicating where is the limit before
  reaching it. Like a rule or a background color change.

- ModeLinePosition like ruler-mode shows the indicators in the borders
  and conflicts with spaceline and sml. But it is also far from the
  center of the screen. When editing there.

- FillColumnIndicator is the one I have been using until now, but it is
  abandoned since a long time ago (the last update was in December but
  it was to add in the readme that it is not longer maintained), it has
  many issues and incompatibilities, enforces to use whitespace-mode
  because is incompatible with show-trailing-whitespace.

- Column-Enforce-Mode is like Column-marker, but changes the rest of the
  line, at least for me it becomes annoying after a while. And also
  highlights the line only after crossed. (SO same issue than Column-maker)

There are other options in melpa: hl-fill-column-mode which is more or
less like column-marker.

I think this is a very basic text editing functionality (like line
numbers). And Emacs shouldn't need a plugin for this very basic text
editing functionalities.

On the other hand, making it part of emacs can be guaranteed to have a
similar clean appearance as you did with the line numbers in the last
release. So everything will be more standard by default.

But again, it is my opinion, I don't want to bother with this too much
because you are very busy people. Any design choice that can make it
better, more efficient or simpler will be fine even if it is not what I
had in mind.

Best,

On Tue, Feb 05, 2019 at 07:56:02PM +0000, Drew Adams wrote:

>> I would like to have something simple like fill-column-indicator mode
>> (but without it's conflicts and many issues) even if it only brings the
>> most basic functionalities. This is a very basic code editing
>> functionality that shouldn't depend of external packages (like line
>> numbers for example) in my opinion.
>>
>> It could be a line | or a background color change up to the X column.
>
>Haven't been following this thread; sorry.
>
>Have you looked at this Emacs Wiki page? Perhaps it will help - it mentions a few ways to indicate a particular column.
>
>https://www.emacswiki.org/emacs/EightyColumnRule
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Fill column indicator functionality

Eli Zaretskii
In reply to this post by Ergus
> Date: Tue, 5 Feb 2019 19:47:20 +0100
> From: Ergus <[hidden email]>
> Cc: [hidden email]
>
> I would like to have something simple like fill-column-indicator mode
> package https://github.com/alpaker/Fill-Column-Indicator.
>
> (but without it's conflicts and many issues) even if it only brings the
> most basic functionalities. This is a very basic code editing
> functionality that shouldn't depend of external packages (like line
> numbers for example) in my opinion.
>
> It could be a line | or a background color change up to the X column. This
> is very useful, when coding old Fortran or Cobol, but also in C.

How popular are such extensions?  IMO it only makes sense to implement
something like that in core if there's enough demand, like with line
numbers.

Perhaps you should start a poll on Reddit about this, and we can then
see how many people would like to use such a feature.  Do many people
share you dissatisfaction with solutions that show fill-column only
when it is crossed, for example?

There are also some questions about what exactly to do with
continuation lines, and with situations where fill-column is larger
than the window-width.  fci-mode forces you to turn on truncate-lines,
and basically ignores fill-column values larger than the window-width,
but for a core feature we need to figure out what to do in those
cases.  E.g., your proposal of indicating fill-column with background
color will then cause unpleasant display with alternating background
around continued lines.  These aspects could/should also be discussed
on Reddit before implementing.

Reply | Threaded
Open this post in threaded view
|

Re: Fill column indicator functionality

John Yates-4
On Wed, Feb 6, 2019 at 11:09 AM Eli Zaretskii <[hidden email]> wrote:
> Perhaps you should start a poll on Reddit about this, and we can then
> see how many people would like to use such a feature.  Do many people
> share you dissatisfaction with solutions that show fill-column only
> when it is crossed, for example?

I do not follow (proper verb?) Reddit.  That said I have desired
such a feature for years.

My use case (assumed very common) is actively entering / editing
mono-spaced text within a window that is at least somewhat wider
than the column about which I want some visual forewarning.  If I
am merely reading I most likely do not care to have such a visual
clue.

I would be entirely happy with an ability to draw a single
vertical line at a nominal "physical" column (not necessarily the
fill-column).  That line would be drawn irrespective of wrapped
continuations or other edge cases.  If the column is beyond the
window edge then the line simply would not get drawn.  If the
effect is ill-defined / unpalatable I would be happy to do
without as I would be no worse off than I am today.

(This seems reminiscent of recent discussion of "layers".)

/john

Reply | Threaded
Open this post in threaded view
|

Re: Fill column indicator functionality

Ergus
That's exactly the same I would like to have. With a small plus of being
compatible with show-trailing-whitespace.

I will start the post in reddit once I understand how to use it.


On Wed, Feb 06, 2019 at 03:48:42PM -0500, John Yates wrote:

>On Wed, Feb 6, 2019 at 11:09 AM Eli Zaretskii <[hidden email]> wrote:
>> Perhaps you should start a poll on Reddit about this, and we can then
>> see how many people would like to use such a feature.  Do many people
>> share you dissatisfaction with solutions that show fill-column only
>> when it is crossed, for example?
>
>I do not follow (proper verb?) Reddit.  That said I have desired
>such a feature for years.
>
>My use case (assumed very common) is actively entering / editing
>mono-spaced text within a window that is at least somewhat wider
>than the column about which I want some visual forewarning.  If I
>am merely reading I most likely do not care to have such a visual
>clue.
>
>I would be entirely happy with an ability to draw a single
>vertical line at a nominal "physical" column (not necessarily the
>fill-column).  That line would be drawn irrespective of wrapped
>continuations or other edge cases.  If the column is beyond the
>window edge then the line simply would not get drawn.  If the
>effect is ill-defined / unpalatable I would be happy to do
>without as I would be no worse off than I am today.
>
>(This seems reminiscent of recent discussion of "layers".)
>
>/john
>

Reply | Threaded
Open this post in threaded view
|

Re: Fill column indicator functionality

Basil L. Contovounesios
Ergus <[hidden email]> writes:

> That's exactly the same I would like to have. With a small plus of being
> compatible with show-trailing-whitespace.
>
> I will start the post in reddit once I understand how to use it.
>
>
> On Wed, Feb 06, 2019 at 03:48:42PM -0500, John Yates wrote:
>>On Wed, Feb 6, 2019 at 11:09 AM Eli Zaretskii <[hidden email]> wrote:
>>> Perhaps you should start a poll on Reddit about this, and we can then
>>> see how many people would like to use such a feature.  Do many people
>>> share you dissatisfaction with solutions that show fill-column only
>>> when it is crossed, for example?
>>
>>I do not follow (proper verb?) Reddit.  That said I have desired
>>such a feature for years.
>>
>>My use case (assumed very common) is actively entering / editing
>>mono-spaced text within a window that is at least somewhat wider
>>than the column about which I want some visual forewarning.  If I
>>am merely reading I most likely do not care to have such a visual
>>clue.
>>
>>I would be entirely happy with an ability to draw a single
>>vertical line at a nominal "physical" column (not necessarily the
>>fill-column).  That line would be drawn irrespective of wrapped
>>continuations or other edge cases.  If the column is beyond the
>>window edge then the line simply would not get drawn.  If the
>>effect is ill-defined / unpalatable I would be happy to do
>>without as I would be no worse off than I am today.
>>
>>(This seems reminiscent of recent discussion of "layers".)

Just chiming in because I also do not read Reddit (readit?).

As a beginner Emacsite (and programmer) in 2014, I felt I could not work
without line numbers or a rule at 80 columns.  I, too, eventually
settled on fci-mode after some quick and inexperienced testing of other
packages/solutions.  It was nice to be able to preemptively format/break
lines as they grew closer to the rule, without having to wait for 80
columns to be exceeded before this was visually indicated, for example.

Since then, I have dispensed with both features because of performance
and compatibility issues like the ones already mentioned, and I have
become accustomed to their absence and a more minimalistic (less
maximalistic?) setup.

Nevertheless, I was very happy to see the addition of
display-line-numbers (thanks Eli!), and I would also welcome some sort
of native column indication like that of fci-mode, because these have
been popular editor features in my own past experience and that of my
peers.

Having said that, I appreciate that the design and implementation of
this will be non-trivial, as there are many decisions to be made and
circumstances/options to be supported.

Thanks,

--
Basil

Reply | Threaded
Open this post in threaded view
|

Re: Fill column indicator functionality

Eli Zaretskii
> From: "Basil L. Contovounesios" <[hidden email]>
> Cc: John Yates <[hidden email]>,  Eli Zaretskii <[hidden email]>,  Emacs developers <[hidden email]>
> Date: Thu, 07 Feb 2019 01:41:04 +0000
>
> Having said that, I appreciate that the design and implementation of
> this will be non-trivial, as there are many decisions to be made and
> circumstances/options to be supported.

This doesn't have to be non-trivial, if we are smart enough not to
over-specify the feature.

Reply | Threaded
Open this post in threaded view
|

Re: Fill column indicator functionality

Ergus
Hi again:

I have been checking the display engine and the commits to add the
display-line-number functionality. With this, it really looks much
simpler to implement the version of the vertical line (character at
column X).

Do you still think not worth it to try a simpler implementation where the
only specification is the column number and the character to use? (And
probably the face). Not shown when the line is longer or when the window
is narrower.

If someone can advise or start with this I will be very happy to help. I
think that the there is a lot to gain and nothing to lose. This is a
basic text editing functionality. Many text/code editors have it and
there is not any reason we can't replicate it.

And we should improve firstly the editor functionalities, because that's
the reason people starts using emacs, later they discover the rest; but
the first it is, is a text editor.



On Thu, Feb 07, 2019 at 04:31:00PM +0200, Eli Zaretskii wrote:

>> From: "Basil L. Contovounesios" <[hidden email]>
>> Cc: John Yates <[hidden email]>,  Eli Zaretskii <[hidden email]>,  Emacs developers <[hidden email]>
>> Date: Thu, 07 Feb 2019 01:41:04 +0000
>>
>> Having said that, I appreciate that the design and implementation of
>> this will be non-trivial, as there are many decisions to be made and
>> circumstances/options to be supported.
>
>This doesn't have to be non-trivial, if we are smart enough not to
>over-specify the feature.
>

Reply | Threaded
Open this post in threaded view
|

Re: Fill column indicator functionality

Eli Zaretskii
> Date: Sun, 10 Feb 2019 23:04:54 +0100
> From: Ergus <[hidden email]>
> Cc: "Basil L. Contovounesios" <[hidden email]>, [hidden email],
> [hidden email]
>
> I have been checking the display engine and the commits to add the
> display-line-number functionality. With this, it really looks much
> simpler to implement the version of the vertical line (character at
> column X).

I'm not sure I understand: much simpler than what alternative?

> Do you still think not worth it to try a simpler implementation where the
> only specification is the column number and the character to use?

Also here: simpler than what alternative(s)?

> If someone can advise or start with this I will be very happy to
> help.

I can describe my idea of implementing this, if that's what you meant,
and point to the places in the code where it should be done.  If you
then decide to work on that, I will gladly help with advice and any
questions you might have.

Thanks.

Reply | Threaded
Open this post in threaded view
|

Re: Fill column indicator functionality

Jimmy Aguilar Mena
On Mon, Feb 11, 2019 at 05:55:04PM +0200, Eli Zaretskii wrote:

>> Date: Sun, 10 Feb 2019 23:04:54 +0100
>> From: Ergus <[hidden email]>
>> Cc: "Basil L. Contovounesios" <[hidden email]>, [hidden email],
>> [hidden email]
>>
>> I have been checking the display engine and the commits to add the
>> display-line-number functionality. With this, it really looks much
>> simpler to implement the version of the vertical line (character at
>> column X).
>
>I'm not sure I understand: much simpler than what alternative?
>
The color change one.

>> Do you still think not worth it to try a simpler implementation where the
>> only specification is the column number and the character to use?
>
>Also here: simpler than what alternative(s)?
>
>> If someone can advise or start with this I will be very happy to
>> help.
>
>I can describe my idea of implementing this, if that's what you meant,
>and point to the places in the code where it should be done.  If you
>then decide to work on that, I will gladly help with advice and any
>questions you might have.
>
>Thanks.
>
Exactly that's what I mean. BTW, is it there any legal paperwork before
contributing?

http://bsc.es/disclaimer

Reply | Threaded
Open this post in threaded view
|

Re: Fill column indicator functionality

Eli Zaretskii
> Date: Mon, 11 Feb 2019 17:56:36 +0100
> From: Jimmy Aguilar Mena <[hidden email]>
> Cc: Ergus <[hidden email]>, [hidden email], [hidden email],
>         [hidden email]
>
> >> I have been checking the display engine and the commits to add the
> >> display-line-number functionality. With this, it really looks much
> >> simpler to implement the version of the vertical line (character at
> >> column X).
> >
> >I'm not sure I understand: much simpler than what alternative?
> >
> The color change one.

I don't think it's easier, I think both could be implemented with
similar efforts, and in the same place in the code.  (Caveat: I only
thought a little bit about the implementation, so I might be missing
some important details.)

> BTW, is it there any legal paperwork before contributing?

If you don't have a copyright assignment for contributing to Emacs,
you should start the legal paperwork rolling, so that it's in place by
the time you will have code to contribute.

Thanks.

Reply | Threaded
Open this post in threaded view
|

Re: Fill column indicator functionality

Ergus
Hi all:

I have been playing with the display engine in order to try to implement
this functionality (at least a proof of concept). But after reading the
comments and the ~33E3 lines in xdisp.c there are more questions now
than answers.

The simplest approach I see is to add a '|' (or similar) in the desired
column in the "at_end_of_line:" label. But maybe there is a better
approach?

My approach is somehow based on the display_line_numbers, but taking
into account that in this case the characters are always the same, maybe
there is a way to set them in the background and it will be simpler?

Is it there any documentation about this? specially the relations
between the data structures? because the it and the glyphs are very
confusing.

Any help please?



On Mon, Feb 11, 2019 at 07:13:25PM +0200, Eli Zaretskii wrote:

>> Date: Mon, 11 Feb 2019 17:56:36 +0100
>> From: Jimmy Aguilar Mena <[hidden email]>
>> Cc: Ergus <[hidden email]>, [hidden email], [hidden email],
>>         [hidden email]
>>
>> >> I have been checking the display engine and the commits to add the
>> >> display-line-number functionality. With this, it really looks much
>> >> simpler to implement the version of the vertical line (character at
>> >> column X).
>> >
>> >I'm not sure I understand: much simpler than what alternative?
>> >
>> The color change one.
>
>I don't think it's easier, I think both could be implemented with
>similar efforts, and in the same place in the code.  (Caveat: I only
>thought a little bit about the implementation, so I might be missing
>some important details.)
>
>> BTW, is it there any legal paperwork before contributing?
>
>If you don't have a copyright assignment for contributing to Emacs,
>you should start the legal paperwork rolling, so that it's in place by
>the time you will have code to contribute.
>
>Thanks.
>

Reply | Threaded
Open this post in threaded view
|

Re: Fill column indicator functionality

Eli Zaretskii
> Date: Fri, 8 Mar 2019 19:57:46 +0100
> From: Ergus <[hidden email]>
> Cc: [hidden email]
>
> I have been playing with the display engine in order to try to implement
> this functionality (at least a proof of concept). But after reading the
> comments and the ~33E3 lines in xdisp.c there are more questions now
> than answers.

Feel free to ask the questions here.

> The simplest approach I see is to add a '|' (or similar) in the desired
> column in the "at_end_of_line:" label. But maybe there is a better
> approach?

You are on the right track.  But I'd suggest to do this inside the
function extend_face_to_end_of_line.  It is called near that label,
but you will see that it's called in several more places; I expect at
least some of them to need the same changes.

> My approach is somehow based on the display_line_numbers, but taking
> into account that in this case the characters are always the same, maybe
> there is a way to set them in the background and it will be simpler?

Simpler than what?  Can you tell what kind of complexity did you want
to avoid?

Display of line numbers needs to calculate the number of each screen
line, and that of course is not needed in this case.  You just need
to calculate the width of a stretch glyph that will display as
whitespace between the end of the line and the fill column.  You will
see that extend_face_to_end_of_line already does something similar in
the case of R2L lines.

> Is it there any documentation about this?

Maybe, but to point you to it I need to understand what "this" means
in this context.

> specially the relations between the data structures?

Which data structures? there are quite a few of them, so please be
more specific.

> because the it and the glyphs are very confusing.

Feel free to ask any questions about these two, especially about what
confuses you.

> Any help please?

I'm here to help.

And thanks for working on this.

Reply | Threaded
Open this post in threaded view
|

Re: Fill column indicator functionality

Ergus
On Fri, Mar 08, 2019 at 10:06:41PM +0200, Eli Zaretskii wrote:

>> Date: Fri, 8 Mar 2019 19:57:46 +0100
>> From: Ergus <[hidden email]>
>> Cc: [hidden email]
>>
>> I have been playing with the display engine in order to try to implement
>> this functionality (at least a proof of concept). But after reading the
>> comments and the ~33E3 lines in xdisp.c there are more questions now
>> than answers.
>
>Feel free to ask the questions here.
>
>> The simplest approach I see is to add a '|' (or similar) in the desired
>> column in the "at_end_of_line:" label. But maybe there is a better
>> approach?
>
>You are on the right track.  But I'd suggest to do this inside the
>function extend_face_to_end_of_line.  It is called near that label,
>but you will see that it's called in several more places; I expect at
>least some of them to need the same changes.
>
Hi Eli, I just finished a working version (pretty simple as a proof of
concept). That works in terminal mode. But in graphical mode we should
look for another approach because extend_face_to_end_of_line returns in:

if (FRAME_WINDOW_P (f)
   && MATRIX_ROW_DISPLAYS_TEXT_P (it->glyph_row)
   && face->box == FACE_NO_BOX
   && FACE_COLOR_TO_PIXEL (face->background, f) == FRAME_BACKGROUND_PIXEL (f)
#ifdef HAVE_WINDOW_SYSTEM
   && !face->stipple
#endif
   && !it->glyph_row->reversed_p)
   return;

So it don't write until the line end.

In graphical mode maybe it is better to do this change writing directly
a vertical line in the windows' frame background. That way it will be maybe
more efficient because we only do it once. But I don't know if this is
possible-recommended.

Else, we can follow a similar approach than in terminal version and
generate a glygh for that cases. What do you think?

BTW: Is it possible to generate a single wider glyph instead of doing a
loop?.

The glyph concept is actually not  clear for me yet, specially in
graphical mode.

>> My approach is somehow based on the display_line_numbers, but taking
>> into account that in this case the characters are always the same, maybe
>> there is a way to set them in the background and it will be simpler?
>
>Simpler than what?  Can you tell what kind of complexity did you want
>to avoid?
>
>Display of line numbers needs to calculate the number of each screen
>line, and that of course is not needed in this case.  You just need
>to calculate the width of a stretch glyph that will display as
>whitespace between the end of the line and the fill column.  You will
>see that extend_face_to_end_of_line already does something similar in
>the case of R2L lines.
>
>> Is it there any documentation about this?
>
>Maybe, but to point you to it I need to understand what "this" means
>in this context.
>
>> specially the relations between the data structures?
>
>Which data structures? there are quite a few of them, so please be
>more specific.
>
glyph <-> it: why this looks so complex? Because "it" has too many
properties I can't understand their functionalities and sometimes I
think I could reinvent the wheel.

>> because the it and the glyphs are very confusing.
>
>Feel free to ask any questions about these two, especially about what
>confuses you.
>
>> Any help please?
>
>I'm here to help.
>
>And thanks for working on this.
>
Thanks to you.

Reply | Threaded
Open this post in threaded view
|

Re: Fill column indicator functionality

Eli Zaretskii
> Date: Sat, 9 Mar 2019 14:22:09 +0100
> From: Ergus <[hidden email]>
> Cc: [hidden email]
>
> >You are on the right track.  But I'd suggest to do this inside the
> >function extend_face_to_end_of_line.  It is called near that label,
> >but you will see that it's called in several more places; I expect at
> >least some of them to need the same changes.
> >
> Hi Eli, I just finished a working version (pretty simple as a proof of
> concept). That works in terminal mode. But in graphical mode we should
> look for another approach because extend_face_to_end_of_line returns in:
>
> if (FRAME_WINDOW_P (f)
>    && MATRIX_ROW_DISPLAYS_TEXT_P (it->glyph_row)
>    && face->box == FACE_NO_BOX
>    && FACE_COLOR_TO_PIXEL (face->background, f) == FRAME_BACKGROUND_PIXEL (f)
> #ifdef HAVE_WINDOW_SYSTEM
>    && !face->stipple
> #endif
>    && !it->glyph_row->reversed_p)
>    return;
>
> So it don't write until the line end.

Yes, you need to add one more condition to that 'if', so that it
doesn't return when this feature is in effect.

> In graphical mode maybe it is better to do this change writing directly
> a vertical line in the windows' frame background.

I don't think we can do this in Emacs, the background is just a color
for us.

> That way it will be maybe more efficient because we only do it
> once.

If it were possible, it still could not be done once, because every
redisplay would have to redraw it.

> But I don't know if this is possible-recommended.

It's not possible with what we have in Emacs today.

> BTW: Is it possible to generate a single wider glyph instead of doing a
> loop?.

Yes, of course: you produce a single stretch glyph of a suitable
width.  Look at what the code does in the "row->reversed_p" case.

> >Which data structures? there are quite a few of them, so please be
> >more specific.
> >
> glyph <-> it: why this looks so complex?

For 2 main reasons:

  . the 'it' structure needs to keep track of several state variables,
    which affect more than one glyph, and it needs to do that without
    relying on the glyphs, because sometimes these functions are
    called with it->glyph_row set to NULL (when we need to simulate
    display without displaying anything, see move_it_to

  . the 'it' structure instance is discarded once the glyphs are
    produced, so if we need to record information about the glyphs, we
    need to keep it with the glyphs themselves

> Because "it" has too many properties I can't understand their
> functionalities and sometimes I think I could reinvent the wheel.

The comments in dispextern.h should help.  If they are not enough, we
can add more comments, but you need to point out the missing
information.

Reply | Threaded
Open this post in threaded view
|

Re: Fill column indicator functionality

John Yates-4
In reply to this post by Ergus
On Sat, Mar 9, 2019 at 8:24 AM Ergus <[hidden email]> wrote:
>
> In graphical mode maybe it is better to do this change writing directly
> a vertical line in the windows' frame background.

That would be much closer to the experience I desire.  I advocate
one small change: draw the vertical line in the foreground.

/john

Reply | Threaded
Open this post in threaded view
|

Re: Fill column indicator functionality

Eli Zaretskii
> From: John Yates <[hidden email]>
> Date: Sat, 9 Mar 2019 13:02:04 -0500
> Cc: Eli Zaretskii <[hidden email]>, Emacs developers <[hidden email]>
>
> On Sat, Mar 9, 2019 at 8:24 AM Ergus <[hidden email]> wrote:
> >
> > In graphical mode maybe it is better to do this change writing directly
> > a vertical line in the windows' frame background.
>
> That would be much closer to the experience I desire.  I advocate
> one small change: draw the vertical line in the foreground.

I'll welcome patches to implement such a capability.  Right now, I
don't think we can do that in Emacs.

12345