From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrii Kolomoiets Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Support "\n" in icomplete-separator Date: Tue, 10 Nov 2020 23:09:03 +0200 Message-ID: References: <20201105235735.oxouuek66ehu5o45@Ergus> <20201106151541.dpgep7borlja25su@Ergus> <837dqv5huk.fsf@gnu.org> <83mtzp2qj0.fsf@gnu.org> <83r1p11369.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="16741"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (darwin) Cc: spacibba@aol.com, monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Nov 10 22:10:47 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 1kcaud-0004Gc-9M for ged-emacs-devel@m.gmane-mx.org; Tue, 10 Nov 2020 22:10:47 +0100 Original-Received: from localhost ([::1]:34002 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kcauc-00032t-9H for ged-emacs-devel@m.gmane-mx.org; Tue, 10 Nov 2020 16:10:46 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49098) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kcatG-000263-7w for emacs-devel@gnu.org; Tue, 10 Nov 2020 16:09:22 -0500 Original-Received: from mail-lj1-x243.google.com ([2a00:1450:4864:20::243]:43986) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kcatB-0004eh-PD; Tue, 10 Nov 2020 16:09:21 -0500 Original-Received: by mail-lj1-x243.google.com with SMTP id q19so14670327ljc.10; Tue, 10 Nov 2020 13:09:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=m3GdQHiPjDWUPoESaCcaXVuFCSD1sOap+/rXdWX2/vk=; b=heIBbI4n89ui/R0aXQHBageb2Dcxy0MpAIMgtPr9/1MWT3lGh53mQWP9SUCTLdLB80 +nldMelXsFQ6mwXcAPsgsBVrFsYVOx+udmPdMSC5bD/cLBuOI1Q/pqNyoUSHI6IGLZAg gV0ENotblLnzo+zF4eCYJP8ax52uO4oDUDnlFfJQxXZLENjuSgIDcGDckMlDFchKhPk3 wFlEfVWti+XpbixAFIvd7Rla8imzb6Iq83RivyLP+NdLObakVJ39TD9ipzcGT5HjrYs7 sOltr7AtfEi4EDTQYTp+H/BdTxF6x2xtL1zB1FfmDUhdSH5JDLbNH4/joVv/VHKFCjqa /k1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=m3GdQHiPjDWUPoESaCcaXVuFCSD1sOap+/rXdWX2/vk=; b=Pe3uO+T7Iv5FRQRt1mD3a2gC12/mPv6d3/m4OJAVAQ2Nv0lRL2fnSWSm2OxwWs+w95 i35a0Il0T0ljPYueb3Pf8OxG1YISe4PN6v7MR8HumPdMhRPwN2vwLgztN7cvSUubPFIR pHd7tqErjagJ+NNMRHjqnGOetLr8Q4GRHLl2ufMkV9RiQIr09tljGjMkEUnMmv3CqhZR CtBari31znSVELkGWjnM8RgftIElzmYrqe8oyDmMfQyoWbK2sOya+bjH5SYXHrIhWaGW iZC4Lz9wAEBvpMuHR62zVz8cO7EnoT/1MXNCG+NEw/ifak/QpqLihDRZQDiH93uyqjVm EWSQ== X-Gm-Message-State: AOAM530LZUHvISUrkEpyT82R24UMGwsNmLNqtJg3Hfb3W/wdpr/SgSUY Ombj4+ACx149vUSVb4N8jfM= X-Google-Smtp-Source: ABdhPJzd0NlPz5l9Gp1QOozOgO3K8MGRp6jkggO6TSYyJmIbSZuG5Fr23++hHjGGf/K4A1rkRbs7FQ== X-Received: by 2002:a05:651c:299:: with SMTP id b25mr3774906ljo.16.1605042545799; Tue, 10 Nov 2020 13:09:05 -0800 (PST) Original-Received: from muffinmac ([91.206.110.192]) by smtp.gmail.com with ESMTPSA id y28sm2500201ljn.18.2020.11.10.13.09.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 13:09:04 -0800 (PST) In-Reply-To: <83r1p11369.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 10 Nov 2020 20:23:42 +0200") Received-SPF: pass client-ip=2a00:1450:4864:20::243; envelope-from=andreyk.mad@gmail.com; helo=mail-lj1-x243.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:258996 Archived-At: Eli Zaretskii writes: >> (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? I don't take the overlay text as the actual text but rather like a hint or helper. E.g. in icomplete-mode overlay text shows what part of the text can be automatically completed. Overlay text can be completelly hidden and even in this case I will be able to enter the text. The prompt is more important. Imagine there are two prompts: "Selected file will be deleted. Select file: " and "Selected file will be opened. Selected file: ". I certainly don't want to see only "Select file:" because all the space is occupied by hints. Hide hints but show me the full prompt. The point is more important than the prompt, obviously. I must see where and what I typed. IMO the minibuffer behavior about the prompt, the text and the overlay should be: show as much text before point as possible (including the prompt), then show the rest of the text (in case the point is not at the end of the text) and then show the overlay text. And here I come to the answer to your question: for me, the bug here is that the prompt is hidden in favor of the overlay text.