From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#61361: cursor cannot be at the start of overlay that starts with a newline Date: Wed, 08 Feb 2023 17:12:18 +0200 Message-ID: <83ilgcnqct.fsf@gnu.org> References: <83o7q4nw2s.fsf@gnu.org> <20e98dc0-c939-7bd8-e922-aba4470a2567@yandex.ru> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27884"; mail-complaints-to="usenet@ciao.gmane.io" Cc: chenxy@mit.edu, 61361@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Feb 08 16:13:10 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pPm8D-00076s-Jq for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 08 Feb 2023 16:13:09 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pPm87-0002y9-OF; Wed, 08 Feb 2023 10:13:03 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pPm87-0002xE-6G for bug-gnu-emacs@gnu.org; Wed, 08 Feb 2023 10:13:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pPm86-000575-Gy for bug-gnu-emacs@gnu.org; Wed, 08 Feb 2023 10:13:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pPm86-0002n4-Cm for bug-gnu-emacs@gnu.org; Wed, 08 Feb 2023 10:13:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 08 Feb 2023 15:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61361 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: wontfix Original-Received: via spool by 61361-submit@debbugs.gnu.org id=B61361.167586917510708 (code B ref 61361); Wed, 08 Feb 2023 15:13:02 +0000 Original-Received: (at 61361) by debbugs.gnu.org; 8 Feb 2023 15:12:55 +0000 Original-Received: from localhost ([127.0.0.1]:56318 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pPm7z-0002me-88 for submit@debbugs.gnu.org; Wed, 08 Feb 2023 10:12:55 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:56308) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pPm7x-0002mL-5z for 61361@debbugs.gnu.org; Wed, 08 Feb 2023 10:12:54 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pPm7r-0004tL-A8; Wed, 08 Feb 2023 10:12:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=imaHWcyW1R4GqKBrHKezC+Q8t/qNW/XTyofdA/EERAI=; b=YyeLTJCp7qV+ SECJxUBPb//N+6JDTVz4DYeCseAifr2UKbi4f060GgvVq6gKY8ise/CHmHoHe6WHvTOZ0QKcBfore 4Yy9MH5qoOYLYRCQkBnb2kAqUTaYcJbPIp0MFjUb+pnRDGdeFGTMcGgJvKpedC9g1ERM+24vXES4Y p5pmwbYPsuYQ6HH9/Wwr8puyPt8oYQYQ+4P2wsDrjcjfjaPjp2n+/5HNe52R1hDNtB7uAViwEoADe SpEVPO0GKFyydK+i30j0tvftpe776D3wpm4zPIKRVG/1/L5ZwdHTU5yQGXLT09+5eGVvP06cy3eb9 vnn7sfSha5ZXT+k6RjAnpw==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pPm75-0004bF-LR; Wed, 08 Feb 2023 10:12:35 -0500 In-Reply-To: <20e98dc0-c939-7bd8-e922-aba4470a2567@yandex.ru> (message from Dmitry Gutov on Wed, 8 Feb 2023 16:41:28 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:255142 Archived-At: > Date: Wed, 8 Feb 2023 16:41:28 +0200 > Cc: 61361@debbugs.gnu.org > From: Dmitry Gutov > > Hi Eli, > > On 08/02/2023 15:08, Eli Zaretskii wrote: > > tags 61361 wontfix > > thanks > > > >> From: Xinyang Chen > >> Date: Tue, 7 Feb 2023 23:29:31 -0500 > >> > >> steps to reproduce: > >> ;; test line > >> (if (and (boundp 'overlay) (overlayp overlay)) (delete-overlay overlay)) > >> (setq overlay (make-overlay 1 2)) > >> (overlay-put overlay 'display "\nhello") > >> ;; same result if you do this intead > >> ;; (overlay-put overlay 'display (propertize "\nhello" 'cursor 0)) > >> > >> cursor does not display in the first line. > > Emacs cannot do what you are asking because the newline leaves no > > glyph on display. So the display engine cannot place the cursor on > > the newline as it does on other characters, which do have glyphs. > > > > This is a limitation of the 'cursor' property feature. Sorry. > > Could you explain that a little further? > > When I have a line with text and move point to the end of it, the cursor > is rendered, right? Does that use some other method than "glyphs", > making it unavailable to the handling of 'cursor' in a display spec? Yes, it does use a different method, because in that case the cursor is displayed at point's position, not at some arbitrary index of a string. I just tried to explain the difference, in a previous message. If something is still unclear, please ask more specific questions.