From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: Add user customization fido-completion-styles Date: Tue, 02 Jun 2020 18:03:41 +0100 Message-ID: <87wo4pl7rm.fsf@gmail.com> References: <87r1uzn018.fsf@gmail.com> <87lfl5fpbx.fsf@gnu.org> <87h7vtfm9m.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="33191"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.91 (gnu/linux) Cc: emacs-devel To: Andrew Schwartzmeyer Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jun 02 19: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 1jgAR5-0008Yf-17 for ged-emacs-devel@m.gmane-mx.org; Tue, 02 Jun 2020 19:10:47 +0200 Original-Received: from localhost ([::1]:53350 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jgAR4-0005hS-2J for ged-emacs-devel@m.gmane-mx.org; Tue, 02 Jun 2020 13:10:46 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39972) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jgAKK-0001Is-8Z for emacs-devel@gnu.org; Tue, 02 Jun 2020 13:03:48 -0400 Original-Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]:39021) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jgAKJ-0007dB-2D for emacs-devel@gnu.org; Tue, 02 Jun 2020 13:03:47 -0400 Original-Received: by mail-wr1-x42f.google.com with SMTP id t18so4152240wru.6 for ; Tue, 02 Jun 2020 10:03:46 -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=vxmt7zEg2Cpep3xZnc17TLxChAPx1+QiJu2NOpqIidw=; b=Wxos1dFw5xOBGmbGRssPjx2YX5r4EnsJSy/mMY7qSofKs5xRxCjNDmp0FZs+En2WTW UYZ7PBsIrDzbGLLWhJPFbxxlMYEocmuz7BCnwPGkHEakzU5Vgz4bk0YzTdHY+0skgfUc XP7EoNnmQIxDnR9sQemRBfwuzym9bLOib9P2VHKym/dMGBZh48TNWPoACFvua94VUmzD V4GB3x+eQWDYyKkkKiTUD+cNvZmyTS7DSJ27Y7iugueB4rZWONsIU6SKxDfTpSgznT6s sxbvjBxFZ8JQ8UZkiGIshlNZicoNwbyVRFv/6IU2gWdynnKgKfdSyvp8pJxnN509zbn9 fy2w== 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=vxmt7zEg2Cpep3xZnc17TLxChAPx1+QiJu2NOpqIidw=; b=dWixx69Q0dweQSpybrdiVcRdpLkc+TceEc4262CW1ZWJhdoBQY2xt3JMWgr/o7wBuU ieq+SpLv0QPhHOhtPXI6Ei/8/VNwds4azsVfxQs/miYhe4k4CLWFeLcgukx0zV2sutfX HQNyvTAh/EAi7sNjlFoEjPe4PGULxxHefNsEkL2fVF0oyAXk2abJC9Che2/bHP7RvQBm wMQbUfTRCTAPmrJwnIFpcEhC1i+OCGXotKD0ZOZzyofbgjVbT/IyXsMomFIchOqrZxjw HmE4AkDhB4Vlknl6DNRkdoBohN5cghOcnwKcHzIz+iVuH2ZzdWpOuvkvdCiv1rPcXuFV 86/w== X-Gm-Message-State: AOAM531axE3hrPtk6MP20ju/qxyTY2dgg1ep9NB6NHKUKQia3qRh2sZ4 eqaen8EpVrIdvt6uQmdxtBGOPNru+BQ= X-Google-Smtp-Source: ABdhPJwJocsmYaQUi4xnf7bMt6rRXCvjQIDbqebIm/FFodk5SpgFuRYUpf+FE2EgCnYj5v7Brs6npA== X-Received: by 2002:adf:f882:: with SMTP id u2mr29041831wrp.40.1591117424596; Tue, 02 Jun 2020 10:03:44 -0700 (PDT) Original-Received: from krug (89-180-144-241.net.novis.pt. [89.180.144.241]) by smtp.gmail.com with ESMTPSA id j11sm4613723wru.69.2020.06.02.10.03.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jun 2020 10:03:43 -0700 (PDT) In-Reply-To: <87h7vtfm9m.fsf@gnu.org> (Tassilo Horn's message of "Tue, 02 Jun 2020 18:47:01 +0200") Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=joaotavora@gmail.com; helo=mail-wr1-x42f.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: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.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, FROM_EXCESS_BASE64=0.979, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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:251765 Archived-At: Tassilo Horn writes: >> You can try icomplete-mode directly if you don't like fido-mode's. >> fido-mode is a small customization layer on top of it that makes some >> choices for you. > > Yes, I know. And except for the change in completion-styles, I like it. > Not so much for plain icomplete-mode where the fido keybindings are > missing. You can grab all the bindings of fido-mode in one swoop like this, I think you can put this: (use-local-map (make-composed-keymap icomplete-fido-mode-map (current-local-map))) Somewhere in your icomplete-minibuffer-setup-hook. > I don't know when this happens, but it might be that it is before > `icomplete-minibuffer-setup-hook' is called and then setting > `completion-category-overrides' wouldn't have an effect. I'll test... If it helps, here is a list of the variables that fido-mode sets for you. (setq-local icomplete-tidy-shadowed-file-names t icomplete-show-matches-on-no-input t icomplete-hide-common-prefix nil completion-styles '(flex) completion-flex-nospace nil completion-category-defaults nil) It seems to leave `completion-category-overrides' alone, so you should be able to use to have the last word. If completion-category-overrides were to allow `t` entries, or some kind of catch-all, then it would be the "ultimate" last word. This would make sense to me, and fido-mode would commit to not touching that variable explicitly. I think this would make an(other) elegant solution for this question, don't you think? Jo=C3=A3o