unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Fringe angle bitmap at at eob
@ 2005-10-27 15:09 Chong Yidong
  2005-10-28 16:17 ` Richard M. Stallman
  2005-11-01 20:00 ` Michael Mauger
  0 siblings, 2 replies; 12+ messages in thread
From: Chong Yidong @ 2005-10-27 15:09 UTC (permalink / raw)


I've installed a fix for the following issue in FOR-RELEASE:

  ** Rework how the fringe "angle" bitmap at at bottom of buffer is
  shown to include an indication of whether the last line has a NL or
  not.

This involved a one-line change, from

    if (MATRIX_ROW_END_CHARPOS (row) >= BUF_ZV (XBUFFER (w->buffer))

to

    if (row->ends_at_zv_p

in fringe.c:863.

This just displays the eob fringe angle bitmap one line further down
when the buffer ends in a final newline.  I've checked with KFS, and
he's OK with the change.  Pls test it out and see if there are any
problems.

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

* Re: Fringe angle bitmap at at eob
  2005-10-27 15:09 Fringe angle bitmap at at eob Chong Yidong
@ 2005-10-28 16:17 ` Richard M. Stallman
  2005-11-01 20:00 ` Michael Mauger
  1 sibling, 0 replies; 12+ messages in thread
From: Richard M. Stallman @ 2005-10-28 16:17 UTC (permalink / raw)
  Cc: emacs-devel

Thank you for fixing this.

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

* Re: Fringe angle bitmap at at eob
  2005-10-27 15:09 Fringe angle bitmap at at eob Chong Yidong
  2005-10-28 16:17 ` Richard M. Stallman
@ 2005-11-01 20:00 ` Michael Mauger
  2005-11-01 21:10   ` Robert J. Chassell
                     ` (2 more replies)
  1 sibling, 3 replies; 12+ messages in thread
From: Michael Mauger @ 2005-11-01 20:00 UTC (permalink / raw)


Chong Yidong writes:

> 
> I've installed a fix for the following issue in FOR-RELEASE:
> 
>   ** Rework how the fringe "angle" bitmap at at bottom of buffer is
>   shown to include an indication of whether the last line has a NL or
>   not.
> 
> This just displays the eob fringe angle bitmap one line further down
> when the buffer ends in a final newline.  I've checked with KFS, and
> he's OK with the change.  Pls test it out and see if there are any
> problems.
> 

I'm finding this change a little distracting...  Is it posible to use a 
different bitmap on the last empty line?  Maybe a `T' shape in place of the 
lower-left corner shape.

I actually thought the other behavior was better and more accurate.

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

* Re: Fringe angle bitmap at at eob
  2005-11-01 20:00 ` Michael Mauger
@ 2005-11-01 21:10   ` Robert J. Chassell
  2005-11-01 22:35   ` Kim F. Storm
  2005-11-02 10:28   ` Richard M. Stallman
  2 siblings, 0 replies; 12+ messages in thread
From: Robert J. Chassell @ 2005-11-01 21:10 UTC (permalink / raw)
  Cc: emacs-devel

   > This just displays the eob fringe angle bitmap one line further down
   > when the buffer ends in a final newline. ...

   I'm finding this change a little distracting... 

   I actually thought the other behavior was better and more accurate.

I agree.  The extra blank line looks like a bug that whomever wrote
the code accidentally left in.  I understand the notion that a
carriage return be indicated by the blank line -- but that is not how
it looks.

Also, `whitespace-toggle-trailing-check' does not show trailing
whitespace when a buffer ends with a newline.

-- 
    Robert J. Chassell                         
    bob@rattlesnake.com                         GnuPG Key ID: 004B4AC8
    http://www.rattlesnake.com                  http://www.teak.cc

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

* Re: Fringe angle bitmap at at eob
  2005-11-01 20:00 ` Michael Mauger
  2005-11-01 21:10   ` Robert J. Chassell
@ 2005-11-01 22:35   ` Kim F. Storm
  2005-11-02  4:22     ` Michael Mauger
  2005-11-02 21:47     ` Richard M. Stallman
  2005-11-02 10:28   ` Richard M. Stallman
  2 siblings, 2 replies; 12+ messages in thread
From: Kim F. Storm @ 2005-11-01 22:35 UTC (permalink / raw)
  Cc: emacs-devel

Michael Mauger <mmaug@yahoo.com> writes:

>> This just displays the eob fringe angle bitmap one line further down
>> when the buffer ends in a final newline.  I've checked with KFS, and
>> he's OK with the change.  Pls test it out and see if there are any
>> problems.
>> 
>
> I'm finding this change a little distracting...  Is it posible to use a 
> different bitmap on the last empty line?  Maybe a `T' shape in place of the 
> lower-left corner shape.
>
> I actually thought the other behavior was better and more accurate.

I just reverted the original change and installed another change that
indicates when the bottom row does not end in a newline by rotating
the bottom row bitmap by 180 degrees.

Please try to see if that works better.

-- 
Kim F. Storm <storm@cua.dk> http://www.cua.dk

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

* Re: Fringe angle bitmap at at eob
  2005-11-01 22:35   ` Kim F. Storm
@ 2005-11-02  4:22     ` Michael Mauger
  2005-11-02 21:47     ` Richard M. Stallman
  1 sibling, 0 replies; 12+ messages in thread
From: Michael Mauger @ 2005-11-02  4:22 UTC (permalink / raw)
  Cc: emacs-devel

--- Kim wrote:

> Michael Mauger writes:
> 
> >> This just displays the eob fringe angle bitmap one line further down
> >> when the buffer ends in a final newline.  I've checked with KFS, and
> >> he's OK with the change.  Pls test it out and see if there are any
> >> problems.
> >> 
> >
> > I'm finding this change a little distracting...  Is it posible to 
> > use a different bitmap on the last empty line?  Maybe a `T' shape 
> > in place of the lower-left corner shape.
> >
> > I actually thought the other behavior was better and more accurate.
> 
> I just reverted the original change and installed another change that
> indicates when the bottom row does not end in a newline by rotating
> the bottom row bitmap by 180 degrees.
> 
> Please try to see if that works better.
> 

Much better.  Thanks.

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

* Re: Fringe angle bitmap at at eob
  2005-11-01 20:00 ` Michael Mauger
  2005-11-01 21:10   ` Robert J. Chassell
  2005-11-01 22:35   ` Kim F. Storm
@ 2005-11-02 10:28   ` Richard M. Stallman
  2005-11-02 14:45     ` Kim F. Storm
  2 siblings, 1 reply; 12+ messages in thread
From: Richard M. Stallman @ 2005-11-02 10:28 UTC (permalink / raw)
  Cc: emacs-devel

    I'm finding this change a little distracting...  Is it posible to use a 
    different bitmap on the last empty line?  Maybe a `T' shape in place of the 
    lower-left corner shape.

If people prefer that, I don't object.

    I actually thought the other behavior was better and more accurate.

I can't argue with personal perceptions, but the previous behavior was
wrong and misleading.  When the buffer ends at a newline, the cursor
can go after that newline.  It is wrong to indicate that the buffer
ends before that newline--before the cursor.

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

* Re: Fringe angle bitmap at at eob
  2005-11-02 10:28   ` Richard M. Stallman
@ 2005-11-02 14:45     ` Kim F. Storm
  2005-11-03 13:50       ` Richard M. Stallman
  2005-11-03 13:50       ` Richard M. Stallman
  0 siblings, 2 replies; 12+ messages in thread
From: Kim F. Storm @ 2005-11-02 14:45 UTC (permalink / raw)
  Cc: Michael Mauger, emacs-devel

"Richard M. Stallman" <rms@gnu.org> writes:

>     I actually thought the other behavior was better and more accurate.
>
> I can't argue with personal perceptions, but the previous behavior was
> wrong and misleading.  When the buffer ends at a newline, the cursor
> can go after that newline.  It is wrong to indicate that the buffer
> ends before that newline--before the cursor.

Well, the newline _is_ on the last line, but the cursor is AFTER that
newline, so the buffer ends AFTER the newline, but BEFORE the cursor!!

So placing the "end-of-buffer" marker after the cursor is both
misleading and confusing, as it falsely indicates to the user that
there is an extra empty line at the bottom of the file.

I think my latest change DTRT in both cases!


BTW, if cursor is at the end of buffer after the final newline,
C-x = reports this:

    point=909 of 908 (100%) column 0 

When cursor is at the end of the last line without a newline, C-x =
reports:

    point=3386 of 3385 (100%) column 70 


Both of these clearly indicates that the cursor is AFTER the end of
buffer, which reminds me of the following change to C-x = when the
cursor is at the end of the buffer.  It changes the output from the
two examples above to:

    point=909 of 908 (EOB) column 0 
    point=3386 of 3385 (EOB) column 70 


*** simple.el	01 Nov 2005 10:36:52 +0100	1.760
--- simple.el	02 Nov 2005 15:33:59 +0100	
***************
*** 893,900 ****
  	(if (or (/= beg 1) (/= end (1+ total)))
  	    (message "point=%d of %d (%d%%) <%d - %d> column %d %s"
  		     pos total percent beg end col hscroll)
! 	  (message "point=%d of %d (%d%%) column %d %s"
! 		   pos total percent col hscroll))
        (let ((coding buffer-file-coding-system)
  	    encoded encoding-msg display-prop under-display)
  	(if (or (not coding)
--- 893,900 ----
  	(if (or (/= beg 1) (/= end (1+ total)))
  	    (message "point=%d of %d (%d%%) <%d - %d> column %d %s"
  		     pos total percent beg end col hscroll)
! 	  (message "point=%d of %d (EOB) column %d %s"
! 		   pos total col hscroll))
        (let ((coding buffer-file-coding-system)
  	    encoded encoding-msg display-prop under-display)
  	(if (or (not coding)



-- 
Kim F. Storm <storm@cua.dk> http://www.cua.dk

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

* Re: Fringe angle bitmap at at eob
  2005-11-01 22:35   ` Kim F. Storm
  2005-11-02  4:22     ` Michael Mauger
@ 2005-11-02 21:47     ` Richard M. Stallman
  2005-11-03 21:40       ` Richard M. Stallman
  1 sibling, 1 reply; 12+ messages in thread
From: Richard M. Stallman @ 2005-11-02 21:47 UTC (permalink / raw)
  Cc: mmaug, emacs-devel

    I just reverted the original change and installed another change that
    indicates when the bottom row does not end in a newline by rotating
    the bottom row bitmap by 180 degrees.

I don't see the rotation--or any change.  What I see is the same
behavior we had yesterday.

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

* Re: Fringe angle bitmap at at eob
  2005-11-02 14:45     ` Kim F. Storm
@ 2005-11-03 13:50       ` Richard M. Stallman
  2005-11-03 13:50       ` Richard M. Stallman
  1 sibling, 0 replies; 12+ messages in thread
From: Richard M. Stallman @ 2005-11-03 13:50 UTC (permalink / raw)
  Cc: mmaug, emacs-devel

    Well, the newline _is_ on the last line, but the cursor is AFTER that
    newline, so the buffer ends AFTER the newline, but BEFORE the cursor!!

After the newline and before the cursor is at the beginning of the
line.  The fringe indicator seems to point at the top of that line,
which is too high up.

The idea of a different indicator when the line is empty is a good
one, but would you please look for a different way to work out the
details?

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

* Re: Fringe angle bitmap at at eob
  2005-11-02 14:45     ` Kim F. Storm
  2005-11-03 13:50       ` Richard M. Stallman
@ 2005-11-03 13:50       ` Richard M. Stallman
  1 sibling, 0 replies; 12+ messages in thread
From: Richard M. Stallman @ 2005-11-03 13:50 UTC (permalink / raw)
  Cc: mmaug, emacs-devel

    Both of these clearly indicates that the cursor is AFTER the end of
    buffer, which reminds me of the following change to C-x = when the
    cursor is at the end of the buffer.  It changes the output from the
    two examples above to:

	point=909 of 908 (EOB) column 0 
	point=3386 of 3385 (EOB) column 70 

Those changes seem good, but please see if the Emacs manual
(screen.texi) needs updating for this.

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

* Re: Fringe angle bitmap at at eob
  2005-11-02 21:47     ` Richard M. Stallman
@ 2005-11-03 21:40       ` Richard M. Stallman
  0 siblings, 0 replies; 12+ messages in thread
From: Richard M. Stallman @ 2005-11-03 21:40 UTC (permalink / raw)
  Cc: mmaug, emacs-devel

Yesterday I wrote

    I don't see the rotation--or any change.  What I see is the same
    behavior we had yesterday.

but I ran it again, and that time, did see your change.

The new code has the same problem that the previous change fixed:
the "end of buffer" indicator seems to indicate the end is
on the previous line.  Even though the final newline changes the
of the indicator, the indicator used when there's a newline
appears to say the end is above the newline.  That is no good.

This is the problem I decided must be solved.  Putting back
the old code is one way, but other solutions might be ok
if you want to look for one.

In general, please don't make changes that undo my decisions
without getting my approval.

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

end of thread, other threads:[~2005-11-03 21:40 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-27 15:09 Fringe angle bitmap at at eob Chong Yidong
2005-10-28 16:17 ` Richard M. Stallman
2005-11-01 20:00 ` Michael Mauger
2005-11-01 21:10   ` Robert J. Chassell
2005-11-01 22:35   ` Kim F. Storm
2005-11-02  4:22     ` Michael Mauger
2005-11-02 21:47     ` Richard M. Stallman
2005-11-03 21:40       ` Richard M. Stallman
2005-11-02 10:28   ` Richard M. Stallman
2005-11-02 14:45     ` Kim F. Storm
2005-11-03 13:50       ` Richard M. Stallman
2005-11-03 13:50       ` Richard M. Stallman

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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