From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: feature/icomplete-vertical Date: Mon, 05 Oct 2020 10:40:00 +0100 Message-ID: <87y2klf1u7.fsf@gmail.com> References: <20200912133311.6ujtgczj6wyclufy@Ergus> <20200920130435.heye7bk73pm252km@Ergus> <83sgbczj0i.fsf@gnu.org> <83lfh4zfml.fsf@gnu.org> <838sd4z6lz.fsf@gnu.org> <20201001164804.mqqyxtet4ttweuyv@Ergus> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18428"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Ergus , Juri Linkov , Yuan Fu , Eli Zaretskii , emacs-devel To: Gregory Heytings Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Oct 05 11:41:21 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 1kPMzh-0004eV-3R for ged-emacs-devel@m.gmane-mx.org; Mon, 05 Oct 2020 11:41:21 +0200 Original-Received: from localhost ([::1]:52122 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kPMzg-00072w-34 for ged-emacs-devel@m.gmane-mx.org; Mon, 05 Oct 2020 05:41:20 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53812) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kPMyU-0005r3-OD for emacs-devel@gnu.org; Mon, 05 Oct 2020 05:40:06 -0400 Original-Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]:37809) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kPMyS-0000mn-Ct; Mon, 05 Oct 2020 05:40:06 -0400 Original-Received: by mail-wm1-x336.google.com with SMTP id j136so8063675wmj.2; Mon, 05 Oct 2020 02:40:03 -0700 (PDT) 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:content-transfer-encoding; bh=hN2owx3VJN5FyRMiQpU6urPHJfBLBVp/NudLfPFahaI=; b=aLyut5VNOA2QLL2qZ+yxYGjcfkPq8PC7GQkiTwDCtvEknxKpRBL5eUZDRcB/YcEtvP JBggtRLOgBmeaGBG723Cm/CvYjrovO5w1oJOPkYBMP/JT4WACgJ9Is4TKw66zA+qPbX8 Mab4yFAXd7lpGvEYemm5YbaSeExMvkaUfHUwCrFXEjY6gkxqk3pfFqmx1wyiB2X5WfZ9 W6Av575NzMQNhlrI0d1HKxCno6Jajtd8sOoOOSIBiIQhtXiPTDI6nozA5OjrkQBkNeSg DsAw1TvTg2bP+sgKVKZQpatRwUqmhHvs8nHTE1PqX3w5RWBw0xIExGtYnZfa8PENtj1s uK0A== 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:content-transfer-encoding; bh=hN2owx3VJN5FyRMiQpU6urPHJfBLBVp/NudLfPFahaI=; b=bQXAC8iRh4bX0zuWiwK2d5QI86qnEzEaAy/iFY/eTmLEdJK/Kii2PF4na2MxwMNMI+ /LlEvhdlp8b/8W94/3VjCmvmzon5v6FsI+RND12Ll6XyTcfLDcN5qq1/e2rOKu5PCPrs cnqPMlMtIEW6Nwct5myfIemNaEsAE0iB35DDZZkwYzowUEg+4JJ4ujx2DiipEGxCXIvI oRavyeUNzeip5Su/UU9sc/SO9dC1cSol4bMiwi8nxnWsOp2nWGapnhoffRn+NRNrR7Ql 9rVTXTkhAqWnJKeJ/2v3/BUkvk8pf4EWG+8FTEN5s7bxkYa8/Q2NoqRNVyubEjLV/lGr r8HQ== X-Gm-Message-State: AOAM531W0MSJuOBZCYbKTceN7iS9IE2gmiNa6u0ywhFtKSg4CXlMxLfi pEGdKL4jRf1tHWlzUc1sVhM= X-Google-Smtp-Source: ABdhPJy9fV2SWSmcC1doME3JkqxQfxIRZBIHSngS8rVZEFTFIZr2aJNzbTAgmE/h4NiLmipSLKrW4g== X-Received: by 2002:a1c:bb84:: with SMTP id l126mr12665937wmf.159.1601890802409; Mon, 05 Oct 2020 02:40:02 -0700 (PDT) Original-Received: from krug ([89.180.147.115]) by smtp.gmail.com with ESMTPSA id k6sm11708173wmi.1.2020.10.05.02.40.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Oct 2020 02:40:01 -0700 (PDT) In-Reply-To: (Gregory Heytings's message of "Mon, 05 Oct 2020 07:52:17 +0000") Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=joaotavora@gmail.com; helo=mail-wm1-x336.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:257094 Archived-At: Gregory Heytings writes: > Part 1 of the solution (which solves the "root" problem, and is not > specific to icomplete-vertical): Right. I appreciate this separation: solve a bug _then_ implement a feature. Now, as far as I understand Eli and remaining maintainers are not OK with your bugfix. This I have no opinion about, except for finding your expectation of "auto-enlargement" reasonable at first sight. Other than that, I haven't studied the matter. But hopefully we should all agree on basic icomplete-independent behaviour and come up with a fix that is acceptable for all. > Part 2 of the solution (which implements icomplete-vertical): > (setq icomplete-separator "\n") > (add-hook 'icomplete-minibuffer-setup-hook (lambda () (setq start-display= -at-beginning-of-minibuffer t))) > (defun icomplete-vertical-reformat-completions (completions) > (save-match-data > (if (string-match "^\\((.*)\\|\\[.+\\]\\)?{\\(\\(?:.\\|\n\\)+\\)}" co= mpletions) > (format "%s \n%s" (or (match-string 1 completions) "") (match-str= ing 2 completions)) > completions)))n > (advice-add 'icomplete-completions :filter-return > #'icomplete-vertical-reformat-completions) > > The only limit of this solution is that is is not possible to display > an ellipsis ("...") at the end of the completion candidates list, to > indicate that some completion candidates are not displayed. This is a > minor limitation, and IMO using one screen line just to display "..." > is a waste of resources. Yeah, I agree. For example, in my verticality thing I would even remove one extra feature of your implementation that I don't find useful: the indentation of the candidates. These are features that can be of course implemented _separately_. Jo=C3=A3o