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.devel Subject: Re: [PATCH] Support "\n" in icomplete-separator Date: Tue, 10 Nov 2020 21:27:43 +0200 Message-ID: <83lff9107k.fsf@gnu.org> References: <20201105235735.oxouuek66ehu5o45@Ergus> <20201106151541.dpgep7borlja25su@Ergus> <837dqv5huk.fsf@gnu.org> <83mtzp2qj0.fsf@gnu.org> <83r1p11369.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6240"; mail-complaints-to="usenet@ciao.gmane.io" Cc: spacibba@aol.com, monnier@iro.umontreal.ca, andreyk.mad@gmail.com, emacs-devel@gnu.org To: Gregory Heytings Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Nov 10 20:39:02 2020 Return-path: Envelope-to: ged-emacs-devel@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 1kcZTq-0001Vu-Pg for ged-emacs-devel@m.gmane-mx.org; Tue, 10 Nov 2020 20:39:02 +0100 Original-Received: from localhost ([::1]:40222 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kcZTp-0004j3-QO for ged-emacs-devel@m.gmane-mx.org; Tue, 10 Nov 2020 14:39:01 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50960) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kcZIt-0005A9-Fd for emacs-devel@gnu.org; Tue, 10 Nov 2020 14:27:44 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:38994) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kcZIs-00087o-7Z; Tue, 10 Nov 2020 14:27:42 -0500 Original-Received: from [176.228.60.248] (port=3001 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kcZIk-0002pn-Bh; Tue, 10 Nov 2020 14:27:38 -0500 In-Reply-To: (message from Gregory Heytings on Tue, 10 Nov 2020 19:17:30 +0000) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:258987 Archived-At: > Date: Tue, 10 Nov 2020 19:17:30 +0000 > From: Gregory Heytings > cc: Andrii Kolomoiets , spacibba@aol.com, > monnier@iro.umontreal.ca, emacs-devel@gnu.org > > >> (defvar o (make-overlay 0 0 nil t t)) > >> (minibuffer-with-setup-hook > >> (lambda () > >> (set (make-local-variable 'face-remapping-alist) > >> '((default :height 1.3))) > >> (move-overlay o (point) (point) (current-buffer)) > >> (let ((text (mapconcat > >> #'identity > >> '("Some" "text" "that" "will" "not" "fit" > >> "the" "minibuffer" "window") > >> "\n"))) > >> (put-text-property 0 1 'cursor t text) > >> (overlay-put o 'after-string text))) > >> (read-string "Multiline\nprompt: ")) > >> > >> Is it possible to make the prompt visible? Should I file bug report for this? > > > > What is the bug here? > > The "bug" is that the word "Multiline" is not visible, only the word > "prompt:" is. This has been discussed again and again, I don't understand > why it is not yet clear for you. I asked Andrii. I'm not sure if he thinks the same as you, but in case he does: the text inserted into the minibuffer doesn't fit. So in this situation, Emacs can either (a) start display from the prompt's beginning, or (b) end the display at the end of the text, or (c) start display somewhere in the middle, to show the end of the prompt and some of the text after it. Whatever Emacs does, some of the text will not be visible. How should Emacs know which of the possibilities is the correct one in this case? A "bug" is when there's an obvious choice between the possible outcomes, but Emacs behaves not in the obvious way. I don't think this is the situation here. Thus my question.