From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#38457: 27.0.50; dabbrev-expand regression due to message change Date: Wed, 25 Dec 2019 18:30:57 +0200 Message-ID: <858f4dc2-a955-9ce5-6cf7-aa2c00c2f01d@yandex.ru> References: <8736e3vve8.fsf@gmx.net> <87d0cubfxx.fsf@mail.linkov.net> <83a77y9k35.fsf@gnu.org> <87eex9jf14.fsf@mail.linkov.net> <83d0cs8uw8.fsf@gnu.org> <87a77uh5a5.fsf@mail.linkov.net> <83r21561qd.fsf@gnu.org> <878snd2liu.fsf@mail.linkov.net> <8336dk5k1p.fsf@gnu.org> <87a77rgajf.fsf@mail.linkov.net> <83immf3pba.fsf@gnu.org> <87y2vawly3.fsf@mail.linkov.net> <83tv5x38kq.fsf@gnu.org> <87d0clxjaq.fsf@mail.linkov.net> <83y2v81g5s.fsf@gnu.org> <87fthgdkq9.fsf@mail.linkov.net> <37de1822-26c5-b45a-e5b9-3ab492507b97@yandex.ru> <87tv5tfiao.fsf@mail.linkov.net> <393793a7-236f-dfce-edc7-100472ad9be2@yandex.ru> <874kxqpsse.fsf@mail.linkov.net> <416b122a-287e-5c47-8979-feb22b2bba81@yandex.ru> <87sgl9p9q3.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="231314"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 Cc: 38457@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Dec 25 17:32:25 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1ik9aC-000y4S-LU for geb-bug-gnu-emacs@m.gmane.org; Wed, 25 Dec 2019 17:32:24 +0100 Original-Received: from localhost ([::1]:47586 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ik9aB-0001am-Ip for geb-bug-gnu-emacs@m.gmane.org; Wed, 25 Dec 2019 11:32:23 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60982) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ik9Zr-0001LY-SU for bug-gnu-emacs@gnu.org; Wed, 25 Dec 2019 11:32:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ik9Zq-0006uf-PV for bug-gnu-emacs@gnu.org; Wed, 25 Dec 2019 11:32:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48654) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ik9Zq-0006ub-ME for bug-gnu-emacs@gnu.org; Wed, 25 Dec 2019 11:32:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ik9Zq-00041P-Kb for bug-gnu-emacs@gnu.org; Wed, 25 Dec 2019 11:32:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 25 Dec 2019 16:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38457 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed Original-Received: via spool by 38457-submit@debbugs.gnu.org id=B38457.157729146815377 (code B ref 38457); Wed, 25 Dec 2019 16:32:02 +0000 Original-Received: (at 38457) by debbugs.gnu.org; 25 Dec 2019 16:31:08 +0000 Original-Received: from localhost ([127.0.0.1]:54622 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ik9Yx-0003zx-Sp for submit@debbugs.gnu.org; Wed, 25 Dec 2019 11:31:08 -0500 Original-Received: from mail-lj1-f169.google.com ([209.85.208.169]:39334) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ik9Yx-0003zU-7C for 38457@debbugs.gnu.org; Wed, 25 Dec 2019 11:31:07 -0500 Original-Received: by mail-lj1-f169.google.com with SMTP id l2so23065004lja.6 for <38457@debbugs.gnu.org>; Wed, 25 Dec 2019 08:31:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:subject:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=qLF4FHv1Jc3AridGLLxlVvT1Nz0J+oKHEESUXz4xi3s=; b=DwJI52jq8U9GkMqLnupy+7XmPD+ewkx6RQ8Bt/pADESbQibNol7fsqqfXKP2Mxbr8B IZCZ0vYBJjzmgylnPW3qKRa+JM1zZcgmmnGgVHCWPeF4kGXV9vVwxbypxCQB4HwZFgOY hy6cfByCfRLDNb612W4gbTbl92rBX9hRctdIuQNuOSzoZezFAztk9UxnJknHW5PjF3QC WbrkPWr72DJPiDslg1zbaX9vNJ8aw/7xBZIGCkNP7Of4i89oRCYsypvy0+PZbVXtqAbR hlH/x9Cj8Tt3lnGV24vAwhYo2BNpXmAdPJe/D+UsXC2EUrWclLbFFeY+UQz4ar800jzw +TAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:subject:to:cc:references:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=qLF4FHv1Jc3AridGLLxlVvT1Nz0J+oKHEESUXz4xi3s=; b=NKnfXix8lSTwIXB7ESOkUYlDNpqZjrypDCy86S0Jv8Q/Mx2IHrqe4+feroKRnnIUX8 R58Svc6AgTO4rU4Js9dwLEVCjLnowku6PFIupKFAxkVdptO4zWlWZBZoY1oJSKB+083p aYeWs9F8ClCXAinDrWSuVLwfhPMYmvMKYmh25Z2H54kfWwgQRmOhMcb2A0S6I3dnVpeI PBV6b7QHqVQ8TfUuvtAjvQacyOc09GUaXv7tP+pIYER2iT8ORnTVQStX0iurbZb9y2dc fTA/AJpBOK916a4IHw3yJZ7zhGxqR+o/fiB0Yz5wqrZDVDjhMR4kH5ls09V7O6C1//6C fKew== X-Gm-Message-State: APjAAAW/V5DTRbC+Djb7L33kjwmrImrfjaCh7StESbjn2HQCDibKjtQG LMA/+TXEa+OT1zrzVC+vUE9qnVNw3QyqjA== X-Google-Smtp-Source: APXvYqxONcG6YkkOHg/V69yeUKEwiXlHTcRiSCeKL5MwGHsVOJyPfI5J3EHgalQL0PqCt+GLi1etAg== X-Received: by 2002:a2e:3a13:: with SMTP id h19mr24149449lja.16.1577291460853; Wed, 25 Dec 2019 08:31:00 -0800 (PST) Original-Received: from [172.18.118.211] ([79.104.7.197]) by smtp.googlemail.com with ESMTPSA id s16sm11799823lfc.35.2019.12.25.08.30.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Dec 2019 08:31:00 -0800 (PST) In-Reply-To: <87sgl9p9q3.fsf@mail.linkov.net> Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:173754 Archived-At: On 25.12.2019 1:47, Juri Linkov wrote: >>> IDK, I tried to set resize-mini-windows to nil and in icomplete-mode >>> can see the message. >> >> My bad, last time I was trying it was with ido-mode. There, the message >> comes at the end of all completions. >> >> With icomplete, however, it's printed before the completions. And it also >> appears to the left of the cursor. Is that intentional? > > Code in set-minibuffer-message was copied from minibuffer-message > where handling of the cursor and after-string overlay was intentional. Since after-string is used, shouldn't it always appear *after* the cursor? > Could ido-mode use an overlay the same way as it's used in icomplete > that plays nicely with the set-minibuffer-message overlay? This seems to work, but it needs more testing: diff --git a/lisp/ido.el b/lisp/ido.el index 79f259b819..d47450fc40 100644 --- a/lisp/ido.el +++ b/lisp/ido.el @@ -4492,6 +4492,8 @@ ido-initiate-auto-merge (ido-tidy)) (throw 'ido contents)))) +(defvar ido--overlay nil) + (defun ido-exhibit () "Post command hook for Ido." ;; Find matching files and display a list in the minibuffer. @@ -4726,7 +4728,12 @@ ido-exhibit (let ((inf (ido-completions contents))) (setq ido-show-confirm-message nil) (ido-trace "inf" inf) - (insert inf)) + (when ido--overlay + (delete-overlay ido--overlay)) + (let ((o (make-overlay (point-max) (point-max) nil t t))) + (when (> (length inf) 0) + (put-text-property 0 1 'cursor t inf)) + (overlay-put o 'after-string inf) + (setq ido--overlay o))) )))) (defun ido-completions (name)