unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Stefan Monnier <monnier@IRO.UMontreal.CA>
Cc: 31276@debbugs.gnu.org
Subject: bug#31276: 27.0.50; "Spurious" empty first line from before-string
Date: Sat, 28 Apr 2018 12:40:58 +0300	[thread overview]
Message-ID: <83fu3fu0r9.fsf@gnu.org> (raw)
In-Reply-To: <jwv604dbudh.fsf@iro.umontreal.ca> (message from Stefan Monnier on Thu, 26 Apr 2018 16:11:38 -0400)

> From: Stefan Monnier <monnier@IRO.UMontreal.CA>
> Date: Thu, 26 Apr 2018 16:11:38 -0400
> 
> Package: Emacs
> Version: 27.0.50
> 
> 
> Try the following:
> 
>     % src/emacs -Q etc/NEWS --eval '(let ((ol (make-overlay (+ (point) 10) (+ (point) 10)))) (overlay-put ol (quote before-string) "\nhello\n"))'
>     C-u 1 C-v
> 
> You should see that the "scroll by 1 line" didn't actually scroll: it just
> removed the "GNU Emacs " from your sight and left an empty line instead.

After "C-u 1 C-v", type C-p, then type "C-u 1 C-v" again.  What do you
see?  Does what you see change your idea about where the bug is?

> Whether you consider this as a bug report or a feature request, my point
> is that when the window starts with a before/after-string and that
> string starts with a line-feed, we should skip that line-feed rather
> than waste a perfectly good line.

I don't understand: are you arguing that we should ignore newlines in
overlay strings when they happen to appear at the beginning of the
window?  It sounds very strange to me to do so.  Whoever puts the
newlines there does that for a reason, and I'm sure will object to
having them effectively removed in some situations.





  reply	other threads:[~2018-04-28  9:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-26 20:11 bug#31276: 27.0.50; "Spurious" empty first line from before-string Stefan Monnier
2018-04-28  9:40 ` Eli Zaretskii [this message]
2018-04-28 13:13   ` Stefan Monnier
2018-04-28 14:04     ` Eli Zaretskii
2018-04-28 14:07       ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83fu3fu0r9.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=31276@debbugs.gnu.org \
    --cc=monnier@IRO.UMontreal.CA \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).