From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 05 09:05:02 2021 Received: (at submit) by debbugs.gnu.org; 5 Aug 2021 13:05:02 +0000 Received: from localhost ([127.0.0.1]:46161 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBd3W-00054q-DX for submit@debbugs.gnu.org; Thu, 05 Aug 2021 09:05:02 -0400 Received: from lists.gnu.org ([209.51.188.17]:51192) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBd3U-00054N-8C for submit@debbugs.gnu.org; Thu, 05 Aug 2021 09:05:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33428) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mBd3T-0003Gb-JJ for bug-gnu-emacs@gnu.org; Thu, 05 Aug 2021 09:04:59 -0400 Received: from latitanza.investici.org ([2001:888:2000:56::19]:45985) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mBd3Q-0007pg-PI for bug-gnu-emacs@gnu.org; Thu, 05 Aug 2021 09:04:59 -0400 Received: from mx3.investici.org (unknown [127.0.0.1]) by latitanza.investici.org (Postfix) with ESMTP id 4GgTNC3D1szGp57 for ; Thu, 5 Aug 2021 13:04:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inventati.org; s=stigmate; t=1628168683; bh=Ti2VVTimIiF6qp90lr9vLegke3F2lFU6Vqq/tINjXQU=; h=To:Subject:From:Date:From; b=TtCHRvgfkCYoPZrgp9PYYbbwsTpFAAOOeZKFzF3y4KS/NOSmzaYrReX2RyqosMSae LoCTQ8KC69tibGBQvuodkhm3opNRiL758caKe8MkRyDeuQKUXgG0k0V/IV1IGSxaHO EX9RVPHNbrqv+kr7qoKkwrvXMhdcp4DLR8eOE//o= Received: from [82.94.249.234] (mx3.investici.org [82.94.249.234]) (Authenticated sender: manuel.uberti@inventati.org) by localhost (Postfix) with ESMTPSA id 4GgTNC2T3XzGp4c for ; Thu, 5 Aug 2021 13:04:43 +0000 (UTC) To: bug-gnu-emacs@gnu.org Subject: 28.0.50; fido-mode not sorting by recency From: Manuel Uberti Message-ID: <1dec2c8a-fc9e-a70c-f236-9b1887ca384f@inventati.org> Date: Thu, 5 Aug 2021 15:04:40 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=2001:888:2000:56::19; envelope-from=manuel.uberti@inventati.org; helo=latitanza.investici.org 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, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) In 'emacs -Q', this is what I did: - M-x savehist-mode RET - M-x fido-mode RET - M-x icomplete-vertical-mode RET - M-x emacs-init-time - C-x p p, pick a Git-versioned directory RET - f, pick the fourth candidate, C-x k RET - M-x now shows pr-ps-file-preview on top - C-x p p, pick the only available project - C-x p f does not offer the previously selected candidate Is it possible to make fido-mode sort the candidates by recency? In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.18, cairo version 1.16.0) of 2021-08-05 built on hathaway Repository revision: 50d3178a4fa6fbfaaaeee7025e8d9ad3a070aea0 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12009000 System Description: Ubuntu 20.04 LTS Configured using: 'configure --with-harfbuzz --with-native-compilation' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM GTK3 ZLIB Important settings: value of $LC_MESSAGES: en_GB.UTF-8 value of $LC_MONETARY: it_IT.UTF-8 value of $LC_NUMERIC: it_IT.UTF-8 value of $LC_TIME: it_IT.UTF-8 value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=ibus locale-coding-system: utf-8-unix Major mode: ELisp/l Minor modes in effect: icomplete-vertical-mode: t icomplete-mode: t fido-mode: t savehist-mode: t tooltip-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs rfc822 mml mml-sec epa derived epg epg-config gnus-util rmail rmail-loaddefs auth-source eieio eieio-core eieio-loaddefs password-cache json map text-property-search time-date mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils thingatpt pp vc-mtn vc-hg vc-git diff-mode easy-mmode vc-bzr vc-src vc-sccs vc-svn vc-cvs vc-rcs comp comp-cstr warnings subr-x rx cl-seq cl-macs cl-extra help-mode vc vc-dispatcher project seq byte-opt gv bytecomp byte-compile cconv time icomplete cl-loaddefs cl-lib cus-start cus-load savehist iso-transl tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit x multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 113322 10791) (symbols 48 10241 0) (strings 32 29042 1772) (string-bytes 1 917069) (vectors 16 18702) (vector-slots 8 322889 12691) (floats 8 37 275) (intervals 56 295 33) (buffers 992 12)) -- Manuel Uberti www.manueluberti.eu From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 15 04:22:12 2021 Received: (at 49888) by debbugs.gnu.org; 15 Aug 2021 08:22:12 +0000 Received: from localhost ([127.0.0.1]:45702 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mFBPI-0004im-64 for submit@debbugs.gnu.org; Sun, 15 Aug 2021 04:22:12 -0400 Received: from mail-wr1-f43.google.com ([209.85.221.43]:37663) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mFBPH-0004iY-D4 for 49888@debbugs.gnu.org; Sun, 15 Aug 2021 04:22:11 -0400 Received: by mail-wr1-f43.google.com with SMTP id r6so19214209wrt.4 for <49888@debbugs.gnu.org>; Sun, 15 Aug 2021 01:22:11 -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=LllJukjk9uWIiz3HJGk7zeuJKBOsawdHJCFYhovf3mo=; b=lVLscR3PLJdrnD0SaajZscda/DPzDDnh5VG2mqik58oDv8BnDXVVfjZJqvykt35R4R ZSpgf5p7VbJv5HShpEYmSOfBRFz2+0fVKzgfz+6WiLM5kJz0yjqmxFMAv2si4AHz0Ydn zb21SPcrHdF5A6B1REuUdgGdTu3tLXwjVeOhxjFmXLkenY4UJshwBbMuJWg9NjamJ1aL Pf4hePoUg1IQsuS5uD2YJYEXqLSsNgX3XZ6JUjsSA1jOC1pAh3agTeDFRmeDx3kJJMpq vyA9s7txUMyewzQmK4RLyO22/aptAao+QNec1Elaj7gD0OmrYN5uTAhRgNpAZ2cS2RgL nswQ== 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=LllJukjk9uWIiz3HJGk7zeuJKBOsawdHJCFYhovf3mo=; b=TR8LScnwtCWT8btHi6xrmD4l9D3Yxfj2hxg972XxjFMIzPof+LZ5MoEw4doyB83Py+ NXCmpJqI8PZ2vY51rCZVloTg8Ek7hKDjuoB5/iy3UELyUtHb8esfpQneAkWX+MaJC1aQ 0UChXCt/NSE7pkdFaXQzM46WQUSU1KB3Fr0WGShP+S5Pv9uYyIv35hONjrvyo4J3wZqi mH3VStO0ceIzKbIXd/rBM14Ad9lDJd4XhcrfPeZOSqRjyNkBkkwqGAPKWJta+OU7E7Xg HfjY22b9Q/y/jc5OPqnXuAKRWxV3TdeTvFCFQ5jQTAVyW1uMn0v6tpgqDxkM/o8Xj2D5 kgVg== X-Gm-Message-State: AOAM530EI3H7stKFDsRT7oGYi34cHqtxPtLI/P7nLj24X1U5sCO2SjV4 lvTdJFUa2alKqZSqp2LLHZHB8oRiv64= X-Google-Smtp-Source: ABdhPJxErMbsiDkwhu6U2Op4ehDSi2jolq6piEwLw5OzFiD5Rr5Qjc7rzMUrkkPf1EU2QVzZ3wQ1lQ== X-Received: by 2002:a5d:4207:: with SMTP id n7mr12008467wrq.138.1629015725518; Sun, 15 Aug 2021 01:22:05 -0700 (PDT) Received: from krug (a94-133-27-132.cpe.netcabo.pt. [94.133.27.132]) by smtp.gmail.com with ESMTPSA id m6sm55625wms.42.2021.08.15.01.22.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Aug 2021 01:22:05 -0700 (PDT) From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= To: Manuel Uberti Subject: Re: bug#49888: 28.0.50; fido-mode not sorting by recency References: <1dec2c8a-fc9e-a70c-f236-9b1887ca384f@inventati.org> Date: Sun, 15 Aug 2021 09:22:03 +0100 In-Reply-To: <1dec2c8a-fc9e-a70c-f236-9b1887ca384f@inventati.org> (Manuel Uberti's message of "Thu, 5 Aug 2021 15:04:40 +0200") Message-ID: <87bl5zxglw.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 49888 Cc: 49888@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Manuel Uberti writes: > In 'emacs -Q', this is what I did: > > - M-x savehist-mode RET > - M-x fido-mode RET > - M-x icomplete-vertical-mode RET > - M-x emacs-init-time > - C-x p p, pick a Git-versioned directory RET > - f, pick the fourth candidate, C-x k RET > - M-x now shows pr-ps-file-preview on top > - C-x p p, pick the only available project > - C-x p f does not offer the previously selected candidate > > Is it possible to make fido-mode sort the candidates by recency? Thanks for the report. Seems like a nice reproduction recipe. But it seems like it demonstrates the problem for two fido-mode-using things, right? M-x _and_ C-x p p RET f, right? No problem, just checking. Indeed, ido-mode was quited perfected in recency stuff. I was hard and still kind is to give up on its very nice default M-p binding that searches the recent history with whatever you have entered as a pattern. I used to use that all the time, and still haven't found a nice substitute in fido-mode or any other completer for that matter. Jo=C3=A3o From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 15 04:34:31 2021 Received: (at 49888) by debbugs.gnu.org; 15 Aug 2021 08:34:31 +0000 Received: from localhost ([127.0.0.1]:45707 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mFBb9-000522-BL for submit@debbugs.gnu.org; Sun, 15 Aug 2021 04:34:31 -0400 Received: from latitanza.investici.org ([82.94.249.234]:37101) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mFBb3-00051p-Av for 49888@debbugs.gnu.org; Sun, 15 Aug 2021 04:34:25 -0400 Received: from mx3.investici.org (unknown [127.0.0.1]) by latitanza.investici.org (Postfix) with ESMTP id 4GnVvc052VzGp3H; Sun, 15 Aug 2021 08:34:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inventati.org; s=stigmate; t=1629016460; bh=VB1AeZIAxdxyaQLItQRgmXae1lr0/cE/EqPaG0Z2DoQ=; h=To:Cc:References:From:Subject:Date:In-Reply-To:From; b=iW+u/AIjPiLcFtXSkhhAOMORM9W5A3waOVbT9OB+2/qsL1oQDxgvZ9RHKoeUlXytA vl/pmlSPfxsI3oFDEsLhRVdG+E6MqNtCmRdf7ighGV3+xawZ51TEf1C4CtoHzxQCWS n5bUN1Uc20KPidewx+0ZHdcF2uF3ZHpl0ymhIyY0= Received: from [82.94.249.234] (mx3.investici.org [82.94.249.234]) (Authenticated sender: manuel.uberti@inventati.org) by localhost (Postfix) with ESMTPSA id 4GnVvb6KDpzGp2b; Sun, 15 Aug 2021 08:34:19 +0000 (UTC) To: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= References: <1dec2c8a-fc9e-a70c-f236-9b1887ca384f@inventati.org> <87bl5zxglw.fsf@gmail.com> From: Manuel Uberti Subject: Re: bug#49888: 28.0.50; fido-mode not sorting by recency Message-ID: <5d2b912a-0056-cd96-009d-44b32594eafe@inventati.org> Date: Sun, 15 Aug 2021 10:34:19 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <87bl5zxglw.fsf@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 8bit X-Spam-Score: -0.1 (/) X-Debbugs-Envelope-To: 49888 Cc: 49888@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.1 (-) On 15/08/21 10:22, João Távora wrote: > Thanks for the report. Seems like a nice reproduction recipe. But it > seems like it demonstrates the problem for two fido-mode-using things, > right? M-x _and_ C-x p p RET f, right? No problem, just checking. Yes, both M-x and C-x p p RET f, but the same is true for C-x p f once I am in a project. I used those two as examples because they are two of my most use commands and, among those, the ones with usually more candidates than the rest. I feel like recency could make a difference especially with commands like these (i.e., commands with a lot of candidates) in terms of how quickly I can find what I am looking for. > Indeed, ido-mode was quited perfected in recency stuff. I was hard and > still kind is to give up on its very nice default M-p binding that > searches the recent history with whatever you have entered as a > pattern. I used to use that all the time, and still haven't found a > nice substitute in fido-mode or any other completer for that matter. True, although I still find M-p useful in fido-mode especially in M-x when I want to reach for the last or second-to-last command. -- Manuel Uberti www.manueluberti.eu From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 15 08:11:45 2021 Received: (at 49888) by debbugs.gnu.org; 15 Aug 2021 12:11:45 +0000 Received: from localhost ([127.0.0.1]:45966 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mFEzN-0000VN-Sc for submit@debbugs.gnu.org; Sun, 15 Aug 2021 08:11:45 -0400 Received: from mail-wr1-f41.google.com ([209.85.221.41]:34345) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mFEzI-0000V6-S5 for 49888@debbugs.gnu.org; Sun, 15 Aug 2021 08:11:40 -0400 Received: by mail-wr1-f41.google.com with SMTP id h13so19739363wrp.1 for <49888@debbugs.gnu.org>; Sun, 15 Aug 2021 05:11:36 -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; bh=EJ20ztefS1G1li/OySc/lN2GEECAspmKWEKEmNg4XRY=; b=EBgBTwMum+9fjrdQbhpAaq5sTQJbUxevp/Rf1kz4aGwih7vPxYJ5tTsuAgpD/6ZV00 HYSTWmA4GoJ96OnEs+mz7cb/P29dFLK3xXjL0R1+YT1k9silMoGsrbgOix02KK9wvGBw 5TlgtRpzCSRinw17ucId7r49sq5U8l2aTxvJ92SZa3YkXE8k5gK6PmstBHKnqVlplYyk xwFUlA31hRCcjDn0ZI6ZHII6UXNxRfAFRXhD6gIZ1QK81mL43NkN8LXToofLCBBh/xff anXTe0uY4Gh3mNQGXfd+Qg28n3/mul605bO85ud5lwfA6KzyhCLvfC/Xb6rgv7rkbSE2 z1zQ== 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=EJ20ztefS1G1li/OySc/lN2GEECAspmKWEKEmNg4XRY=; b=CFt0UxzaACon9egZ7AjQg8Vi6/qNTl3iX48ejNKdF2CtvhkO3FeS5Q5hFvr16R5UGQ AfGmzlwPvZAiOdIbq1PUaV3M+uRri3pj0OzwN4xH0KwhKXT8cXKQOqS5FZFjyNxLs4JY VobIgGzf0d5UtgtbCDxHeu6Y6dChSG2IBNTrHRYkIdeCwSjiM8mfTpsPYvYh7csNS9Cz yd1QIm41YJlSUTFtMI32y1XB6/rifOiMjwmFJd0A8jyNkMT8LyzY1E5Dunx6w0A5D1uE mRVTNKY4DrqQvIIwISYaIiJirJMQQBCGAXxGlzKiVPWxEZLvGiKbTvtRDqkSviGmIDuO FlqA== X-Gm-Message-State: AOAM533dyImHtrSWHQJWK2UJ+LYoP2SHbWkc6LXYmrvTQPJhuvIdJcZQ 0D67LenTgjRGtmgAB5XS33g3eN3dcpU= X-Google-Smtp-Source: ABdhPJyCHd1fwm4Qkkw42hR80yWC0GyFU1xkV8hh3N5VAxvn8uqmuvFwAB86zrsDe8fDpAVagqBSnQ== X-Received: by 2002:adf:80e8:: with SMTP id 95mr13092144wrl.388.1629029490630; Sun, 15 Aug 2021 05:11:30 -0700 (PDT) Received: from krug (a94-133-27-132.cpe.netcabo.pt. [94.133.27.132]) by smtp.gmail.com with ESMTPSA id o6sm8165243wru.92.2021.08.15.05.11.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Aug 2021 05:11:30 -0700 (PDT) From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= To: Manuel Uberti Subject: Re: bug#49888: 28.0.50; fido-mode not sorting by recency References: <1dec2c8a-fc9e-a70c-f236-9b1887ca384f@inventati.org> Date: Sun, 15 Aug 2021 13:11:27 +0100 In-Reply-To: <1dec2c8a-fc9e-a70c-f236-9b1887ca384f@inventati.org> (Manuel Uberti's message of "Thu, 5 Aug 2021 15:04:40 +0200") Message-ID: <87k0kmx5zk.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 49888 Cc: 49888@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Manuel Uberti writes: > In 'emacs -Q', this is what I did: > > - M-x savehist-mode RET > - M-x fido-mode RET > - M-x icomplete-vertical-mode RET > - M-x emacs-init-time > - C-x p p, pick a Git-versioned directory RET > - f, pick the fourth candidate, C-x k RET > - M-x now shows pr-ps-file-preview on top > - C-x p p, pick the only available project > - C-x p f does not offer the previously selected candidate > > Is it possible to make fido-mode sort the candidates by recency? I've now taken a look at this. Yes, it is certainly possible and desirable _if_ there aren't any other overriding criteria. This has to do with the 'flex' completion style. In that style, if anything has been input that leads to "flexy" filtering, the default and correct behaviour is to sort by completion score. But if nothing has been input and there are basically no scores, it makes sense to fall back to a sensible strategy like the one you suggest. Try this patch. It will fix the M-x case, bugt not the C-x p f or C-x f cases unfortunately. Those will be harder to fix. diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index 1e8e9fc624..36d95ad5f5 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -3947,27 +3947,36 @@ completion--flex-adjust-metadata ((compose-flex-sort-fn (existing-sort-fn) ; wish `cl-flet' had proper indentation... (lambda (completions) - (let ((pre-sorted - (if existing-sort-fn - (funcall existing-sort-fn completions) - completions))) - (cond - ((or (not (window-minibuffer-p)) - ;; JT@2019-12-23: FIXME: this is still wrong. What - ;; we need to test here is "some input that actually - ;; leads to flex filtering", not "something after - ;; the minibuffer prompt". Among other - ;; inconsistencies, the latter is always true for - ;; file searches, meaning the next clauses will be - ;; ignored. - (> (point-max) (minibuffer-prompt-end))) - (sort - pre-sorted - (lambda (c1 c2) - (let ((s1 (get-text-property 0 'completion-score c1)) - (s2 (get-text-property 0 'completion-score c2))) - (> (or s1 0) (or s2 0)))))) - (t pre-sorted)))))) + (cond + (;; Sort by flex score whenever outside the minibuffer or + ;; in the minibuffer with some input. JT@2019-12-23: + ;; FIXME: this is still wrong. What we need to test here + ;; is "some input that actually leads to flex filtering", + ;; not "something after the minibuffer prompt". Among + ;; other inconsistencies, the latter is always true for + ;; file searches, meaning the next clauses in this cond + ;; will be ignored. + (or (not (window-minibuffer-p)) + (> (point-max) (minibuffer-prompt-end))) + (sort + (if existing-sort-fn + (funcall existing-sort-fn completions) + completions) + (lambda (c1 c2) + (let ((s1 (get-text-property 0 'completion-score c1)) + (s2 (get-text-property 0 'completion-score c2))) + (> (or s1 0) (or s2 0)))))) + (;; If no existing sort fn and nothing flexy happening, use + ;; the default sort. + (not existing-sort-fn) + (let ((la (minibuffer--sort-by-length-alpha completions)) + (hist (and (minibufferp) + (and (not (eq minibuffer-history-variable t)) + (symbol-value minibuffer-history-variable))))) + ;; Sort by history position, put the default, if it + ;; exists, on top. + (if hist (minibuffer--sort-by-position hist la) la))) + (t completions))))) `(metadata (display-sort-function . ,(compose-flex-sort-fn From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 15 08:19:53 2021 Received: (at 49888) by debbugs.gnu.org; 15 Aug 2021 12:19:53 +0000 Received: from localhost ([127.0.0.1]:46001 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mFF7J-0002wY-JU for submit@debbugs.gnu.org; Sun, 15 Aug 2021 08:19:53 -0400 Received: from mail-wr1-f52.google.com ([209.85.221.52]:38464) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mFF7H-0002wI-J4 for 49888@debbugs.gnu.org; Sun, 15 Aug 2021 08:19:51 -0400 Received: by mail-wr1-f52.google.com with SMTP id u16so2587473wrn.5 for <49888@debbugs.gnu.org>; Sun, 15 Aug 2021 05:19:51 -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=Pqq9A79aY5poNlxf+RSsFaNb3Fy/eznI7lliMBH4aNU=; b=F+aMvvsDpOtxd7Tre6/PyccMm0evnTxQyot3CHqBYnFW2Ee9X4tV35yWg+dhspypxO P0aiJOHkR4jyfzpZwi9SEaykyTbaN0OZq7bZHOtEA3GFfvDuiCtOSiBxGJ/HF2Gj0sE0 HewFWM8KYoW6A0etffXCbREBA6a00e4fcCvBhvnISGhoVFNrdKGeFmr5aQgfGAlzoppk o/4hPoJwP//4RHvrGWmNpwuDc0J4PSKdwu7gN1+nblmM24NMlzj7g++CD8PO23wh6Ll+ 71o1aYrUKaz+Wlpadf7UzTH3loDd62dVpBJrbICFLZgnh2b0omH6V842DJWMIPfHPKGE fVhw== 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=Pqq9A79aY5poNlxf+RSsFaNb3Fy/eznI7lliMBH4aNU=; b=ABSHRSR4u840tfIjlxLj2RIm/S7EF4BqxXPX86ubaqykYAK7j6YkJmHtjBCZRE6Xza Hk2jjVm+S9GaX3LWeUvxe6+421nvY+glIqRe59htrLzSrDeoHrOsqmTrGAHcvSOCi6jJ jUTaIAvfGxjpJfkWrVYgz2VlKP1nayUMglNZwjctAfrh+pgtPpMFEsxtiytey62YWNK9 KlksuOMRM5jT2qFemyg21HxiZJICMQhP7jGtuPP6w4hzhFn2+OciIuyblV4lP95yZfzD QmtAMDQMwHKRR3sc0kpoQxVrmLd66Kt5C7iKL9Kif7j5QJ8ld00OpvUfQqMXxwD7O+5b g5Kw== X-Gm-Message-State: AOAM530L01Kc3bnq4GUkxlW5yweKuPY1dikgp370hLEZQIsM/l7c4IdW y3OJaWxG3QBQWadoIPtMgevJUul6zC8= X-Google-Smtp-Source: ABdhPJxLHMS30PWkEwzAVyVWqHNgrFEMhHAIFNkexsDMynLcr61/eVKR3q9nDlyMH73hU/+RiBHA2w== X-Received: by 2002:a5d:5085:: with SMTP id a5mr13745760wrt.62.1629029985310; Sun, 15 Aug 2021 05:19:45 -0700 (PDT) Received: from krug (a94-133-27-132.cpe.netcabo.pt. [94.133.27.132]) by smtp.gmail.com with ESMTPSA id r10sm7946389wrp.28.2021.08.15.05.19.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Aug 2021 05:19:44 -0700 (PDT) From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= To: Manuel Uberti Subject: Re: bug#49888: 28.0.50; fido-mode not sorting by recency References: <1dec2c8a-fc9e-a70c-f236-9b1887ca384f@inventati.org> <87k0kmx5zk.fsf@gmail.com> Date: Sun, 15 Aug 2021 13:19:43 +0100 In-Reply-To: <87k0kmx5zk.fsf@gmail.com> (=?utf-8?Q?=22Jo=C3=A3o_T=C3=A1vor?= =?utf-8?Q?a=22's?= message of "Sun, 15 Aug 2021 13:11:27 +0100") Message-ID: <87fsvax5ls.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 49888 Cc: 49888@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Jo=C3=A3o T=C3=A1vora writes: > Manuel Uberti writes: > >> In 'emacs -Q', this is what I did: >> >> - M-x savehist-mode RET >> - M-x fido-mode RET >> - M-x icomplete-vertical-mode RET >> - M-x emacs-init-time >> - C-x p p, pick a Git-versioned directory RET >> - f, pick the fourth candidate, C-x k RET >> - M-x now shows pr-ps-file-preview on top >> - C-x p p, pick the only available project >> - C-x p f does not offer the previously selected candidate >> >> Is it possible to make fido-mode sort the candidates by recency? > > I've now taken a look at this. Yes, it is certainly possible and > desirable _if_ there aren't any other overriding criteria. This has to > do with the 'flex' completion style. In that style, if anything has > been input that leads to "flexy" filtering, the default and correct > behaviour is to sort by completion score. > > But if nothing has been input and there are basically no scores, it > makes sense to fall back to a sensible strategy like the one you > suggest. > > Try this patch. It will fix the M-x case, bugt not the C-x p f or C-x f > cases unfortunately. Those will be harder to fix. Actually, I correct that. C-x f will be harder to fix, but C-x p f and C-x p p RET f work just fine! So I think I will commit this correction to the flex completion style. It's indeed extremely useful, especially for C-x p f, which I now also use a lot. Jo=C3=A3o From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 15 08:39:08 2021 Received: (at 49888-done) by debbugs.gnu.org; 15 Aug 2021 12:39:08 +0000 Received: from localhost ([127.0.0.1]:46037 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mFFPv-0005ep-Ts for submit@debbugs.gnu.org; Sun, 15 Aug 2021 08:39:08 -0400 Received: from mail-wr1-f47.google.com ([209.85.221.47]:37807) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mFFPt-0005eH-Ss for 49888-done@debbugs.gnu.org; Sun, 15 Aug 2021 08:39:06 -0400 Received: by mail-wr1-f47.google.com with SMTP id r6so19778899wrt.4 for <49888-done@debbugs.gnu.org>; Sun, 15 Aug 2021 05:39:05 -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=gyhsflC9YThBfAsJMEp2inuBWY2R76qH9/3Xkpr2Vuk=; b=g5GiYpnfT2H3QCZML5vJhUl03eeAXHmBxrg/3boUFMMq41RHFonoNNebJ9bb/aHyum RWXCzQLwRClNu2yWStJwAw47CMTLfKHy6eVoR6xejn29BcsNWYJNLY5i81HVK7Db1Q26 Sp5ZINOM30pdCY3WEOSSK1G+ADJeGIQrEYjt75DWwievEWKQQfoLyNdf6CmYepqs0igq BztUcyi0PhCYpU5WHp4duQBZkamSRni6oBK9qjbPox3AGRjQoHfFD0j3yajg80hSP2mm JwgHo77p84yy0ausLE0+j8gzVjzvXkNqKfVd+VPjEExDs7QcJqEiuB2R6WhPjqJhgMW3 aBGg== 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=gyhsflC9YThBfAsJMEp2inuBWY2R76qH9/3Xkpr2Vuk=; b=LswRwag/TGrs53ZZu7C1vVID1V4Y+lvGRHNlnjTx2SzRTLFdgFtgpw9rUmzNBoMs4U r2ECwvxRqT10iRZAayFnkZUsvCPf8RcpyZYL459SuhTi36qSWvnKC3fHZ6IXA7BvzGHe aQW6ANMDsRNMjV7xXYas144x3VFQIKOebMkaM0nqJcSBTex2VLogd9/8g/zu8QfQJfDl So0lhE9JitPQQ2bUO3zzfehzUKqPYhPkxUvNoUYMZ7H/xT7hZq9YJFZzsCr325xX2hnf Xkg00rNCMMz2E8ljw1FDJB68AyfmP+rrMIAeQpIAvD1uEUXluoT9DMW9mxIOgMXojvaM YmHw== X-Gm-Message-State: AOAM530pOwABqMQ9YNjU1/PpVBjLUL6G2IHfgSjCNn9XMyDZcA6x2s8B CksN1KmC6USsp4OjRWKTZbI= X-Google-Smtp-Source: ABdhPJwr5F8KjADa/zM6FTH3YaVbH9vIFjnlTiXyy6hM9F84jruk80o0F0SGnNnbL7zYHmCowHsc7Q== X-Received: by 2002:adf:f00d:: with SMTP id j13mr13736793wro.14.1629031140013; Sun, 15 Aug 2021 05:39:00 -0700 (PDT) Received: from krug (a94-133-27-132.cpe.netcabo.pt. [94.133.27.132]) by smtp.gmail.com with ESMTPSA id g6sm664867wmq.14.2021.08.15.05.38.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Aug 2021 05:38:59 -0700 (PDT) From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= To: Manuel Uberti Subject: Re: bug#49888: 28.0.50; fido-mode not sorting by recency References: <1dec2c8a-fc9e-a70c-f236-9b1887ca384f@inventati.org> <87k0kmx5zk.fsf@gmail.com> <87fsvax5ls.fsf@gmail.com> Date: Sun, 15 Aug 2021 13:38:58 +0100 In-Reply-To: <87fsvax5ls.fsf@gmail.com> (=?utf-8?Q?=22Jo=C3=A3o_T=C3=A1vor?= =?utf-8?Q?a=22's?= message of "Sun, 15 Aug 2021 13:19:43 +0100") Message-ID: <87bl5yx4pp.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 49888-done Cc: 49888-done@debbugs.gnu.org, larsi@gnus.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Jo=C3=A3o T=C3=A1vora writes: > Jo=C3=A3o T=C3=A1vora writes: > >> Manuel Uberti writes: >> >>> In 'emacs -Q', this is what I did: >>> >>> - M-x savehist-mode RET >>> - M-x fido-mode RET >>> - M-x icomplete-vertical-mode RET >>> - M-x emacs-init-time >>> - C-x p p, pick a Git-versioned directory RET >>> - f, pick the fourth candidate, C-x k RET >>> - M-x now shows pr-ps-file-preview on top >>> - C-x p p, pick the only available project >>> - C-x p f does not offer the previously selected candidate >>> >>> Is it possible to make fido-mode sort the candidates by recency? >> >> I've now taken a look at this. Yes, it is certainly possible and >> desirable _if_ there aren't any other overriding criteria. This has to >> do with the 'flex' completion style. In that style, if anything has >> been input that leads to "flexy" filtering, the default and correct >> behaviour is to sort by completion score. >> >> But if nothing has been input and there are basically no scores, it >> makes sense to fall back to a sensible strategy like the one you >> suggest. >> >> Try this patch. It will fix the M-x case, bugt not the C-x p f or C-x f >> cases unfortunately. Those will be harder to fix. > > Actually, I correct that. C-x f will be harder to fix, but C-x p f and > C-x p p RET f work just fine! I've just commited this fix: commit ab23fa4eb22f6557414724769958a63f1c59b49a (HEAD -> master, origin= /master, origin/HEAD) Author: Jo=C3=A3o T=C3=A1vora Date: Sun Aug 15 13:19:59 2021 +0100 =20=20=20=20=20 Sort by recency in flex completion style when no flexy stuff happen= ing There is still the C-x f bug, but that wasn't in your report. You seem to be concerned with M-x and C-x p f (as am I, by the way) That other problem isn't even very well understood by me. C-x f looks for files in a single directory, but minibuffer history has whole paths... I think it deserves a new bug report if anyone really cares. For now I think particular bug report can be closed. If anyone disagrees, let me know. Jo=C3=A3o From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 15 09:49:11 2021 Received: (at 49888-done) by debbugs.gnu.org; 15 Aug 2021 13:49:11 +0000 Received: from localhost ([127.0.0.1]:46152 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mFGVj-0003OF-9G for submit@debbugs.gnu.org; Sun, 15 Aug 2021 09:49:11 -0400 Received: from devianza.investici.org ([198.167.222.108]:62867) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mFGVh-0003O6-Jc for 49888-done@debbugs.gnu.org; Sun, 15 Aug 2021 09:49:10 -0400 Received: from mx2.investici.org (unknown [127.0.0.1]) by devianza.investici.org (Postfix) with ESMTP id 4Gndtr0Wmzz6v2v; Sun, 15 Aug 2021 13:49:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inventati.org; s=stigmate; t=1629035348; bh=Sj4AJWXIrG9wKSQ5MT2a2apRpyvAlyLlzMDsFDAfW8E=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=QkaA1gCFYhFin/+OMwF2XvGPhD37wW5GVrwW35OqLS0/tPtK6clveSnmhGjBaRKkI 1j0+769exrHWxvhvbqY2Ln3IRl3aecWXYURaRkzxWAV0Uy5EGsjk23SdItNVihdjaY +uvAzNISeayDQkEOhf1BXv5aIYBaAVd5JGuR1LjU= Received: from [198.167.222.108] (mx2.investici.org [198.167.222.108]) (Authenticated sender: manuel.uberti@inventati.org) by localhost (Postfix) with ESMTPSA id 4Gndtq5mjdz6v2s; Sun, 15 Aug 2021 13:49:07 +0000 (UTC) Subject: Re: bug#49888: 28.0.50; fido-mode not sorting by recency To: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= References: <1dec2c8a-fc9e-a70c-f236-9b1887ca384f@inventati.org> <87k0kmx5zk.fsf@gmail.com> <87fsvax5ls.fsf@gmail.com> <87bl5yx4pp.fsf@gmail.com> From: Manuel Uberti Message-ID: Date: Sun, 15 Aug 2021 15:49:05 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <87bl5yx4pp.fsf@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 8bit X-Spam-Score: -0.1 (/) X-Debbugs-Envelope-To: 49888-done Cc: 49888-done@debbugs.gnu.org, larsi@gnus.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.1 (-) On 15/08/21 14:38, João Távora wrote: > I've just commited this fix: > > commit ab23fa4eb22f6557414724769958a63f1c59b49a (HEAD -> master, origin/master, origin/HEAD) > Author: João Távora > Date: Sun Aug 15 13:19:59 2021 +0100 > > Sort by recency in flex completion style when no flexy stuff happening > > There is still the C-x f bug, but that wasn't in your report. You seem > to be concerned with M-x and C-x p f (as am I, by the way) Fantastic, it works greatly for those commands. > That other problem isn't even very well understood by me. C-x f looks > for files in a single directory, but minibuffer history has whole > paths... I think it deserves a new bug report if anyone really cares. Yes, I can live with C-x f not sorting by recency. I mostly move by projects, and when I use C-x f I don't mind typing a bit more to get where I want. So I agree with you, this can be a matter for a different bug report. > For now I think particular bug report can be closed. If anyone > disagrees, let me know. Thank you so much for having worked on this. -- Manuel Uberti www.manueluberti.eu From unknown Fri Jun 20 19:55:51 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 13 Sep 2021 11:24:09 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator