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: Fri, 13 Nov 2020 22:18:58 +0200 Message-ID: References: <20201105235735.oxouuek66ehu5o45@Ergus> <20201106151541.dpgep7borlja25su@Ergus> <837dqv5huk.fsf@gnu.org> <83mtzp2qj0.fsf@gnu.org> <83r1p11369.fsf@gnu.org> <834klv26vu.fsf@gnu.org> <835z69y7kc.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="40783"; 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 Fri Nov 13 21:19:41 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 1kdfXo-000AUa-SN for ged-emacs-devel@m.gmane-mx.org; Fri, 13 Nov 2020 21:19:40 +0100 Original-Received: from localhost ([::1]:39662 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kdfXn-0006lD-UL for ged-emacs-devel@m.gmane-mx.org; Fri, 13 Nov 2020 15:19:39 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40390) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kdfXF-0006Ll-Mr for emacs-devel@gnu.org; Fri, 13 Nov 2020 15:19:05 -0500 Original-Received: from mail-lf1-x143.google.com ([2a00:1450:4864:20::143]:37140) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kdfXE-00062e-2t; Fri, 13 Nov 2020 15:19:05 -0500 Original-Received: by mail-lf1-x143.google.com with SMTP id s30so15861381lfc.4; Fri, 13 Nov 2020 12:19:03 -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=oAPN4RLiD1L1QECBI3Rz4/5eWLbY/O//T/DLTeWr/34=; b=ripbtr9Dyf+AGRvPmdlPkUhtm56+qrz5f6o9zOZKgrSl9xrdiTk4og1XrSTxvNunsJ rOhfSZoLCpOXB7EECwmuoi2LMxvZzzFQY3OrnKMtaUej+MjGpmMCVqx3kd2e3eQZQILT cn/Kc0amOqMwyWdrppRNlvAzkzkHinHfhVqV5f/mX2H1koGYqndUdoayTahKn2n3apbc MW2PKw7fwy3w7Ukq9RIyOi46Zj8RM6oPpFcrkIr9E9QCCBwWtlChrrYXpXjCbqJ6DQ9p ss1fepmeBh8sRHDA7YC8T7wpTGs0oxa0hm7MOJIB40QZRVsDZZvfsRe3d3xgyLIEbQfS 546A== 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=oAPN4RLiD1L1QECBI3Rz4/5eWLbY/O//T/DLTeWr/34=; b=sBaYtkbH87HvpkF/ty6MYEt5C9zqz+5aaWmm1iPKaz+qD7DZymJhxtilpkhiai4VMd aXCz7bffsZwmuJzR0TCMzgrbf4M9wk4qCxKrO6XuP5QlH0IyPktF/IZni7O7gk56wTv8 N0xdAmXA5/3fx3rO1YB+P/AHlTJ0H5WF0sX7cVoXgK1kogoxcar7o4r7zPlye4OkSOzU V2y+h4TNF9FnCKqT0reuEZ/hzu397uYUEqAKZjmFUHtrmDytektm7zv2FyjKVcj1LvET 2bOF8vMqr8545j4H+0jRTpDUbFJq3sYe8269ldOul1grPX4FGeTaNEeS8S8gatmkAhGt 38ig== X-Gm-Message-State: AOAM531w5iM1M6Q6oO6icNCse3POH2PmZpYDucQfVCOYT4BHyGuT1I2+ uR8/Job8tvptXpYKJlBKl3c= X-Google-Smtp-Source: ABdhPJwvyEkhVw92Mz4ObtxE7KWly8uQ7R5y9pQUvUO2GR8bbsWMhYINi7fjJmHkjkuBDHqpPiKB4A== X-Received: by 2002:a19:715:: with SMTP id 21mr1518912lfh.289.1605298741505; Fri, 13 Nov 2020 12:19:01 -0800 (PST) Original-Received: from muffinmac ([91.206.110.192]) by smtp.gmail.com with ESMTPSA id t4sm1681715lfc.193.2020.11.13.12.18.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Nov 2020 12:19:00 -0800 (PST) In-Reply-To: <835z69y7kc.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 13 Nov 2020 10:39:15 +0200") Received-SPF: pass client-ip=2a00:1450:4864:20::143; envelope-from=andreyk.mad@gmail.com; helo=mail-lf1-x143.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: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 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, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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:259156 Archived-At: Eli Zaretskii writes: > We are not talking about the default completion in this thread, we are > talking about icomplete-mode and its ilk. They work differently, and > in particular do show completion candidates automatically in the > minibuffer. > >> > Without seeing the possible answers, what are your chances of knowing >> > what to type? >> >> Chances are pretty good: I'll press TAB to see the *Completions* buffer. > > Pressing TAB seems to be against the philosophy of icomplete, ivy, and > similar features, at least AFAIU: they display the candidates without > any prior request by the user. Among icomplete, ivy and ido modes only ivy is overriding TAB key. With icomplete and ido the overlay text is not the _only_ way of knowing what inputs are acceptable. Seems like they has nothing against using TAB to complete text. >> Oh, in this case let's try even simpler approach: show as much text >> before point as possible. > > What is "this case"? If "this case" is limited to echo-area display, > then it cannot be shared with minibuffer display. If you mean both > use cases, then "displaying as much as possible before point" will > yield sub-optimal results for minibuffer input, when some text is > displayed after point, whether as an aoverlay string or not. I agree. >> > The conclusion, IMO, is that the application should tell the display >> > engine how it wants to display the stuff in the mini-window in the >> > "unusual" cases, where the default strategy produces sub-optimal >> > results. >> >> I see many applications are trying their best to fit the text into the >> miniwindow. Can the display strategy be changed to display the >> beginning of the text by default? > > We can do that, but I don't think it would be TRT, because the current > strategy does work in many use cases. I thin a better way is to let > applications control this aspect of the behavior, because we will > never be able to find a solution that always works, what with all the > different settings and kinds of display in the mini-window. Got it. Looking forward for usable tool to let applications control the display behavior. Thanks!