From unknown Sun Aug 17 22:01:27 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#21468 <21468@debbugs.gnu.org> To: bug#21468 <21468@debbugs.gnu.org> Subject: Status: 24.5; When next-line (visual) crosses overlay with before-string="\n" point goes to column 0 Reply-To: bug#21468 <21468@debbugs.gnu.org> Date: Mon, 18 Aug 2025 05:01:27 +0000 retitle 21468 24.5; When next-line (visual) crosses overlay with before-str= ing=3D"\n" point goes to column 0 reassign 21468 emacs submitter 21468 Noam Postavsky severity 21468 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 13 01:17:46 2015 Received: (at submit) by debbugs.gnu.org; 13 Sep 2015 05:17:47 +0000 Received: from localhost ([127.0.0.1]:58611 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zazfe-0007aF-Ka for submit@debbugs.gnu.org; Sun, 13 Sep 2015 01:17:46 -0400 Received: from eggs.gnu.org ([208.118.235.92]:55407) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zazfc-0007a8-JU for submit@debbugs.gnu.org; Sun, 13 Sep 2015 01:17:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zazfb-0006hE-Hk for submit@debbugs.gnu.org; Sun, 13 Sep 2015 01:17:44 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:47684) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zazfb-0006hA-ER for submit@debbugs.gnu.org; Sun, 13 Sep 2015 01:17:43 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37179) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zazfa-0005rs-ED for bug-gnu-emacs@gnu.org; Sun, 13 Sep 2015 01:17:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZazfZ-0006gM-Kv for bug-gnu-emacs@gnu.org; Sun, 13 Sep 2015 01:17:42 -0400 Received: from mail-wi0-x230.google.com ([2a00:1450:400c:c05::230]:35450) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZazfZ-0006fk-E1 for bug-gnu-emacs@gnu.org; Sun, 13 Sep 2015 01:17:41 -0400 Received: by wicge5 with SMTP id ge5so104313584wic.0 for ; Sat, 12 Sep 2015 22:17:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:message-id:subject:from:to:content-type; bh=uvZV5M+VhjKvkRydct63jAjO/FIRFRMAcRfn+fiAvCc=; b=vqG4Fytiu8p7qpxo6IR7ttXsYDYRzkx/Vc5cEAyUmTg1QyUF64ur1sAhWXcHNxaYiR cXiXcgQk1X2xv/NTAeO7+kqBluc//Yfjg39tDwCUcsf1nQZmFZDc6keqLQgMRkwE8KuJ EIO8J+t5T6/DvsJ9zPJyVqtzdzuTwmrrB+qQjThuE2moz1DTckTwn6WLkK51+8ZYner2 euv5/NzoyoIS4a+jeVOVAUGwNuoKcHVM3JQzzGg7tC5I5rMIAN8YnTz9OQGB0bAKJabl yra9Sya3xSGFM/R6ugvrIJ7Opxkdmt//CH3+tF5EjpuDua3riXXJ0YBQefq+u7BnIzjZ WYBQ== MIME-Version: 1.0 X-Received: by 10.180.96.164 with SMTP id dt4mr13289993wib.53.1442121459719; Sat, 12 Sep 2015 22:17:39 -0700 (PDT) Received: by 10.28.210.82 with HTTP; Sat, 12 Sep 2015 22:17:39 -0700 (PDT) Date: Sun, 13 Sep 2015 01:17:39 -0400 X-Google-Sender-Auth: 5DPwOJgotE1L3Hsgd0I-ZLXHlC0 Message-ID: Subject: 24.5; When next-line (visual) crosses overlay with before-string="\n" point goes to column 0 From: Noam Postavsky To: bug-gnu-emacs@gnu.org Content-Type: text/plain; charset=UTF-8 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) Run emacs -Q next-line-fail.el -l next-line-fail.el where next-line-fail.el contains (let ((pos 17)) (goto-char pos) (overlay-put (make-overlay pos (1+ pos)) 'before-string (propertize "\n" 'face 'highlight))) The overlay will create a highlighted blank line below line 1. Move point forward so it's on line 1, column X (where X != 0), then do C-n (next-line). Expected: point should be on line 2 column X. Actual: point goes to line 2, but in column 0. Note that hitting C-n a second time goes to line 3 column X. The problem does not happen with (setq line-move-visual nil). I've reproduced this in GUI and terminal. This is a simplification from a magit bug https://github.com/magit/magit/issues/2094 From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 13 06:32:00 2015 Received: (at 21468) by debbugs.gnu.org; 13 Sep 2015 10:32:01 +0000 Received: from localhost ([127.0.0.1]:58693 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zb4Zk-0006XH-Cu for submit@debbugs.gnu.org; Sun, 13 Sep 2015 06:32:00 -0400 Received: from mtaout22.012.net.il ([80.179.55.172]:56613) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zb4Zh-0006X7-L7 for 21468@debbugs.gnu.org; Sun, 13 Sep 2015 06:31:59 -0400 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0NUM00A002I4SC00@a-mtaout22.012.net.il> for 21468@debbugs.gnu.org; Sun, 13 Sep 2015 13:30:55 +0300 (IDT) Received: from HOME-C4E4A596F7 ([84.94.185.246]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NUM00AOX2JJGQA0@a-mtaout22.012.net.il>; Sun, 13 Sep 2015 13:30:55 +0300 (IDT) Date: Sun, 13 Sep 2015 13:30:52 +0300 From: Eli Zaretskii Subject: Re: bug#21468: 24.5; When next-line (visual) crosses overlay with before-string="\n" point goes to column 0 In-reply-to: X-012-Sender: halo1@inter.net.il To: Noam Postavsky Message-id: <834miybogz.fsf@gnu.org> References: X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 21468 Cc: 21468@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Sun, 13 Sep 2015 01:17:39 -0400 > From: Noam Postavsky > > Run > > emacs -Q next-line-fail.el -l next-line-fail.el > > where next-line-fail.el contains > > (let ((pos 17)) > (goto-char pos) > (overlay-put (make-overlay pos (1+ pos)) 'before-string > (propertize "\n" 'face 'highlight))) > > The overlay will create a highlighted blank line below line 1. > Move point forward so it's on line 1, column X (where X != 0), then do > C-n (next-line). > > Expected: point should be on line 2 column X. > Actual: point goes to line 2, but in column 0. Note that hitting C-n > a second time goes to line 3 column X. Fixed in commit 6514b30 on master. Once again, I must respectfully request that Magit maintainers refrain from these practices of (ab)using Emacs display features where simpler alternatives are readily available. The buffer displayed by Magit is entirely ephemeral, i.e. does not come from any file, so a much simpler way would be to arrange the text in that buffer as Magit needs, instead of using overlays and display strings to show something that is not in the buffer. E.g., in this fragment, cited by the Magit issue: (ov rend (1+ rend) 'after-string (propertize (concat (propertize "\s" 'display '(space :height (1))) (propertize "\n" 'line-height t)) 'face 'magit-diff-lines-boundary))) why can't Magit simply change the buffer text to be what it wants to display? why does it need to use an overlay string? All those text properties are supported on buffer text as well. Overlay strings and display strings with embedded newlines are especially painful wrt vertical cursor motion; changing the buffer text instead to present the same display makes vertical motion's job much simpler. The Emacs display engine was not designed for too heavy use of these features. By over-using them, you make Magit much less stable than necessary, certainly much less future-proof and consistent across different Emacs releases. Please don't. From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 13 13:20:08 2015 Received: (at 21468-done) by debbugs.gnu.org; 13 Sep 2015 17:20:08 +0000 Received: from localhost ([127.0.0.1]:59205 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZbAwh-0000jw-TQ for submit@debbugs.gnu.org; Sun, 13 Sep 2015 13:20:08 -0400 Received: from mail-wi0-f178.google.com ([209.85.212.178]:36612) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZbAwf-0000jo-II for 21468-done@debbugs.gnu.org; Sun, 13 Sep 2015 13:20:06 -0400 Received: by wicgb1 with SMTP id gb1so114436075wic.1 for <21468-done@debbugs.gnu.org>; Sun, 13 Sep 2015 10:20:05 -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=WY/q0LeIX8aHdIqo7aKrdTh1MTX0E9zcDIkG5CjF6xs=; b=lGAudnJp9k3ogNy+zz7yiHSWu4sbsyXxgbcfr2sSQHULo4QR7nv/cgf0R4EAhR5Cpb PqsplLXjrQ28bKVjD8q+YylNGPxVRo2sB4dzDwbqbVVTq/L2lZ3BAFR5A0/TOkhtyHAm cfE8lZSCYufXd3HsICFqJmfwz5M08KWd6y0r817ec2d6QI4vf/uHpfb7rrlwqtn7ORrB 82o3LpaPO5wfKrSnJdus2VNUnb/28st+mybOa/rlLUV403+Zyyv7yOLSLmDdFXcxB5Nf NVwnAzLnaW+J3EEpmyacBxr+DL4X+RFk+4Xklql8P0//qrB6ABgixUgeSWnOL3Bh7EQ9 wwIA== MIME-Version: 1.0 X-Received: by 10.194.21.230 with SMTP id y6mr21252429wje.132.1442164805015; Sun, 13 Sep 2015 10:20:05 -0700 (PDT) Received: by 10.28.210.82 with HTTP; Sun, 13 Sep 2015 10:20:04 -0700 (PDT) In-Reply-To: <834miybogz.fsf@gnu.org> References: <834miybogz.fsf@gnu.org> Date: Sun, 13 Sep 2015 13:20:04 -0400 X-Google-Sender-Auth: e3jKG-fHnMOxnjSb4Z1RQviQztY Message-ID: Subject: Re: bug#21468: 24.5; When next-line (visual) crosses overlay with before-string="\n" point goes to column 0 From: Noam Postavsky To: Eli Zaretskii Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21468-done Cc: 21468-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On Sun, Sep 13, 2015 at 6:30 AM, Eli Zaretskii wrote: > Fixed in commit 6514b30 on master. Thanks, it works. > why can't Magit simply change the buffer text to be what it wants to > display? why does it need to use an overlay string? In this particular case, the overlays are delimiting a "magit region" (consisting of whole logical lines touched by Emacs' region), having them as actual text in the buffer would interfere with point movement even more. Or at least, that's what I saw when I tried just now to do something similar with text properties: (with-current-buffer (get-buffer-create "*text property test*") (erase-buffer) (insert-file "next-line-fail.el") (let ((pos 65)) (goto-char pos) (insert (propertize (concat (propertize "\s" 'display '(space :height (1))) (propertize "\n" 'line-height t)) 'face 'highlight)) (pop-to-buffer (current-buffer)))) From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 13 15:50:09 2015 Received: (at 21468) by debbugs.gnu.org; 13 Sep 2015 19:50:09 +0000 Received: from localhost ([127.0.0.1]:59284 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZbDHt-00064Z-19 for submit@debbugs.gnu.org; Sun, 13 Sep 2015 15:50:09 -0400 Received: from mtaout26.012.net.il ([80.179.55.182]:57495) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZbDHp-00064O-Bo for 21468@debbugs.gnu.org; Sun, 13 Sep 2015 15:50:06 -0400 Received: from conversion-daemon.mtaout26.012.net.il by mtaout26.012.net.il (HyperSendmail v2007.08) id <0NUM00G00RS4Z300@mtaout26.012.net.il> for 21468@debbugs.gnu.org; Sun, 13 Sep 2015 22:52:29 +0300 (IDT) Received: from HOME-C4E4A596F7 ([84.94.185.246]) by mtaout26.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NUM00CO5SJHKI50@mtaout26.012.net.il>; Sun, 13 Sep 2015 22:52:29 +0300 (IDT) Date: Sun, 13 Sep 2015 22:50:01 +0300 From: Eli Zaretskii Subject: Re: bug#21468: 24.5; When next-line (visual) crosses overlay with before-string="\n" point goes to column 0 In-reply-to: X-012-Sender: halo1@inter.net.il To: Noam Postavsky Message-id: <83zj0q9k0m.fsf@gnu.org> References: <834miybogz.fsf@gnu.org> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 21468 Cc: 21468@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Sun, 13 Sep 2015 13:20:04 -0400 > From: Noam Postavsky > Cc: 21468-done@debbugs.gnu.org > > > why can't Magit simply change the buffer text to be what it wants to > > display? why does it need to use an overlay string? > > In this particular case, the overlays are delimiting a "magit region" > (consisting of whole logical lines touched by Emacs' region), having > them as actual text in the buffer would interfere with point movement > even more. Sorry, I don't understand: how can buffer contents interfere with cursor motion? > Or at least, that's what I saw when I tried just now to do something > similar with text properties: > > (with-current-buffer (get-buffer-create "*text property test*") > (erase-buffer) > (insert-file "next-line-fail.el") > (let ((pos 65)) > (goto-char pos) > (insert (propertize (concat (propertize "\s" 'display '(space :height (1))) > (propertize "\n" 'line-height t)) > 'face 'highlight)) > (pop-to-buffer (current-buffer)))) Please elaborate: what problems do you wee in this example? From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 13 16:22:13 2015 Received: (at 21468) by debbugs.gnu.org; 13 Sep 2015 20:22:13 +0000 Received: from localhost ([127.0.0.1]:59308 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZbDmv-0006ou-5D for submit@debbugs.gnu.org; Sun, 13 Sep 2015 16:22:13 -0400 Received: from mail-wi0-f170.google.com ([209.85.212.170]:33523) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZbDmt-0006om-Dc for 21468@debbugs.gnu.org; Sun, 13 Sep 2015 16:22:12 -0400 Received: by wiclk2 with SMTP id lk2so117284761wic.0 for <21468@debbugs.gnu.org>; Sun, 13 Sep 2015 13:22:10 -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=X4AvIfyRssu0U+nikfjOW220xh0Nz1+32KxOP1S2cYE=; b=sKPs37xySpAfAGLFa1Vm4Y6wGmrSNl/SusL4KO27p8jhoZEF4bSip9OpPTmmbXWQfQ doBHq0G+izy9LGCEfUvXfK/tLzkdzsWUk1gXKiMVsmc1SxQo5a46/Id5Kd8frwzOPE4c OYPWTTqnaxLLV5tKYe1b9AdnzGP6USVSeXtOE1g9+ZaVi1V4KQmbbjyFev3VDUvbQjFi c+1GQNOu8OxCu9jv6hHP/XPNC7awY3IngRt6uB7uDg2MXaICSgzCewMnyXJMfxSh1euI XZ/tYm+Nw/McSeoIGrwCHCRZFhE/SdHcE/yshcOvn7h4I4S4+WGHqYkC9hhtAzRvsIi7 L5qA== MIME-Version: 1.0 X-Received: by 10.194.58.71 with SMTP id o7mr21307399wjq.82.1442175730839; Sun, 13 Sep 2015 13:22:10 -0700 (PDT) Received: by 10.28.210.82 with HTTP; Sun, 13 Sep 2015 13:22:10 -0700 (PDT) In-Reply-To: <83zj0q9k0m.fsf@gnu.org> References: <834miybogz.fsf@gnu.org> <83zj0q9k0m.fsf@gnu.org> Date: Sun, 13 Sep 2015 16:22:10 -0400 X-Google-Sender-Auth: augA3LZ03Gg6x4sHJXfHtWmRe8g Message-ID: Subject: Re: bug#21468: 24.5; When next-line (visual) crosses overlay with before-string="\n" point goes to column 0 From: Noam Postavsky To: Eli Zaretskii Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21468 Cc: 21468@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On Sun, Sep 13, 2015 at 3:50 PM, Eli Zaretskii wrote: >> >> (with-current-buffer (get-buffer-create "*text property test*") >> (erase-buffer) >> (insert-file "next-line-fail.el") >> (let ((pos 65)) >> (goto-char pos) >> (insert (propertize (concat (propertize "\s" 'display '(space :height (1))) >> (propertize "\n" 'line-height t)) >> 'face 'highlight)) >> (pop-to-buffer (current-buffer)))) > > Please elaborate: what problems do you see in this example? With point on line 1 (preceding the thin line), doing next-line ends up inside the thin line, rather than after it. From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 14 02:18:09 2015 Received: (at 21468) by debbugs.gnu.org; 14 Sep 2015 06:18:09 +0000 Received: from localhost ([127.0.0.1]:59458 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZbN5c-0003T4-S3 for submit@debbugs.gnu.org; Mon, 14 Sep 2015 02:18:09 -0400 Received: from mtaout22.012.net.il ([80.179.55.172]:53155) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZbN5b-0003Sv-4y for 21468@debbugs.gnu.org; Mon, 14 Sep 2015 02:18:08 -0400 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0NUN00I00LFOLQ00@a-mtaout22.012.net.il> for 21468@debbugs.gnu.org; Mon, 14 Sep 2015 09:17:49 +0300 (IDT) Received: from HOME-C4E4A596F7 ([84.94.185.246]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NUN00IJILHO8870@a-mtaout22.012.net.il>; Mon, 14 Sep 2015 09:17:49 +0300 (IDT) Date: Mon, 14 Sep 2015 09:17:47 +0300 From: Eli Zaretskii Subject: Re: bug#21468: 24.5; When next-line (visual) crosses overlay with before-string="\n" point goes to column 0 In-reply-to: X-012-Sender: halo1@inter.net.il To: Noam Postavsky Message-id: <83twqxa5is.fsf@gnu.org> References: <834miybogz.fsf@gnu.org> <83zj0q9k0m.fsf@gnu.org> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 21468 Cc: 21468@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Sun, 13 Sep 2015 16:22:10 -0400 > From: Noam Postavsky > Cc: 21468@debbugs.gnu.org > > On Sun, Sep 13, 2015 at 3:50 PM, Eli Zaretskii wrote: > >> > >> (with-current-buffer (get-buffer-create "*text property test*") > >> (erase-buffer) > >> (insert-file "next-line-fail.el") > >> (let ((pos 65)) > >> (goto-char pos) > >> (insert (propertize (concat (propertize "\s" 'display '(space :height (1))) > >> (propertize "\n" 'line-height t)) > >> 'face 'highlight)) > >> (pop-to-buffer (current-buffer)))) > > > > Please elaborate: what problems do you see in this example? > > With point on line 1 (preceding the thin line), doing next-line ends > up inside the thin line, rather than after it. Of course: that's a line of text. Why is that a problem? (I have no idea what role is that thin line serving in Magit.) Do you see any other issues with cursor motion? I don't. From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 14 08:47:01 2015 Received: (at 21468) by debbugs.gnu.org; 14 Sep 2015 12:47:01 +0000 Received: from localhost ([127.0.0.1]:59735 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZbT9w-0005Hw-L5 for submit@debbugs.gnu.org; Mon, 14 Sep 2015 08:47:01 -0400 Received: from mail-wi0-f180.google.com ([209.85.212.180]:36004) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZbT9u-0005Ho-QK for 21468@debbugs.gnu.org; Mon, 14 Sep 2015 08:46:59 -0400 Received: by wicgb1 with SMTP id gb1so140242986wic.1 for <21468@debbugs.gnu.org>; Mon, 14 Sep 2015 05:46:57 -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=x/xJsn5ciF89CWkcElO+dJaxJwMsVay+1sQ9Kmq7vps=; b=dQojxwPQ0aZvNQXu7Xkv8/A4xkWEQ/aB4epGu8NnBcvRX1apG4hDtPkuwsFl7NDzz6 gcoqdAsFR8b+HJqnnMJDZUynvr9N2WW0imAaBthIEEmIdbEfwRthNyxgLeNJ2l1GXcCL RN66edbsLi3GZkVsjHZZ9pEDiBA/EKqFNOQ1KZ/z79iO65S3t0LeTXU00zGS49JBjfgw +uubBPuk1/TZc8iyBXcptRFkCdUBwMTmKXYoPCU1HxhXCCpT1rbCdMwN9r04L8I6nUze JuPOjclt1AzF8gwmuV4TU9XZX72635f7x5slbDwiRQJBUImf75bXLGUdQigZoFLL0Ifh 4ZYQ== MIME-Version: 1.0 X-Received: by 10.194.20.161 with SMTP id o1mr29445628wje.32.1442234817874; Mon, 14 Sep 2015 05:46:57 -0700 (PDT) Received: by 10.28.210.82 with HTTP; Mon, 14 Sep 2015 05:46:57 -0700 (PDT) In-Reply-To: <83twqxa5is.fsf@gnu.org> References: <834miybogz.fsf@gnu.org> <83zj0q9k0m.fsf@gnu.org> <83twqxa5is.fsf@gnu.org> Date: Mon, 14 Sep 2015 08:46:57 -0400 X-Google-Sender-Auth: UCMDDoC9RBobFy_25yncNODGT0k Message-ID: Subject: Re: bug#21468: 24.5; When next-line (visual) crosses overlay with before-string="\n" point goes to column 0 From: Noam Postavsky To: Eli Zaretskii Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21468 Cc: 21468@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On Mon, Sep 14, 2015 at 2:17 AM, Eli Zaretskii wrote: > > Of course: that's a line of text. Why is that a problem? (I have no > idea what role is that thin line serving in Magit.) In this particular case, the overlays are delimiting a "magit region" (consisting of whole logical lines touched by Emacs' region). This means the thin line has to move with point, staying just ahead of it. Here is a demo, eval this in a buffer, then do set-mark-command and move around a bit: (require 'cl-lib) (defvar-local magit-region-overlays nil) (defun 21468-update-hunk-region (start end window rol) (mapc #'delete-overlay magit-region-overlays) (let ((rbeg (save-excursion (goto-char (region-beginning)) (line-beginning-position))) (rend (save-excursion (goto-char (region-end)) (line-end-position)))) (cl-flet ((ov (start end &rest args) (let ((ov (make-overlay start end nil t))) (overlay-put ov 'evaporate t) (while args (overlay-put ov (pop args) (pop args))) (push ov magit-region-overlays) ov))) (ov rbeg (1+ rbeg) 'before-string (propertize (concat (propertize "\s" 'display '(space :height (1))) (propertize "\n" 'line-height t)) 'face 'highlight)) (ov rend (1+ rend) 'after-string (propertize (concat (propertize "\s" 'display '(space :height (1))) (propertize "\n" 'line-height t)) 'face 'highlight))))) (setq-local redisplay-highlight-region-function '21468-update-hunk-region) (setq-local redisplay-unhighlight-region-function (lambda (rol) (mapc #'delete-overlay magit-region-overlays))) From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 14 09:22:52 2015 Received: (at 21468) by debbugs.gnu.org; 14 Sep 2015 13:22:52 +0000 Received: from localhost ([127.0.0.1]:59751 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZbTid-00065n-RO for submit@debbugs.gnu.org; Mon, 14 Sep 2015 09:22:52 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:32573) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZbTib-00065f-F1 for 21468@debbugs.gnu.org; Mon, 14 Sep 2015 09:22:50 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0CtCwA731xV/0jo92hcgxCEAsEMCYdLBAICgTw5FAEBAQEBAQGBCkEFg10BAQMBViMFCwsOJgcLFBgNJIg3CM8jAQEBAQYBAQEBHos6hQUHhC0FtQQjgWZVgVkigngBAQE X-IPAS-Result: A0CtCwA731xV/0jo92hcgxCEAsEMCYdLBAICgTw5FAEBAQEBAQGBCkEFg10BAQMBViMFCwsOJgcLFBgNJIg3CM8jAQEBAQYBAQEBHos6hQUHhC0FtQQjgWZVgVkigngBAQE X-IronPort-AV: E=Sophos;i="5.13,465,1427774400"; d="scan'208";a="164786410" Received: from 104-247-232-72.cpe.teksavvy.com (HELO ceviche.home) ([104.247.232.72]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 14 Sep 2015 09:22:48 -0400 Received: by ceviche.home (Postfix, from userid 20848) id CA14866110; Mon, 14 Sep 2015 09:22:44 -0400 (EDT) From: Stefan Monnier To: Noam Postavsky Subject: Re: bug#21468: 24.5; When next-line (visual) crosses overlay with before-string="\n" point goes to column 0 Message-ID: References: <834miybogz.fsf@gnu.org> <83zj0q9k0m.fsf@gnu.org> <83twqxa5is.fsf@gnu.org> Date: Mon, 14 Sep 2015 09:22:44 -0400 In-Reply-To: (Noam Postavsky's message of "Mon, 14 Sep 2015 08:46:57 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 21468 Cc: 21468@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > In this particular case, the overlays are delimiting a "magit region" > (consisting of whole logical lines touched by Emacs' region). This > means the thin line has to move with point, staying just ahead of it. While I think I can see why you'd do it that way in earlier Emacsen, I think the better way to do it nowadays is to simply arrange for the region highlighting to extend to to whole lines. You can do that with redisplay-(un)highlight-region-function, which was introduced to allow rectangular-region-highlighting. Stefan From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 14 09:33:41 2015 Received: (at 21468) by debbugs.gnu.org; 14 Sep 2015 13:33:41 +0000 Received: from localhost ([127.0.0.1]:59756 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZbTt6-0006NO-UP for submit@debbugs.gnu.org; Mon, 14 Sep 2015 09:33:41 -0400 Received: from mtaout23.012.net.il ([80.179.55.175]:40616) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZbTt0-0006NA-Cu for 21468@debbugs.gnu.org; Mon, 14 Sep 2015 09:33:35 -0400 Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0NUO0000059W0H00@a-mtaout23.012.net.il> for 21468@debbugs.gnu.org; Mon, 14 Sep 2015 16:33:32 +0300 (IDT) Received: from HOME-C4E4A596F7 ([84.94.185.246]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NUO00MKT5NVS690@a-mtaout23.012.net.il>; Mon, 14 Sep 2015 16:33:31 +0300 (IDT) Date: Mon, 14 Sep 2015 16:33:30 +0300 From: Eli Zaretskii Subject: Re: bug#21468: 24.5; When next-line (visual) crosses overlay with before-string="\n" point goes to column 0 In-reply-to: X-012-Sender: halo1@inter.net.il To: Noam Postavsky Message-id: <83613d9lcl.fsf@gnu.org> References: <834miybogz.fsf@gnu.org> <83zj0q9k0m.fsf@gnu.org> <83twqxa5is.fsf@gnu.org> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 21468 Cc: 21468@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Mon, 14 Sep 2015 08:46:57 -0400 > From: Noam Postavsky > Cc: 21468@debbugs.gnu.org > > On Mon, Sep 14, 2015 at 2:17 AM, Eli Zaretskii wrote: > > > > Of course: that's a line of text. Why is that a problem? (I have no > > idea what role is that thin line serving in Magit.) > > In this particular case, the overlays are delimiting a "magit region" > (consisting of whole logical lines touched by Emacs' region). This > means the thin line has to move with point, staying just ahead of it. What's wrong with marking the region with some special background color? Anyway, if you must use overlays here, by all means do, just try to avoid newlines in its strings, if you want reliable cursor movement across that overlay. Please understand: what you originally perceived as a "bug" was actually normal Emacs routine of placing point immediately after the end of the overlay string. It ended up in column zero because the overlay string ended in a newline. If there were no newline, the problem would not have happened. We now have special code in vertical-motion that caters to this specific scenario. That's why using such overlay strings should be discouraged: they tend to force us add similar special-case code all over the place. > Here is a demo, eval this in a buffer, then do set-mark-command and > move around a bit: What am I supposed to see? I see nothing that I don't see without this. From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 14 09:56:06 2015 Received: (at 21468) by debbugs.gnu.org; 14 Sep 2015 13:56:06 +0000 Received: from localhost ([127.0.0.1]:60362 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZbUEo-0007GB-CB for submit@debbugs.gnu.org; Mon, 14 Sep 2015 09:56:06 -0400 Received: from mail-wi0-f169.google.com ([209.85.212.169]:35268) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZbUEl-0007Fc-4Y for 21468@debbugs.gnu.org; Mon, 14 Sep 2015 09:56:03 -0400 Received: by wicge5 with SMTP id ge5so144008281wic.0 for <21468@debbugs.gnu.org>; Mon, 14 Sep 2015 06:55:57 -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=l9XRKk+m4UJ0ddkphwvL2u1UVo22ohOaiUfJUF5knbg=; b=J4tXjTVTji5bsDqYKCdH/m9HXKHkebnxmqFsBtr5NP3IeibZ0KKvD4GmrXvFMakr1G rS074NT0RCU8UX9ln31seMhLxes5trm2WbaDVmLcBHvaOUiMtO2vtE6OWx5VS+fwyWqE kvJBfN3+YueYJ+dqmuZXrknN9hCFCciSXhVrXdvAQRzmwGQPLRIMS7xSfe53xZ67HnVG OEg8MCxB53bulBGyI5g8OpRsXE9XWajGxBrJ0CRyZPJR03yo9Q8GWBtww3lCT3frOPgh 1mNJiIjQ34/Hy01PRXw9eSmdy4lcWRdinZZ6ks4B0AFyfZkT+845AsfSATiUyN9CDCrx YKvg== MIME-Version: 1.0 X-Received: by 10.194.21.230 with SMTP id y6mr31142527wje.132.1442238957326; Mon, 14 Sep 2015 06:55:57 -0700 (PDT) Received: by 10.28.210.82 with HTTP; Mon, 14 Sep 2015 06:55:57 -0700 (PDT) In-Reply-To: <83613d9lcl.fsf@gnu.org> References: <834miybogz.fsf@gnu.org> <83zj0q9k0m.fsf@gnu.org> <83twqxa5is.fsf@gnu.org> <83613d9lcl.fsf@gnu.org> Date: Mon, 14 Sep 2015 09:55:57 -0400 X-Google-Sender-Auth: RPpFGCl7ShhW94rr3yDNLLQoqcU Message-ID: Subject: Re: bug#21468: 24.5; When next-line (visual) crosses overlay with before-string="\n" point goes to column 0 From: Noam Postavsky To: Eli Zaretskii Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21468 Cc: 21468@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On Mon, Sep 14, 2015 at 9:33 AM, Eli Zaretskii wrote: > What's wrong with marking the region with some special background > color? I saw the fix you applied, and I certainly understand your distaste at adding these special cases, but I don't want to start debating the aesthetics now. > > What am I supposed to see? I see nothing that I don't see without > this. In that buffer, after evaluating its code, when region is active you should see 2 highlighted thin lines delimiting the region, instead of the normal region highlight. From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 14 11:15:06 2015 Received: (at 21468) by debbugs.gnu.org; 14 Sep 2015 15:15:06 +0000 Received: from localhost ([127.0.0.1]:60425 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZbVTF-00018R-SF for submit@debbugs.gnu.org; Mon, 14 Sep 2015 11:15:06 -0400 Received: from mtaout26.012.net.il ([80.179.55.182]:48755) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZbVTD-00018E-LI for 21468@debbugs.gnu.org; Mon, 14 Sep 2015 11:15:04 -0400 Received: from conversion-daemon.mtaout26.012.net.il by mtaout26.012.net.il (HyperSendmail v2007.08) id <0NUO00I00AF7JF00@mtaout26.012.net.il> for 21468@debbugs.gnu.org; Mon, 14 Sep 2015 18:16:54 +0300 (IDT) Received: from HOME-C4E4A596F7 ([84.94.185.246]) by mtaout26.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NUO00HGYAG67B10@mtaout26.012.net.il>; Mon, 14 Sep 2015 18:16:54 +0300 (IDT) Date: Mon, 14 Sep 2015 18:14:27 +0300 From: Eli Zaretskii Subject: Re: bug#21468: 24.5; When next-line (visual) crosses overlay with before-string="\n" point goes to column 0 In-reply-to: X-012-Sender: halo1@inter.net.il To: Noam Postavsky Message-id: <831te19goc.fsf@gnu.org> References: <834miybogz.fsf@gnu.org> <83zj0q9k0m.fsf@gnu.org> <83twqxa5is.fsf@gnu.org> <83613d9lcl.fsf@gnu.org> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 21468 Cc: 21468@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Mon, 14 Sep 2015 09:55:57 -0400 > From: Noam Postavsky > Cc: 21468@debbugs.gnu.org > > On Mon, Sep 14, 2015 at 9:33 AM, Eli Zaretskii wrote: > > What's wrong with marking the region with some special background > > color? > > I saw the fix you applied, and I certainly understand your distaste at > adding these special cases, but I don't want to start debating the > aesthetics now. It's not the aesthetics I'm worried about, it's maintainability. I had the dubious pleasure of writing most of those special-case parts, and I'm already beginning to have difficulty remembering what use case does each one cater to, and how to make sure I don't break it by some change. How can we expect others to make changes in such a mess? > > What am I supposed to see? I see nothing that I don't see without > > this. > > In that buffer, after evaluating its code, when region is active you > should see 2 highlighted thin lines delimiting the region, instead of > the normal region highlight. I think Stefan suggested a way to achieve this without all this complexity. I hope it will be possible. From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 14 16:50:12 2015 Received: (at 21468) by debbugs.gnu.org; 14 Sep 2015 20:50:13 +0000 Received: from localhost ([127.0.0.1]:60619 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZbahY-0001rs-LN for submit@debbugs.gnu.org; Mon, 14 Sep 2015 16:50:12 -0400 Received: from mail-wi0-f169.google.com ([209.85.212.169]:34924) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZbahW-0001rk-Tg for 21468@debbugs.gnu.org; Mon, 14 Sep 2015 16:50:11 -0400 Received: by wicge5 with SMTP id ge5so1426910wic.0 for <21468@debbugs.gnu.org>; Mon, 14 Sep 2015 13:50:10 -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=ejt9LWKTDWOqYRumB/uqkF2YfhPbJHLQicQTrqCAY44=; b=k9s6FLS8vtY4thekL1dtvk75dK4b9qgOBiW+EHvKHvIiTNXlUSO3ZA9QANJysB3wet Q3OuHuuE/Gkab4c/6fz4hepxvPVJaYH5cPZRtflhRcfyUpFMBDJolsilj19b7Wyt9wXl +VroZRBtSNfqi5Z0kYn/VsgCSu3mmVXu85V2eQisK+dhv0C6zSBEfc9Hvjk2a4iUgp+Q A+kW6dtzj049sf3xjjerffHxNsH9VbDaxD0jcT1ZjbZTTKnlQyaeTPLcxj8+tWxNGc4m evBCbAmtpHiROLZybvJu8J8NmklyYVlZambZ32xDNEE2sApsWklgAkt/pe6Lm4KW92og 2R2Q== MIME-Version: 1.0 X-Received: by 10.194.21.230 with SMTP id y6mr248025wje.132.1442263810179; Mon, 14 Sep 2015 13:50:10 -0700 (PDT) Received: by 10.28.210.82 with HTTP; Mon, 14 Sep 2015 13:50:10 -0700 (PDT) In-Reply-To: <831te19goc.fsf@gnu.org> References: <834miybogz.fsf@gnu.org> <83zj0q9k0m.fsf@gnu.org> <83twqxa5is.fsf@gnu.org> <83613d9lcl.fsf@gnu.org> <831te19goc.fsf@gnu.org> Date: Mon, 14 Sep 2015 16:50:10 -0400 X-Google-Sender-Auth: 69Pnvter5lGypWo3Ezjx0J3zFQA Message-ID: Subject: Re: bug#21468: 24.5; When next-line (visual) crosses overlay with before-string="\n" point goes to column 0 From: Noam Postavsky To: Eli Zaretskii Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21468 Cc: 21468@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On Mon, Sep 14, 2015 at 9:22 AM, Stefan Monnier wrote: > I think the better way to do it nowadays is to simply arrange for the > region highlighting to extend to to whole lines. On Mon, Sep 14, 2015 at 11:14 AM, Eli Zaretskii wrote: >> Date: Mon, 14 Sep 2015 09:55:57 -0400 >> From: Noam Postavsky >> In that buffer, after evaluating its code, when region is active you >> should see 2 highlighted thin lines delimiting the region, instead of >> the normal region highlight. > > I think Stefan suggested a way to achieve this without all this > complexity. I hope it will be possible. If you can suggest a way to get horizontal bars that are ignored by point movement without using newlines in overlays, then great. I almost got there using :overline and :underline, but as far as I can tell, there's no way to extend the line to the edge of the screen without using an overlay with a newline. If you just want to say that the region should be shown by highlighting instead of horizontal bars, then *shrug*. From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 15 02:53:59 2015 Received: (at 21468) by debbugs.gnu.org; 15 Sep 2015 06:53:59 +0000 Received: from localhost ([127.0.0.1]:60812 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zbk7q-0007ii-KG for submit@debbugs.gnu.org; Tue, 15 Sep 2015 02:53:58 -0400 Received: from mtaout29.012.net.il ([80.179.55.185]:57873) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zbk7o-0007iZ-0l for 21468@debbugs.gnu.org; Tue, 15 Sep 2015 02:53:57 -0400 Received: from conversion-daemon.mtaout29.012.net.il by mtaout29.012.net.il (HyperSendmail v2007.08) id <0NUP00200HTIG700@mtaout29.012.net.il> for 21468@debbugs.gnu.org; Tue, 15 Sep 2015 09:54:24 +0300 (IDT) Received: from HOME-C4E4A596F7 ([84.94.185.246]) by mtaout29.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NUP001NEHUNXF00@mtaout29.012.net.il>; Tue, 15 Sep 2015 09:54:24 +0300 (IDT) Date: Tue, 15 Sep 2015 09:53:54 +0300 From: Eli Zaretskii Subject: Re: bug#21468: 24.5; When next-line (visual) crosses overlay with before-string="\n" point goes to column 0 In-reply-to: X-012-Sender: halo1@inter.net.il To: Noam Postavsky Message-id: <83r3m0896l.fsf@gnu.org> References: <834miybogz.fsf@gnu.org> <83zj0q9k0m.fsf@gnu.org> <83twqxa5is.fsf@gnu.org> <83613d9lcl.fsf@gnu.org> <831te19goc.fsf@gnu.org> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 21468 Cc: 21468@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Mon, 14 Sep 2015 16:50:10 -0400 > From: Noam Postavsky > Cc: 21468@debbugs.gnu.org > > If you can suggest a way to get horizontal bars that are ignored by > point movement without using newlines in overlays, then great. I > almost got there using :overline and :underline, but as far as I can > tell, there's no way to extend the line to the edge of the screen > without using an overlay with a newline. I think you should be able to extend the face by using a display property with :align-to value. The value should be computed to go all the way to the edge of the window. > If you just want to say that the region should be shown by > highlighting instead of horizontal bars, then *shrug*. I cannot do anything about these issues besides explaining how they harm Emacs maintenance, and asking people to look for alternative solutions. And yes, highlighting sounds like a good alternative to me. Feel free to ignore the requests, if you don't consider them important enough. From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 01 16:43:15 2015 Received: (at 21468) by debbugs.gnu.org; 1 Oct 2015 20:43:15 +0000 Received: from localhost ([127.0.0.1]:51044 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zhkh8-0004i7-Kr for submit@debbugs.gnu.org; Thu, 01 Oct 2015 16:43:15 -0400 Received: from mail-wi0-f169.google.com ([209.85.212.169]:37883) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zhkh6-0004hz-58 for 21468@debbugs.gnu.org; Thu, 01 Oct 2015 16:43:12 -0400 Received: by wicfx3 with SMTP id fx3so5965637wic.0 for <21468@debbugs.gnu.org>; Thu, 01 Oct 2015 13:43:11 -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=yyT3J44223KcyoZFpZ1/r5oWPzUHR8i/ysZIFtgyBJY=; b=DZmqWj7ASWNxmfrlAl4Mwo2sS6a5aJOvGKJCU0gq8GTM5ORTkttVjMe/DgZyYWvLmR S+4oAu02aAt9J3eQ+3Dk+tuoUog22Hml8tKA68H8YtLyHHF1tfrhL/wSnQREjk7CNMCz amI+ae8b6s/2cCtMXXkdvOBpRq2bZB3qHsELQyYb906Eugikh66digoUUUs9+lF0GXhS 7mPA9mJhutDC7YlEiSJe8nPjEseFWNW7QuSrcX0PCEVqm5z12AnHeEHZA8GFZswQoIiS CD9JvOhEyPUUbefV4QMhHdo8MSiAP2f/LumCfSH68bqXvop6DlyI5UrBXvNi8jfbNtrT 5Ksw== MIME-Version: 1.0 X-Received: by 10.180.184.201 with SMTP id ew9mr736275wic.53.1443732191540; Thu, 01 Oct 2015 13:43:11 -0700 (PDT) Received: by 10.28.210.68 with HTTP; Thu, 1 Oct 2015 13:43:11 -0700 (PDT) In-Reply-To: <83r3m0896l.fsf@gnu.org> 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> Date: Thu, 1 Oct 2015 16:43:11 -0400 X-Google-Sender-Auth: ftrc3B-TmxPTCx3SArIT9LtS3ZA Message-ID: Subject: Re: bug#21468: 24.5; When next-line (visual) crosses overlay with before-string="\n" point goes to column 0 From: Noam Postavsky To: Eli Zaretskii Content-Type: multipart/mixed; boundary=001a11c384c46d98760521111821 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21468 Cc: 21468@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --001a11c384c46d98760521111821 Content-Type: text/plain; charset=UTF-8 On Tue, Sep 15, 2015 at 2:53 AM, Eli Zaretskii wrote: > > I think you should be able to extend the face by using a display > property with :align-to value. The value should be computed to go all > the way to the edge of the window. We tried something like this: (let ((align `(space :align-to (+ (,(window-body-width nil t)) ,(window-hscroll))))) (ov rbeg eol 'face (list :overline color) 'after-string (propertize "\s" 'face face 'display align))) 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. 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. > I cannot do anything about these issues besides explaining how they > harm Emacs maintenance, and asking people to look for alternative > solutions. Well you *could* refuse to fix bugs like this, i.e. declare that creating overlays with newlines invokes undefined behaviour. As it stands, the best way to get the effect we want is to use an overlayed newline, especially now that you've fixed this bug. --001a11c384c46d98760521111821 Content-Type: application/octet-stream; name="overlay.el" Content-Disposition: attachment; filename="overlay.el" Content-Transfer-Encoding: base64 X-Attachment-Id: f_if8o49u10 KHJlcXVpcmUgJ2NsLWxpYikNCg0KKGRlZnZhci1sb2NhbCBtYWdpdC1yZWdpb24tb3ZlcmxheXMg bmlsKQ0KDQooZGVmdW4gMjE0NjgtdXBkYXRlLWh1bmstcmVnaW9uIChzdGFydCBlbmQgd2luZG93 IHJvbCkNCiAgKG1hcGMgIydkZWxldGUtb3ZlcmxheSBtYWdpdC1yZWdpb24tb3ZlcmxheXMpDQog IChjbC1mbGV0ICgob3YgKHN0YXJ0IGVuZCAmcmVzdCBhcmdzKQ0KICAgICAgICAgICAgICAgIChs ZXQgKChvdiAobWFrZS1vdmVybGF5IHN0YXJ0IGVuZCBuaWwgdCkpKQ0KICAgICAgICAgICAgICAg ICAgKHdoaWxlIGFyZ3MgKG92ZXJsYXktcHV0IG92IChwb3AgYXJncykgKHBvcCBhcmdzKSkpDQog ICAgICAgICAgICAgICAgICAocHVzaCBvdiBtYWdpdC1yZWdpb24tb3ZlcmxheXMpDQogICAgICAg ICAgICAgICAgICBvdikpKQ0KICAgIChsZXQqICgoYWxpZ24gKGxpc3QgJ3NwYWNlIDphbGlnbi10 byBgKCsgKCwod2luZG93LWJvZHktd2lkdGggbmlsIHQpKQ0KICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgLCh3aW5kb3ctaHNjcm9sbCkpKSkNCiAgICAgICAgICAg KHJiZWctbGluZSAoc2F2ZS1leGN1cnNpb24gKGdvdG8tY2hhciBzdGFydCkNCiAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgKGNvbnMgKGxpbmUtYmVnaW5uaW5nLXBvc2l0aW9u KQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAobGluZS1lbmQt cG9zaXRpb24pKSkpDQogICAgICAgICAgIChyZW5kLWxpbmUgKHNhdmUtZXhjdXJzaW9uIChnb3Rv LWNoYXIgZW5kKQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoY29ucyAo bGluZS1iZWdpbm5pbmctcG9zaXRpb24pDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIChsaW5lLWVuZC1wb3NpdGlvbikpKSkNCiAgICAgICAgICAgKGNvbG9yIChm YWNlLWJhY2tncm91bmQgJ2hpZ2hsaWdodCBuaWwgdCkpDQogICAgICAgICAgIChmYWNlICAobGlz dCA6b3ZlcmxpbmUgY29sb3IgOnVuZGVybGluZSBjb2xvcikpKQ0KICAgICAgKGlmIChlcXVhbCBy YmVnLWxpbmUgcmVuZC1saW5lKQ0KICAgICAgICAgIChvdiAoY2FyIHJiZWctbGluZSkgKGNkciBy YmVnLWxpbmUpICdmYWNlIGZhY2UNCiAgICAgICAgICAgICAgJ2FmdGVyLXN0cmluZyAocHJvcGVy dGl6ZSAiXHMiICdmYWNlIGZhY2UgJ2Rpc3BsYXkgYWxpZ24pKQ0KICAgICAgICAob3YgKGNhciBy YmVnLWxpbmUpIChjZHIgcmJlZy1saW5lKSAnZmFjZSAoc2V0cSBmYWNlIChsaXN0IDpvdmVybGlu ZSBjb2xvcikpDQogICAgICAgICAgICAnYWZ0ZXItc3RyaW5nIChwcm9wZXJ0aXplICJccyIgJ2Zh Y2UgZmFjZSAnZGlzcGxheSBhbGlnbikpDQogICAgICAgIChvdiAoY2FyIHJlbmQtbGluZSkgKGNk ciByZW5kLWxpbmUpICdmYWNlIChzZXRxIGZhY2UgKGxpc3QgOnVuZGVybGluZSBjb2xvcikpDQog ICAgICAgICAgICAnYWZ0ZXItc3RyaW5nIChwcm9wZXJ0aXplICJccyIgJ2ZhY2UgZmFjZSAnZGlz cGxheSBhbGlnbikpKSkpKQ0KDQooc2V0cS1sb2NhbCByZWRpc3BsYXktaGlnaGxpZ2h0LXJlZ2lv bi1mdW5jdGlvbiAnMjE0NjgtdXBkYXRlLWh1bmstcmVnaW9uKQ0KDQooc2V0cS1sb2NhbCByZWRp c3BsYXktdW5oaWdobGlnaHQtcmVnaW9uLWZ1bmN0aW9uDQogICAgICAgICAgICAobGFtYmRhIChy b2wpIChtYXBjICMnZGVsZXRlLW92ZXJsYXkgbWFnaXQtcmVnaW9uLW92ZXJsYXlzKSkpDQo= --001a11c384c46d98760521111821-- From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 02 06:01:50 2015 Received: (at 21468) by debbugs.gnu.org; 2 Oct 2015 10:01:50 +0000 Received: from localhost ([127.0.0.1]:51298 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zhx9y-0008OQ-8V for submit@debbugs.gnu.org; Fri, 02 Oct 2015 06:01:50 -0400 Received: from mtaout22.012.net.il ([80.179.55.172]:58523) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zhx9w-0008OI-6d for 21468@debbugs.gnu.org; Fri, 02 Oct 2015 06:01:49 -0400 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0NVL00I007NZ0B00@a-mtaout22.012.net.il> for 21468@debbugs.gnu.org; Fri, 02 Oct 2015 13:01:20 +0300 (IDT) Received: from HOME-C4E4A596F7 ([84.94.185.246]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NVL00HWE7U1UQ40@a-mtaout22.012.net.il>; Fri, 02 Oct 2015 13:01:20 +0300 (IDT) Date: Fri, 02 Oct 2015 13:01:06 +0300 From: Eli Zaretskii Subject: Re: bug#21468: 24.5; When next-line (visual) crosses overlay with before-string="\n" point goes to column 0 In-reply-to: X-012-Sender: halo1@inter.net.il To: Noam Postavsky Message-id: <837fn57fod.fsf@gnu.org> 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> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 21468 Cc: 21468@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Thu, 1 Oct 2015 16:43:11 -0400 > From: Noam Postavsky > Cc: 21468@debbugs.gnu.org > > > I think you should be able to extend the face by using a display > > property with :align-to value. The value should be computed to go all > > the way to the edge of the window. > > We tried something like this: > > (let ((align `(space :align-to (+ (,(window-body-width nil t)) > ,(window-hscroll))))) > (ov rbeg eol 'face (list :overline color) > 'after-string (propertize "\s" 'face face 'display align))) > > 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? If you dislike that, you could make the stretch one column shorter, like this: (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.) > > I cannot do anything about these issues besides explaining how they > > harm Emacs maintenance, and asking people to look for alternative > > solutions. > > Well you *could* refuse to fix bugs like this, i.e. declare that > creating overlays with newlines invokes undefined behaviour. I could, but I consider that a "doomsday weapon", hopefully never to be used in Emacs development, certainly not by me. I don't think it was ever done. From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 02 15:58:11 2015 Received: (at 21468) by debbugs.gnu.org; 2 Oct 2015 19:58:11 +0000 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 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 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== MIME-Version: 1.0 X-Received: by 10.194.115.199 with SMTP id jq7mr19875613wjb.82.1443815888178; Fri, 02 Oct 2015 12:58:08 -0700 (PDT) Received: by 10.28.210.68 with HTTP; Fri, 2 Oct 2015 12:58:08 -0700 (PDT) In-Reply-To: <837fn57fod.fsf@gnu.org> 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> Date: Fri, 2 Oct 2015 15:58:08 -0400 X-Google-Sender-Auth: Qeke2xwwAHwIhvFH1Bq2xuS0NJA Message-ID: Subject: Re: bug#21468: 24.5; When next-line (visual) crosses overlay with before-string="\n" point goes to column 0 From: Noam Postavsky To: Eli Zaretskii Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21468 Cc: 21468@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) 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))" From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 02 17:00:42 2015 Received: (at 21468) by debbugs.gnu.org; 2 Oct 2015 21:00:42 +0000 Received: from localhost ([127.0.0.1]:52484 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zi7Ra-00031P-8M for submit@debbugs.gnu.org; Fri, 02 Oct 2015 17:00:42 -0400 Received: from mtaout21.012.net.il ([80.179.55.169]:37580) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zi7RW-00031C-A4 for 21468@debbugs.gnu.org; Fri, 02 Oct 2015 17:00:39 -0400 Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0NVM00B001RQVH00@a-mtaout21.012.net.il> for 21468@debbugs.gnu.org; Sat, 03 Oct 2015 00:00:37 +0300 (IDT) Received: from HOME-C4E4A596F7 ([84.94.185.246]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NVM00BQN2D0SQ90@a-mtaout21.012.net.il>; Sat, 03 Oct 2015 00:00:36 +0300 (IDT) Date: Sat, 03 Oct 2015 00:00:30 +0300 From: Eli Zaretskii Subject: Re: bug#21468: 24.5; When next-line (visual) crosses overlay with before-string="\n" point goes to column 0 In-reply-to: X-012-Sender: halo1@inter.net.il To: Noam Postavsky Message-id: <83zj013s0h.fsf@gnu.org> 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> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 21468 Cc: 21468@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Fri, 2 Oct 2015 15:58:08 -0400 > From: Noam Postavsky > Cc: 21468@debbugs.gnu.org > > 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. If you want to put the cursor there, you need an overlay with a 'cursor' property. Or we could have a new feature whereby the stretch of white space would allow positioning the cursor on it. Right now, the flag that disallows positioning the cursor is hard-coded in the display engine. From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 09 19:34:45 2015 Received: (at 21468) by debbugs.gnu.org; 9 Oct 2015 23:34:45 +0000 Received: from localhost ([127.0.0.1]:34681 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZkhBV-0003OH-Ca for submit@debbugs.gnu.org; Fri, 09 Oct 2015 19:34:45 -0400 Received: from mail-wi0-f180.google.com ([209.85.212.180]:33416) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZkhBT-0003O9-ND for 21468@debbugs.gnu.org; Fri, 09 Oct 2015 19:34:44 -0400 Received: by wiclk2 with SMTP id lk2so89395083wic.0 for <21468@debbugs.gnu.org>; Fri, 09 Oct 2015 16:34:43 -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=vwi4vR/c7PiGR/0PhJ193FZouw/nl4jKirmFj+YRGbE=; b=R8WEz7dsmZBocfgvedR3Jz0SveoEE0/cGUNd/2iojd1HO8RI5XPEfn+IgYHPd3xSIe 70m82le3wQAUO6MV3rhy1ET0qky6K6d6Th0Gxi5gS97u/EeYlX8seBWp0OGdSUbLUIzZ 8IhBIQQ1nSMB9mUFrn3PjRhz54ktIaEeeNstXnpvnIBXgFC/Lm0CI/zjArdNEdAcOyyP E1SxRYiMHcccN7/av6/fCV4KZ0vPghYknCsaKFb9FoMC7ik+oeOaVaFPCbwk5tkF8ZVP B391W5BEMd0V7gd+rwBh3jAIlAINh5Hw2oPQZUpF4LOwq2HX/ZgLTJ7vJOgrYHS9OsJf lTbw== MIME-Version: 1.0 X-Received: by 10.180.108.162 with SMTP id hl2mr1596409wib.89.1444433683145; Fri, 09 Oct 2015 16:34:43 -0700 (PDT) Received: by 10.28.210.68 with HTTP; Fri, 9 Oct 2015 16:34:43 -0700 (PDT) In-Reply-To: <83zj013s0h.fsf@gnu.org> 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> <83zj013s0h.fsf@gnu.org> Date: Fri, 9 Oct 2015 19:34:43 -0400 X-Google-Sender-Auth: 2AfvRy8t_FlX-ASeLyZx1l7dHZ8 Message-ID: Subject: Re: bug#21468: 24.5; When next-line (visual) crosses overlay with before-string="\n" point goes to column 0 From: Noam Postavsky To: Eli Zaretskii Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21468 Cc: 21468@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 10/2/15, Eli Zaretskii wrote: > > If you want to put the cursor there, you need an overlay with a > 'cursor' property. This works nicely. But there are some other glitches. - On a truncated line with the overlay, move-end-of-line skips to the next line. (I tried to avoid this by only adding the stretched space when it's going to be visible. But that just made things worse (looping in the display engine)) - When at the end of line, next-line goes to the end-of-line instead of staying on the same column. > Or we could have a new feature whereby the stretch of white space > would allow positioning the cursor on it. Right now, the flag that > disallows positioning the cursor is hard-coded in the display engine. Could be interesting, but I don't know of any need for it at present. From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 10 03:14:38 2015 Received: (at 21468) by debbugs.gnu.org; 10 Oct 2015 07:14:38 +0000 Received: from localhost ([127.0.0.1]:34847 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZkoMX-0005g3-RQ for submit@debbugs.gnu.org; Sat, 10 Oct 2015 03:14:38 -0400 Received: from mtaout21.012.net.il ([80.179.55.169]:64603) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZkoMV-0005fq-2Z for 21468@debbugs.gnu.org; Sat, 10 Oct 2015 03:14:36 -0400 Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0NVZ00F00T5K3300@a-mtaout21.012.net.il> for 21468@debbugs.gnu.org; Sat, 10 Oct 2015 10:14:33 +0300 (IDT) Received: from HOME-C4E4A596F7 ([84.94.185.246]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NVZ00FPETG93E00@a-mtaout21.012.net.il>; Sat, 10 Oct 2015 10:14:33 +0300 (IDT) Date: Sat, 10 Oct 2015 10:14:39 +0300 From: Eli Zaretskii Subject: Re: bug#21468: 24.5; When next-line (visual) crosses overlay with before-string="\n" point goes to column 0 In-reply-to: X-012-Sender: halo1@inter.net.il To: Noam Postavsky Message-id: <83fv1jtctc.fsf@gnu.org> 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> <83zj013s0h.fsf@gnu.org> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 21468 Cc: 21468@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Fri, 9 Oct 2015 19:34:43 -0400 > From: Noam Postavsky > Cc: 21468@debbugs.gnu.org > > On 10/2/15, Eli Zaretskii wrote: > > > > If you want to put the cursor there, you need an overlay with a > > 'cursor' property. > > This works nicely. But there are some other glitches. > > - On a truncated line with the overlay, move-end-of-line skips to the > next line. (I tried to avoid this by only adding the stretched space > when it's going to be visible. But that just made things worse > (looping in the display engine)) > > - When at the end of line, next-line goes to the end-of-line instead > of staying on the same column. Are these caused by the 'cursor' property, i.e. do not happen if that property is not used? In any case, I'd appreciate a short self-contained test case for each of these two issues, as I'm not sure I understand what's going on. From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 10 09:37:49 2015 Received: (at 21468) by debbugs.gnu.org; 10 Oct 2015 13:37:49 +0000 Received: from localhost ([127.0.0.1]:34943 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZkuLM-0007ec-KY for submit@debbugs.gnu.org; Sat, 10 Oct 2015 09:37:49 -0400 Received: from mail-wi0-f178.google.com ([209.85.212.178]:35414) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZkuLH-0007eR-Vl for 21468@debbugs.gnu.org; Sat, 10 Oct 2015 09:37:44 -0400 Received: by wicge5 with SMTP id ge5so101232410wic.0 for <21468@debbugs.gnu.org>; Sat, 10 Oct 2015 06:37:43 -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=xxriY3ec+4QCsI6GkJFvpshiVfekRRvAc86HkpH8/nI=; b=LZPvSLiOWQvwro989zmyPpzt4psnkisva+GVezIpBtRruzupE5itdbI/UJ4sZbgVV9 BVG9Vy0rkvhRx2+zAi6SvVc59vdUuoq7jrCEAAtHxktilk39VoWHMZ7AkOrUBTBU4+L6 7padzO5RsCJNRDKvohh4CJxRJjR8b2je/BPeg21g55X+GQ/SSIJvDOCIHQ2nS6CxkLte oTYCvop29C+0+fG9/DkK5lquXcwOlVp8e7zKAp+clxA/OGbCzdcKbMyv9ZyVmj5SP1h9 4cMjSoQyI8L4RPpz1/L4AoV1FXcOfAgMdcd86uEjsufQ/DvHw8vLZrzBovsVzXmbE8sO Kz4Q== MIME-Version: 1.0 X-Received: by 10.194.6.66 with SMTP id y2mr9546702wjy.82.1444484263345; Sat, 10 Oct 2015 06:37:43 -0700 (PDT) Received: by 10.28.210.68 with HTTP; Sat, 10 Oct 2015 06:37:43 -0700 (PDT) In-Reply-To: <83fv1jtctc.fsf@gnu.org> 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> <83zj013s0h.fsf@gnu.org> <83fv1jtctc.fsf@gnu.org> Date: Sat, 10 Oct 2015 09:37:43 -0400 X-Google-Sender-Auth: dH7Dtf-p1hE5D9Wg_DLE3cqVVWY Message-ID: Subject: Re: bug#21468: 24.5; When next-line (visual) crosses overlay with before-string="\n" point goes to column 0 From: Noam Postavsky To: Eli Zaretskii Content-Type: multipart/mixed; boundary=047d7b5d33886685bc0521c0334c X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21468 Cc: 21468@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --047d7b5d33886685bc0521c0334c Content-Type: text/plain; charset=UTF-8 On 10/10/15, Eli Zaretskii wrote: >> Date: Fri, 9 Oct 2015 19:34:43 -0400 >> From: Noam Postavsky >> - On a truncated line with the overlay, move-end-of-line skips to the >> next line. (I tried to avoid this by only adding the stretched space >> when it's going to be visible. But that just made things worse >> (looping in the display engine)) >> >> - When at the end of line, next-line goes to the end-of-line instead >> of staying on the same column. > > Are these caused by the 'cursor' property, i.e. do not happen if that > property is not used? They're not caused by the 'cursor' property, although it makes the 2nd case more visually surprising. > > In any case, I'd appreciate a short self-contained test case for each > of these two issues, as I'm not sure I understand what's going on. > Using attached 21468-overlay.el The 1st case: emacs -Q -l 21468-overlay.el -f 21468-test-eol-skip then hit C-e. Point lands at the end of line 19 instead of the end of line 18 where it started. The 2nd case emacs -Q -l 21468-overlay.el -f 21468-test-eol-col-movement then hit C-e C-n. Point lands at the end of line 8 instead of line 8, column 33 which is what happens when there is no overlay. --047d7b5d33886685bc0521c0334c Content-Type: application/octet-stream; name="21468-overlay.el" Content-Disposition: attachment; filename="21468-overlay.el" Content-Transfer-Encoding: base64 X-Attachment-Id: file0 KGRlZmNvbnN0ICtmaWxlLW5hbWUrIGxvYWQtZmlsZS1uYW1lKQooZGVmdW4gMjE0NjgtcHV0LW92 ZXJsYXktYXQtbGluZSAobGluZSkKICAoZ290by1saW5lIGxpbmUpCiAgKGxldCAoKG92IChtYWtl LW92ZXJsYXkgKGxpbmUtYmVnaW5uaW5nLXBvc2l0aW9uKSAobGluZS1lbmQtcG9zaXRpb24pKSkK ICAgICAgICAoZmFjZSAobGlzdCA6b3ZlcmxpbmUgInJlZCIgOnVuZGVybGluZSAiZ3JlZW4iKSkp CiAgICAob3ZlcmxheS1wdXQgb3YgJ2ZhY2UgZmFjZSkKICAgIChvdmVybGF5LXB1dCBvdiAnYWZ0 ZXItc3RyaW5nCiAgICAgICAgICAgICAgICAgKHByb3BlcnRpemUgIlxzIiAnZmFjZSBmYWNlCiAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2Rpc3BsYXkgKGxpc3QgJ3NwYWNlIDphbGlnbi10 bwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGAoKyAoLCh3aW5k b3ctYm9keS13aWR0aCBuaWwgdCkpCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICwod2luZG93LWhzY3JvbGwpKSkKICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAnY3Vyc29yIHQpKSkpCihkZWZ1biAyMTQ2OC10ZXN0LWVvbC1za2lwICgpCiAgKGZpbmQt ZmlsZSArZmlsZS1uYW1lKykKICAoc2V0cSB0cnVuY2F0ZS1saW5lcyB0KQogIDs7IGxpbmUgMTgg aXMgdHJ1bmNhdGVkIChhc3N1bWluZyB3aW5kb3cgd2lkdGggPCAyMDApCiAgKDIxNDY4LXB1dC1v dmVybGF5LWF0LWxpbmUgMTgpCiAgOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7 Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7 Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7 Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OzsKICApCgoo ZGVmdW4gMjE0NjgtdGVzdC1lb2wtY29sLW1vdmVtZW50ICgpCiAgKGZpbmQtZmlsZSArZmlsZS1u YW1lKykKICAoMjE0NjgtcHV0LW92ZXJsYXktYXQtbGluZSA3KSkK --047d7b5d33886685bc0521c0334c-- From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 10 10:20:38 2015 Received: (at 21468) by debbugs.gnu.org; 10 Oct 2015 14:20:38 +0000 Received: from localhost ([127.0.0.1]:35502 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zkv0m-0000Iz-Vm for submit@debbugs.gnu.org; Sat, 10 Oct 2015 10:20:37 -0400 Received: from mtaout29.012.net.il ([80.179.55.185]:43374) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zkv0k-0000Ip-BI for 21468@debbugs.gnu.org; Sat, 10 Oct 2015 10:20:35 -0400 Received: from conversion-daemon.mtaout29.012.net.il by mtaout29.012.net.il (HyperSendmail v2007.08) id <0NW000000CUBUB00@mtaout29.012.net.il> for 21468@debbugs.gnu.org; Sat, 10 Oct 2015 17:21:35 +0300 (IDT) Received: from HOME-C4E4A596F7 ([84.94.185.246]) by mtaout29.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NW000OCCD7Z7M40@mtaout29.012.net.il>; Sat, 10 Oct 2015 17:21:35 +0300 (IDT) Date: Sat, 10 Oct 2015 17:20:39 +0300 From: Eli Zaretskii Subject: Re: bug#21468: 24.5; When next-line (visual) crosses overlay with before-string="\n" point goes to column 0 In-reply-to: X-012-Sender: halo1@inter.net.il To: Noam Postavsky Message-id: <83a8rqst3c.fsf@gnu.org> 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> <83zj013s0h.fsf@gnu.org> <83fv1jtctc.fsf@gnu.org> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 21468 Cc: 21468@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Sat, 10 Oct 2015 09:37:43 -0400 > From: Noam Postavsky > Cc: 21468@debbugs.gnu.org > > The 2nd case > > emacs -Q -l 21468-overlay.el -f 21468-test-eol-col-movement > > then hit C-e C-n. Point lands at the end of line 8 instead of line 8, > column 33 which is what happens when there is no overlay. This is not a bug: vertical-motion doesn't know about the 'cursor' property, so it works as if the property didn't exist. The 'cursor' property is only considered when actually putting the cursor on screen. I will look into the first case, sigh. From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 10 12:51:09 2015 Received: (at 21468) by debbugs.gnu.org; 10 Oct 2015 16:51:09 +0000 Received: from localhost ([127.0.0.1]:35542 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZkxMT-0003jT-0C for submit@debbugs.gnu.org; Sat, 10 Oct 2015 12:51:09 -0400 Received: from mail-wi0-f179.google.com ([209.85.212.179]:36081) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZkxMR-0003jL-B7 for 21468@debbugs.gnu.org; Sat, 10 Oct 2015 12:51:07 -0400 Received: by wicgb1 with SMTP id gb1so103969880wic.1 for <21468@debbugs.gnu.org>; Sat, 10 Oct 2015 09:51:06 -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=gNdWzEoZaY6xu1Xw3adwSGc5jHHm0CfYtbjHb4OSydk=; b=FjtLB5fqfJj7bzO0tJbQrcwwPggBpXovhBd7UZ4WvHD3ZMGRr0yVUVSbt3jqaeZhGN A3l6im8LkMnhZairKHQKE1Bg+wSgfjxdFmYB2kdrjAFdBXs1BfE8UGCSkpPgelYxNxZw lSRvUs23BsIjFmp2LgVdEGTmS6advVZa7N65OpPTPKpQ0kUTHwWwoNLnJ+Aygz0K536u wbWKR6Yxdk2RETDGttGeiDpispmQLVVMZulgdx9qBtq6zSqby3g60B1Pv9Y5/toanmmJ fLqJX6D7+KE71gMa7TfFKo0Pa4TC04Uaz5FoZYOC3qXnUbJlw8SM3VA9WCCtKqSbwaYE MB4A== MIME-Version: 1.0 X-Received: by 10.194.6.66 with SMTP id y2mr10319666wjy.82.1444495866520; Sat, 10 Oct 2015 09:51:06 -0700 (PDT) Received: by 10.28.210.68 with HTTP; Sat, 10 Oct 2015 09:51:06 -0700 (PDT) In-Reply-To: <83a8rqst3c.fsf@gnu.org> 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> <83zj013s0h.fsf@gnu.org> <83fv1jtctc.fsf@gnu.org> <83a8rqst3c.fsf@gnu.org> Date: Sat, 10 Oct 2015 12:51:06 -0400 X-Google-Sender-Auth: WWH3oXdDAEk2JrX9GX9uSbnbwVw Message-ID: Subject: Re: bug#21468: 24.5; When next-line (visual) crosses overlay with before-string="\n" point goes to column 0 From: Noam Postavsky To: Eli Zaretskii Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21468 Cc: 21468@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On Sat, Oct 10, 2015 at 10:20 AM, Eli Zaretskii wrote: >> Date: Sat, 10 Oct 2015 09:37:43 -0400 >> From: Noam Postavsky >> Cc: 21468@debbugs.gnu.org >> >> The 2nd case >> >> emacs -Q -l 21468-overlay.el -f 21468-test-eol-col-movement >> >> then hit C-e C-n. Point lands at the end of line 8 instead of line 8, >> column 33 which is what happens when there is no overlay. > > This is not a bug: vertical-motion doesn't know about the 'cursor' > property, so it works as if the property didn't exist. Okay, that makes sense, but it means this approach is worse than overlayed newlines for magit. From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 10 13:03:02 2015 Received: (at 21468) by debbugs.gnu.org; 10 Oct 2015 17:03:02 +0000 Received: from localhost ([127.0.0.1]:35549 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZkxXx-00040i-Dk for submit@debbugs.gnu.org; Sat, 10 Oct 2015 13:03:01 -0400 Received: from mtaout20.012.net.il ([80.179.55.166]:37890) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZkxXv-00040T-1J for 21468@debbugs.gnu.org; Sat, 10 Oct 2015 13:03:00 -0400 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0NW000G00KHWR700@a-mtaout20.012.net.il> for 21468@debbugs.gnu.org; Sat, 10 Oct 2015 20:02:57 +0300 (IDT) Received: from HOME-C4E4A596F7 ([84.94.185.246]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NW000G6JKOWL5A0@a-mtaout20.012.net.il>; Sat, 10 Oct 2015 20:02:57 +0300 (IDT) Date: Sat, 10 Oct 2015 20:03:03 +0300 From: Eli Zaretskii Subject: Re: bug#21468: 24.5; When next-line (visual) crosses overlay with before-string="\n" point goes to column 0 In-reply-to: X-012-Sender: halo1@inter.net.il To: Noam Postavsky Message-id: <83zizqr708.fsf@gnu.org> 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> <83zj013s0h.fsf@gnu.org> <83fv1jtctc.fsf@gnu.org> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 21468 Cc: 21468@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Sat, 10 Oct 2015 09:37:43 -0400 > From: Noam Postavsky > Cc: 21468@debbugs.gnu.org > > >> - On a truncated line with the overlay, move-end-of-line skips to the > >> next line. (I tried to avoid this by only adding the stretched space > >> when it's going to be visible. But that just made things worse > >> (looping in the display engine)) > >> > >> - When at the end of line, next-line goes to the end-of-line instead > >> of staying on the same column. > > > > Are these caused by the 'cursor' property, i.e. do not happen if that > > property is not used? > > They're not caused by the 'cursor' property, although it makes the 2nd > case more visually surprising. > > > > > In any case, I'd appreciate a short self-contained test case for each > > of these two issues, as I'm not sure I understand what's going on. > > > > Using attached 21468-overlay.el > > The 1st case: > > emacs -Q -l 21468-overlay.el -f 21468-test-eol-skip > > then hit C-e. Point lands at the end of line 19 instead of the end of > line 18 where it started. Fixed. From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 10 13:09:33 2015 Received: (at 21468) by debbugs.gnu.org; 10 Oct 2015 17:09:33 +0000 Received: from localhost ([127.0.0.1]:35553 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZkxeG-00049M-Fg for submit@debbugs.gnu.org; Sat, 10 Oct 2015 13:09:32 -0400 Received: from mtaout21.012.net.il ([80.179.55.169]:64707) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZkxeD-00049B-FB for 21468@debbugs.gnu.org; Sat, 10 Oct 2015 13:09:30 -0400 Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0NW000G00KV5JT00@a-mtaout21.012.net.il> for 21468@debbugs.gnu.org; Sat, 10 Oct 2015 20:09:28 +0300 (IDT) Received: from HOME-C4E4A596F7 ([84.94.185.246]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NW000GNYKZRIW20@a-mtaout21.012.net.il>; Sat, 10 Oct 2015 20:09:28 +0300 (IDT) Date: Sat, 10 Oct 2015 20:09:33 +0300 From: Eli Zaretskii Subject: Re: bug#21468: 24.5; When next-line (visual) crosses overlay with before-string="\n" point goes to column 0 In-reply-to: X-012-Sender: halo1@inter.net.il To: Noam Postavsky Message-id: <83wpuur6pe.fsf@gnu.org> 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> <83zj013s0h.fsf@gnu.org> <83fv1jtctc.fsf@gnu.org> <83a8rqst3c.fsf@gnu.org> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 21468 Cc: 21468@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Sat, 10 Oct 2015 12:51:06 -0400 > From: Noam Postavsky > Cc: 21468@debbugs.gnu.org > > On Sat, Oct 10, 2015 at 10:20 AM, Eli Zaretskii wrote: > >> Date: Sat, 10 Oct 2015 09:37:43 -0400 > >> From: Noam Postavsky > >> Cc: 21468@debbugs.gnu.org > >> > >> The 2nd case > >> > >> emacs -Q -l 21468-overlay.el -f 21468-test-eol-col-movement > >> > >> then hit C-e C-n. Point lands at the end of line 8 instead of line 8, > >> column 33 which is what happens when there is no overlay. > > > > This is not a bug: vertical-motion doesn't know about the 'cursor' > > property, so it works as if the property didn't exist. > > Okay, that makes sense, but it means this approach is worse than > overlayed newlines for magit. I don't think so. I think a casual mismatch in a column while moving through a buffer, and in marginal cases at that, is not a big deal. From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 10 17:07:02 2015 Received: (at 21468) by debbugs.gnu.org; 10 Oct 2015 21:07:02 +0000 Received: from localhost ([127.0.0.1]:35619 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zl1M6-0001NG-9i for submit@debbugs.gnu.org; Sat, 10 Oct 2015 17:07:02 -0400 Received: from mail-wi0-f180.google.com ([209.85.212.180]:35745) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zl1M4-0001Mq-4U for 21468@debbugs.gnu.org; Sat, 10 Oct 2015 17:07:00 -0400 Received: by wicge5 with SMTP id ge5so108430205wic.0 for <21468@debbugs.gnu.org>; Sat, 10 Oct 2015 14:06:59 -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=XrSOIgTkI8n0GqZof++pnkYGF3d7zFFipXvHuKr2oq4=; b=myaRlqHlhth9NWDHZqCz+dexwidv+vwR4iNhEYX/J1P8jD1kpnYpRPQkDTPzwAVIIn WUp5uQMoP4/zjUfA3iHOgfpHyj5J2f53meGqSI8YNPA3vLK7n5qxHnZGdmYmcsaFtoTV CP2Avh0eEh/tcFXeNaepU2b9s9m/3HAtfYPpOHF0g3IyLUAq46MyAuh8VK+NUn9gYFa5 tZgxgeVvbUD4O364vj054CKwccWCLUFX2y+1//MCRBa+qTWS42fY9a9JiOm3sLnaap/o nZ+4HXU32iMufLOudV2TdrHnPGMV++R7b+htqe/xFrT2wwlI4C2MtmXyZb8p2tUigGUq JAKA== MIME-Version: 1.0 X-Received: by 10.180.184.201 with SMTP id ew9mr6687618wic.53.1444511219446; Sat, 10 Oct 2015 14:06:59 -0700 (PDT) Received: by 10.28.210.68 with HTTP; Sat, 10 Oct 2015 14:06:59 -0700 (PDT) In-Reply-To: <83wpuur6pe.fsf@gnu.org> 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> <83zj013s0h.fsf@gnu.org> <83fv1jtctc.fsf@gnu.org> <83a8rqst3c.fsf@gnu.org> <83wpuur6pe.fsf@gnu.org> Date: Sat, 10 Oct 2015 17:06:59 -0400 X-Google-Sender-Auth: znNGtzAwaN4FaayqMW1J4-TEjVY Message-ID: Subject: Re: bug#21468: 24.5; When next-line (visual) crosses overlay with before-string="\n" point goes to column 0 From: Noam Postavsky To: Eli Zaretskii Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21468 Cc: 21468@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On Sat, Oct 10, 2015 at 1:09 PM, Eli Zaretskii wrote: >> Date: Sat, 10 Oct 2015 12:51:06 -0400 >> From: Noam Postavsky >> >> Okay, that makes sense, but it means this approach is worse than >> overlayed newlines for magit. > > I don't think so. I think a casual mismatch in a column while moving > through a buffer, and in marginal cases at that, is not a big deal. It's not a *big* deal, but with Emacs 25 using overlayed newlines gives no problems at all. From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 10 22:38:15 2015 Received: (at 21468) by debbugs.gnu.org; 11 Oct 2015 02:38:15 +0000 Received: from localhost ([127.0.0.1]:35697 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zl6Wd-0002Qs-30 for submit@debbugs.gnu.org; Sat, 10 Oct 2015 22:38:15 -0400 Received: from mtaout24.012.net.il ([80.179.55.180]:48250) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zl6WZ-0002Qa-LH for 21468@debbugs.gnu.org; Sat, 10 Oct 2015 22:38:12 -0400 Received: from conversion-daemon.mtaout24.012.net.il by mtaout24.012.net.il (HyperSendmail v2007.08) id <0NW100F00AMNUR00@mtaout24.012.net.il> for 21468@debbugs.gnu.org; Sun, 11 Oct 2015 05:31:15 +0300 (IDT) Received: from HOME-C4E4A596F7 ([84.94.185.246]) by mtaout24.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NW100GG2B03NX00@mtaout24.012.net.il>; Sun, 11 Oct 2015 05:31:15 +0300 (IDT) Date: Sun, 11 Oct 2015 05:38:17 +0300 From: Eli Zaretskii Subject: Re: bug#21468: 24.5; When next-line (visual) crosses overlay with before-string="\n" point goes to column 0 In-reply-to: X-012-Sender: halo1@inter.net.il To: Noam Postavsky Message-id: <83k2quqgdi.fsf@gnu.org> 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> <83zj013s0h.fsf@gnu.org> <83fv1jtctc.fsf@gnu.org> <83a8rqst3c.fsf@gnu.org> <83wpuur6pe.fsf@gnu.org> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 21468 Cc: 21468@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Sat, 10 Oct 2015 17:06:59 -0400 > From: Noam Postavsky > Cc: 21468@debbugs.gnu.org > > On Sat, Oct 10, 2015 at 1:09 PM, Eli Zaretskii wrote: > >> Date: Sat, 10 Oct 2015 12:51:06 -0400 > >> From: Noam Postavsky > >> > >> Okay, that makes sense, but it means this approach is worse than > >> overlayed newlines for magit. > > > > I don't think so. I think a casual mismatch in a column while moving > > through a buffer, and in marginal cases at that, is not a big deal. > > It's not a *big* deal, but with Emacs 25 using overlayed newlines > gives no problems at all. I'm quite sure problems will surface sooner or later. Overlays with newlines hit on fragile parts of the display engine code, which was never really designed for that kind of stuff. From unknown Sun Aug 17 22:01:27 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 08 Nov 2015 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator