From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#48669: Inconsistent overlay placement between minibuffer-message and set-minibuffer-message Date: Tue, 08 Jun 2021 19:52:07 +0300 Organization: LINKOV.NET Message-ID: <87wnr4b8p4.fsf@mail.linkov.net> References: <87k0n8kl1h.fsf@mail.linkov.net> <83r1hfilfg.fsf@gnu.org> <875yyqlnml.fsf@mail.linkov.net> <83bl8hhnm7.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32460"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) Cc: joca.bt@gmail.com, 48669@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jun 08 18:57:12 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 1lqf2O-0008JT-IM for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 08 Jun 2021 18:57:12 +0200 Original-Received: from localhost ([::1]:56130 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lqf2M-0000zG-Vh for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 08 Jun 2021 12:57:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39252) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lqf2E-0000uc-Kk for bug-gnu-emacs@gnu.org; Tue, 08 Jun 2021 12:57:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48097) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lqf2E-0005Cv-DC for bug-gnu-emacs@gnu.org; Tue, 08 Jun 2021 12:57:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lqf2E-0006eb-EN for bug-gnu-emacs@gnu.org; Tue, 08 Jun 2021 12:57:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 08 Jun 2021 16:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48669 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 48669-submit@debbugs.gnu.org id=B48669.162317141625536 (code B ref 48669); Tue, 08 Jun 2021 16:57:02 +0000 Original-Received: (at 48669) by debbugs.gnu.org; 8 Jun 2021 16:56:56 +0000 Original-Received: from localhost ([127.0.0.1]:59634 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lqf27-0006dj-QV for submit@debbugs.gnu.org; Tue, 08 Jun 2021 12:56:56 -0400 Original-Received: from relay4-d.mail.gandi.net ([217.70.183.196]:56783) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lqf20-0006cu-CO; Tue, 08 Jun 2021 12:56:48 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 0A3E6E0007; Tue, 8 Jun 2021 16:56:39 +0000 (UTC) In-Reply-To: <83bl8hhnm7.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 07 Jun 2021 15:21:04 +0300") 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:208250 Archived-At: tags 48669 fixed close 48669 28.0.50 thanks >> >> - (let ((ol (make-overlay (point-max) (point-max) nil t t)) >> >> + (let* ((ovpos (minibuffer--message-overlay-pos)) >> >> + (ol (make-overlay ovpos ovpos nil t t)) >> > >> > Doesn't this rely too much on the internal details of >> > minibuffer--message-overlay-pos? At least, without any comments, this >> > call looks like a riddle that isn't easy to unlock. >> >> If minibuffer--message-overlay-pos serves its purpose for >> set-minibuffer-message, it seems suitable for >> minibuffer-message as well. > > So you object to adding a comment there which would explain what that > call does? Now I added a comment, and pushed to master. >> >> - (put-text-property 0 1 'cursor t message)) >> >> + (put-text-property 0 1 'cursor 1 message)) >> > >> > Why this change? >> >> Only to make minibuffer-message the identical copy of >> set-minibuffer-message. > > I'd say make it the other way around. Handling the 'cursor' property > with a numeric value is more expensive and tricky than if the value is > t, and in this case the effect is exactly the same. So I changed the 'cursor' property to t.