From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?utf-8?Q?=C3=93scar_Fuentes?= Newsgroups: gmane.emacs.devel Subject: Re: flx -- flex with better sorting Date: Wed, 01 May 2013 19:04:58 +0200 Message-ID: <87bo8uoclh.fsf@wanadoo.es> References: <87ip32ofdn.fsf@wanadoo.es> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1367427914 17209 80.91.229.3 (1 May 2013 17:05:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 1 May 2013 17:05:14 +0000 (UTC) Cc: emacs-devel@gnu.org To: Le Wang Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 01 19:05:12 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UXaSu-00066f-II for ged-emacs-devel@m.gmane.org; Wed, 01 May 2013 19:05:12 +0200 Original-Received: from localhost ([::1]:59907 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UXaSu-0008MK-3i for ged-emacs-devel@m.gmane.org; Wed, 01 May 2013 13:05:12 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:56560) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UXaSo-0008HC-RS for emacs-devel@gnu.org; Wed, 01 May 2013 13:05:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UXaSl-0001Tw-3O for emacs-devel@gnu.org; Wed, 01 May 2013 13:05:06 -0400 Original-Received: from impaqm4.telefonica.net ([213.4.138.20]:30807 helo=telefonica.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UXaSk-0001Nw-PF for emacs-devel@gnu.org; Wed, 01 May 2013 13:05:03 -0400 Original-Received: from IMPmailhost3.adm.correo ([10.20.102.124]) by IMPaqm4.telefonica.net with bizsmtp id WgBp1l0082h2L9m3Qh50ln; Wed, 01 May 2013 19:05:00 +0200 Original-Received: from qcore ([83.40.116.149]) by IMPmailhost3.adm.correo with BIZ IMP id Wh4z1l00D3DUQuj1jh50Ql; Wed, 01 May 2013 19:05:01 +0200 X-CMAE-Analysis: v=1.1 cv=FATKBysRnelhkGLLD1poCSWvxLCitNPoH+Ehw4riWSs= c=1 sm=1 a=DQlLCnKHR5QA:10 a=vaN8wkIYCq8A:10 a=sSE9TqpJnXXWdi4WNHITQg==:17 a=pGLkceISAAAA:8 a=Zp-Tdg72f61DV14WoS4A:9 a=MSl-tDqOz04A:10 a=dsnwsWAoFtXIVbQo:21 a=5p4G5eTIL7q_B2_c:21 a=sSE9TqpJnXXWdi4WNHITQg==:117 X-original-sender: 981711563@telefonica.net In-Reply-To: (Le Wang's message of "Thu, 2 May 2013 00:26:47 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 213.4.138.20 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:159247 Archived-At: Le Wang writes: >> 4. Sometimes it fails to work as advertised. For instance, if I type >> `ltx' this file is shown first on the list of matches: >> >> lib/Target/NVPTX/NVPTXLowerAggrCopies.h >> >> but I would expect >> >> lib/Target/X86/* (* meaning any file under that subdirectory). >> > > 1. The algorithm favors basepaths heavily. > 2. I ended up considering all capitals to be beginning of word. > > This means ltx is matching as expected. As you supply more letters, better > results should float to the top. Okay. Knowing this makes for a much more effective usage. >> 5. Another quirk is that it rejects capital letters. For instance, if I >> type `lT' it shows no matches, but in fact there are lots of files >> like this: >> >> lib/Target/... >> >> Actually, typing just `T' fails to find any candidate, but there are >> lots files with a capital T on its name. >> > > I hadn't considered people might do this. :-) Will fix soon. Ideally, when using capital letters those candidates that matched case would get higher points. More quirks: C-s, C-r etc stops working on ido after enabling flx. One Emacs instance started to quickly use memory and had to kill it when noticed that the system was furiously paging. That Emacs instance was doing nothing, just showing a prompt of 3 candidates for kill-buffer. With ido, C-x k (kill-buffer) usually offers the current buffer as the first candidate. After activating flx, that's not necessarily so. While navigating directory trees with find-file, at certain point no candidates where listed as soon as any string was entered. With no input, all candidates were shown. I was unable to replicate the problem.