From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#31276: 27.0.50; "Spurious" empty first line from before-string Date: Thu, 26 Apr 2018 16:11:38 -0400 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1524773411 10394 195.159.176.226 (26 Apr 2018 20:10:11 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 26 Apr 2018 20:10:11 +0000 (UTC) To: 31276@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Apr 26 22:10:06 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fBnDR-0002XA-DD for geb-bug-gnu-emacs@m.gmane.org; Thu, 26 Apr 2018 22:10:05 +0200 Original-Received: from localhost ([::1]:44306 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fBnFW-00059I-Gr for geb-bug-gnu-emacs@m.gmane.org; Thu, 26 Apr 2018 16:12:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51717) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fBnFO-00057w-9h for bug-gnu-emacs@gnu.org; Thu, 26 Apr 2018 16:12:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fBnFL-0002Um-63 for bug-gnu-emacs@gnu.org; Thu, 26 Apr 2018 16:12:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:32819) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fBnFL-0002Ui-2L for bug-gnu-emacs@gnu.org; Thu, 26 Apr 2018 16:12:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fBnFK-0008GA-Rw for bug-gnu-emacs@gnu.org; Thu, 26 Apr 2018 16:12:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 26 Apr 2018 20:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 31276 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.152477351231716 (code B ref -1); Thu, 26 Apr 2018 20:12:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 26 Apr 2018 20:11:52 +0000 Original-Received: from localhost ([127.0.0.1]:40714 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fBnFA-0008FT-1y for submit@debbugs.gnu.org; Thu, 26 Apr 2018 16:11:52 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:60676) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fBnF8-0008FH-70 for submit@debbugs.gnu.org; Thu, 26 Apr 2018 16:11:50 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fBnF2-0002KB-ET for submit@debbugs.gnu.org; Thu, 26 Apr 2018 16:11:45 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:37437) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fBnF2-0002Ju-B4 for submit@debbugs.gnu.org; Thu, 26 Apr 2018 16:11:44 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51640) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fBnF1-00055X-79 for bug-gnu-emacs@gnu.org; Thu, 26 Apr 2018 16:11:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fBnEy-0002FX-0J for bug-gnu-emacs@gnu.org; Thu, 26 Apr 2018 16:11:43 -0400 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:46733) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fBnEx-0002FG-S8 for bug-gnu-emacs@gnu.org; Thu, 26 Apr 2018 16:11:39 -0400 Original-Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id w3QKBk6p004558 for ; Thu, 26 Apr 2018 16:11:47 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 09E1A68093; Thu, 26 Apr 2018 16:11:38 -0400 (EDT) X-NAI-Spam-Flag: NO X-NAI-Spam-Level: X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0.9 X-NAI-Spam-Rules: 5 Rules triggered BEC_TRC1=0.4, BEC_TRC1_W_GEN_SPAM_FEATRE=0.4, GEN_SPAM_FEATRE=0.1, EDT_SA_DN_PASS=0, RV6273=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6273> : inlines <6592> : streams <1785175> : uri <2632167> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:145772 Archived-At: 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. Arguably, this is right: `window-start` has to be one of the buffer's positions, so it has to be either before or after the overlay, and the overlay's string starts with a line-feed, so if window-start is placed there, the window will start with an empty line. But arguably this is also wrong: there is no empty-line at that position in the buffer's normal rendering. 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. Stefan