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#8627: 24.0.50: cursor property behaves irregularly in before-strings Date: Sun, 05 Dec 2021 16:42:40 +0200 Message-ID: <83sfv72jvj.fsf@gnu.org> References: <8362otgrca.fsf@gnu.org> <875ys43ysr.fsf_-_@gnus.org> <835ys45ccd.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36902"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 8627-done@debbugs.gnu.org, aker@pitt.edu To: larsi@gnus.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 05 19:10:46 2021 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 1mtvyI-0009M9-1O for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 05 Dec 2021 19:10:46 +0100 Original-Received: from localhost ([::1]:40858 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mtvyG-00044v-QO for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 05 Dec 2021 13:10:44 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:39766) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mtvwo-0002Lb-Qb for bug-gnu-emacs@gnu.org; Sun, 05 Dec 2021 13:09:14 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47811) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mtvwo-00068i-HD for bug-gnu-emacs@gnu.org; Sun, 05 Dec 2021 13:09:14 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mtvwo-0000bs-CE for bug-gnu-emacs@gnu.org; Sun, 05 Dec 2021 13:09:14 -0500 Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Sun, 05 Dec 2021 18:09:14 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 8627 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Mail-Followup-To: 8627@debbugs.gnu.org, eliz@gnu.org, aker@pitt.edu Original-Received: via spool by 8627-done@debbugs.gnu.org id=D8627.16387276941898 (code D ref 8627); Sun, 05 Dec 2021 18:09:14 +0000 Original-Received: (at 8627-done) by debbugs.gnu.org; 5 Dec 2021 18:08:14 +0000 Original-Received: from localhost ([127.0.0.1]:59278 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mtvvo-0000UR-6t for submit@debbugs.gnu.org; Sun, 05 Dec 2021 13:08:13 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:59744) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mtsjF-0006oG-3z for 8627-done@debbugs.gnu.org; Sun, 05 Dec 2021 09:43:02 -0500 Original-Received: from [2001:470:142:3::e] (port=40444 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mtsiz-0003Q0-Go; Sun, 05 Dec 2021 09:42:54 -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=/MVSze2NMtsPF/M1rbvE53KacQgVpN/ByWgUqGPPIsg=; b=Jc0jUoucqAFg aWSKf1JynGn/TuYUY778taykCs3kLuZu9KNHXu0ens/tyHagctmDUmN9USrhQef7r9tA0GKTqHv9v Hmw/CLEy8ZgowdzOp7Rb3vTKQPUsx1mrP+DR1wgIH3/dOTjSjRl2PklSThZaR4323BSoiUgAuIom6 QPSPUzIGgnEx9cXwmcwoamYDrrm116IlIaRc/m+pgmduRBXzVNigU0PjCaIZt/M9aG7fBpEfPXZNR Pev24R2phNIQ0VvWxUO6gSWJ8ldHTxL/+92PZ33nvMIUs+qQh4kTSeO6ajxw+wy11z27jkWxhvaqG cV5iwmlzUidbcMpcXD0Zvw==; Original-Received: from [87.69.77.57] (port=2897 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 1mtsiy-0006zT-Oo; Sun, 05 Dec 2021 09:42:45 -0500 In-Reply-To: <835ys45ccd.fsf@gnu.org> (message from Eli Zaretskii on Sat, 04 Dec 2021 22:44:50 +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" Xref: news.gmane.io gmane.emacs.bugs:221621 Archived-At: > Date: Sat, 04 Dec 2021 22:44:50 +0200 > From: Eli Zaretskii > Cc: 8627@debbugs.gnu.org, aker@pitt.edu > > > From: Lars Ingebrigtsen > > Cc: Alp Aker , 8627@debbugs.gnu.org > > Date: Sat, 04 Dec 2021 21:22:44 +0100 > > > > Eli Zaretskii writes: > > > > > This cannot possibly work, not without rewriting the Emacs display > > > engine in ways I don't intend to. Quite simply, you cannot put the > > > `cursor' property on a newline that belongs to a string, because a > > > newline, obviously, doesn't have a graphic representation (a glyph) on > > > the screen, it just causes Emacs to continue drawing on the next > > > screen line. > > > > [...] > > > > > I will eventually update the documentation with this caveat. > > > > This was ten years ago -- I didn't check whether the documentation has > > been updated, but there doesn't seem to be anything more to do here than > > that? > > I promised to fix at least some of the behavior, but never did. I > will take a look soon. I took a look. The code works correctly: since the before-string leaves the buffer position visible, Emacs by default places the cursor there, and a non-nil value of the 'cursor' property cannot override this basic behavior. If Emacs 23 behaved differently, it was a bug in Emacs 23. By contrast, when the value of 'cursor' is an integer, then the cursor is placed on that character even if the corresponding buffer position is visible. Which is what Emacs now does. So I've now documented these caveats, including the one wrt newline characters, and I'm finally marking this bug done.