From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: Feedback on fido-mode Date: Tue, 10 Mar 2020 00:43:48 +0200 Message-ID: <5a2a5c65-f112-0c17-fbf7-80cf4d88d5ab@yandex.ru> References: <87o8t8fb5w.fsf@alphapapa.net> <83blp5bggk.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="111878"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 Cc: Adam Porter , emacs-devel To: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= , Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Mar 09 23:44:58 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 1jBR8r-000T01-H8 for ged-emacs-devel@m.gmane-mx.org; Mon, 09 Mar 2020 23:44:57 +0100 Original-Received: from localhost ([::1]:50862 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jBR8q-0004kz-HC for ged-emacs-devel@m.gmane-mx.org; Mon, 09 Mar 2020 18:44:56 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42325) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jBR7q-0003vP-TP for emacs-devel@gnu.org; Mon, 09 Mar 2020 18:43:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jBR7p-00033P-RT for emacs-devel@gnu.org; Mon, 09 Mar 2020 18:43:54 -0400 Original-Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]:33884) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jBR7p-000328-Jx; Mon, 09 Mar 2020 18:43:53 -0400 Original-Received: by mail-wr1-x431.google.com with SMTP id z15so13345530wrl.1; Mon, 09 Mar 2020 15:43:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=/LtEx1OJnXO6BJoJXDbgUGJ1LvgRgmLPiv0t4TIz/FU=; b=XICOlLEzFI8ulOEhKsNLlgyskKQgLj3xy7Jd8702E6vxjcSAGUViTppetQ/O6AmEme ElEzPKxWA/2qJ0DGopcaHLYCP6XXHxr7V2PG5RLwJ4koM9ioGBYG4E0D/S7TTmHdN5dU VVzeH10I2V4HjM3id3aQLuaZLIAMlbffuTlPqYV5vIhpjJlvc1NA9XAz0alyN6nQBaMV CuX/VT7FricO8urZWKgCQwF0fhsZoKw8EUe474+/6zK3yCb9+qJDoUu9ZRs7DwazBkUY DEWuS3hp9OtKI3lzwQZ8ixsqmJR0/yqGGJ9jTt4P9ha1PvDGIuYDaoneRQp1MrGEEdRh CqCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=/LtEx1OJnXO6BJoJXDbgUGJ1LvgRgmLPiv0t4TIz/FU=; b=bqtwusYK3ZobYGcu5WkDMwGKY/dzNLki+/DVThp7MWXno11jjegL0DSgc3PPmQVA3j j67HMG/QbRKmnOEKtMxLMAKdUZvJCw7m3aqztAqISCTuJ+gBGa3dCvvnw5vbbLh9ussl 0WprVYILxB6yanVp/ns5ObHn4SOsMFqRcD9z+k8ML1hANsRGIbtM+MrIVUbgQ8ldz+lE UcCgFa03LRx2ZN5y0bkLvxnlvMTTsA6yvP/fgwdYtWvoiha/XeTHYHu26vfc+OnZwurK KbFvkGfBC2+X6RSGgb5dKzAEY4u3FTEmizGjGR0I/rQD11ZpJbfG8svDw5teeOqv3i7/ l19w== X-Gm-Message-State: ANhLgQ3jGrm96oOEzCD7IDDoGpeJR0Nr/zcws8eQz9t4FI5pyfSN/9Qc Hmca89+2Hjzw8tq+1PfkiWoCB/Rk X-Google-Smtp-Source: ADFU+vtDreTCiCoGyIUtQ8hj1OKu4zSSLvlJgS9Mh6g+IGAguhnkK/FFy5GeNSTq03TB1JejJyhLfA== X-Received: by 2002:a5d:6245:: with SMTP id m5mr17372761wrv.154.1583793831451; Mon, 09 Mar 2020 15:43:51 -0700 (PDT) Original-Received: from [192.168.0.2] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id x13sm900254wmj.5.2020.03.09.15.43.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Mar 2020 15:43:50 -0700 (PDT) In-Reply-To: Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::431 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:245421 Archived-At: On 09.03.2020 19:14, João Távora wrote: > Thanks. I've now skimmed the list and many of the complaints don't > seem to have an obvious "fix" in fido-mode or even in Emacs itself, > so unless more concrete problems appear, it's unlikely that I will be > changing anything. Defining named vars for styles config in fido-mode could make it easier to tweak, like Adam tried to do in step 5. Patch below for your consideration. That's admittedly a half-measure since the 'substring' style is strictly less powerful than 'flex'. And we can't really use spaces for wildcards, so it still won't be as easy to use as Ivy or Helm. Tweaking the 'flex' style to prefer consecutive matches more strongly could also improve the experience in this particular scenario, although I'm not sure it would be the best choice overall. diff --git a/lisp/icomplete.el b/lisp/icomplete.el index 66bc731f67..490bf31cb0 100644 --- a/lisp/icomplete.el +++ b/lisp/icomplete.el @@ -320,6 +320,14 @@ icomplete-fido-mode-map map) "Keymap used by `fido-mode' in the minibuffer.") +(defcustom icomplete-fido-completion-styles '(flex) + "Completion styles used by `fido-mode' in the minibuffer." + :type 'list) + +(defcustom icomplete-fido-category-defaults nil + "Values to use for `completion-category-defaults' in `fido-mode'." + :type 'list) + (defun icomplete--fido-mode-setup () "Setup `fido-mode''s minibuffer." (when (and icomplete-mode (icomplete-simple-completing-p)) @@ -328,8 +336,8 @@ icomplete--fido-mode-setup (setq-local icomplete-tidy-shadowed-file-names t icomplete-show-matches-on-no-input t icomplete-hide-common-prefix nil - completion-styles '(flex) - completion-category-defaults nil))) + completion-styles icomplete-fido-completion-styles + completion-category-defaults icomplete-fido-category-defaults))) ;;;###autoload (define-minor-mode fido-mode