From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.bugs Subject: bug#21468: 24.5; When next-line (visual) crosses overlay with before-string="\n" point goes to column 0 Date: Fri, 2 Oct 2015 15:58:08 -0400 Message-ID: References: <834miybogz.fsf@gnu.org> <83zj0q9k0m.fsf@gnu.org> <83twqxa5is.fsf@gnu.org> <83613d9lcl.fsf@gnu.org> <831te19goc.fsf@gnu.org> <83r3m0896l.fsf@gnu.org> <837fn57fod.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1443816715 24582 80.91.229.3 (2 Oct 2015 20:11:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 2 Oct 2015 20:11:55 +0000 (UTC) Cc: 21468@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Oct 02 22:11:40 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Zi6g7-0000sg-AO for geb-bug-gnu-emacs@m.gmane.org; Fri, 02 Oct 2015 22:11:39 +0200 Original-Received: from localhost ([::1]:34961 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zi6g6-0003wO-Lj for geb-bug-gnu-emacs@m.gmane.org; Fri, 02 Oct 2015 16:11:38 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34020) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zi6Ty-0000vQ-JR for bug-gnu-emacs@gnu.org; Fri, 02 Oct 2015 15:59:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zi6Tu-0004JD-DW for bug-gnu-emacs@gnu.org; Fri, 02 Oct 2015 15:59:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:35254) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zi6Tu-0004IX-9X for bug-gnu-emacs@gnu.org; Fri, 02 Oct 2015 15:59:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Zi6Tt-0008Ti-UI for bug-gnu-emacs@gnu.org; Fri, 02 Oct 2015 15:59:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 02 Oct 2015 19:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21468 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 21468-submit@debbugs.gnu.org id=B21468.144381589132531 (code B ref 21468); Fri, 02 Oct 2015 19:59:01 +0000 Original-Received: (at 21468) by debbugs.gnu.org; 2 Oct 2015 19:58:11 +0000 Original-Received: from localhost ([127.0.0.1]:52458 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zi6T4-0008Sb-TK for submit@debbugs.gnu.org; Fri, 02 Oct 2015 15:58:11 -0400 Original-Received: from mail-wi0-f169.google.com ([209.85.212.169]:33754) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zi6T2-0008ST-U4 for 21468@debbugs.gnu.org; Fri, 02 Oct 2015 15:58:09 -0400 Original-Received: by wiclk2 with SMTP id lk2so48117060wic.0 for <21468@debbugs.gnu.org>; Fri, 02 Oct 2015 12:58:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=tMO/SnLKOm2/ETnIEGjbxVx5e0qSiK1WMemmHetCTJ4=; b=Ih0X6Ts+8BBoBiFvZT+uKPGBD7Vmz6afZ45hE9m9zhDuUp47aGq0qIC3yLQhqBy+Ra ZiBQapun7OaDopy1kgXrY6j7j73yijfA11WbV9cYNcklCP7aDeqCgH/GKpqRUNF8rgXk i4dCsEgRarCzZVW5N3x8JHF7IgbVt4K7SIFlisYwVpORvWKh3fH6XOvOL5YObM7TrhDJ Oz0mGb+ynBUrXmsgtszZfmeAEu3DLx3BTALSIRFnT6OyBW+dhGQVf0oUY80xdlZXrS10 I0Z/NjdYnv9oC4lzKV7jWkxDf36tFplsHf8tZ4kitTB+7KcMTaXz305I9pZ5DrcgQFr6 HpRg== X-Received: by 10.194.115.199 with SMTP id jq7mr19875613wjb.82.1443815888178; Fri, 02 Oct 2015 12:58:08 -0700 (PDT) Original-Received: by 10.28.210.68 with HTTP; Fri, 2 Oct 2015 12:58:08 -0700 (PDT) In-Reply-To: <837fn57fod.fsf@gnu.org> X-Google-Sender-Auth: Qeke2xwwAHwIhvFH1Bq2xuS0NJA X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x 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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:107226 Archived-At: On Fri, Oct 2, 2015 at 6:01 AM, Eli Zaretskii wrote: >> But when moving point to end of line this causes the cursor to appear >> at the edge of the window instead of at the "real" end of line. I >> guess it's because the aligned space pushes the newline character to >> the edge of the window. > > Yes. But why is that a problem? Because we want the lines to be just visual effects that don't affect cursor movement, i.e. the cursor should act the same whether or not the lines are visible. > > If you dislike that, you could make the stretch one column shorter, Which of course just means that the cursor appears at one column before the edge of the window instead of at the "real" end of line. > (let* ((align (list 'space :align-to `(+ (,(- (window-body-width nil t) > (default-font-width))) > ,(window-hscroll)))) > > (Btw, I think adding window-hscroll is incorrect here, as its value is > in columns, while window-body-width returns the width in pixels.) window-body-width is inside a list indicating pixel value, and window-hscroll is a plain integer indicating a multiple of the font width, so it should work, no? That was my reading of "37.16.3 Pixel Specification for Spaces" in the elisp manual. From: Noam Postavsky > For a self-contained example do "emacs -Q overlay.el -f eval-buffer -f > set-mark-command -f move-end-of-line" with attached overlay.el. By the way, I noticed this is wrong (for some reason it works in 24.5 even though functions are being called with the wrong number of arguments), it should be called like emacs -Q overlay.el --eval "(progn (switch-to-buffer \"overlay.el\") (eval-buffer) (set-mark-command nil) (move-end-of-line nil))"