From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: master e1d24f3 1/2: New fido-mode, emulates ido-mode with icomplete-mode Date: Mon, 9 Dec 2019 00:59:19 +0100 Message-ID: References: <20191105230155.6240.32765@vcs0.savannah.gnu.org> <20191105230157.6BEC120C06@vcs0.savannah.gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="229821"; mail-complaints-to="usenet@blaine.gmane.org" Cc: emacs-devel To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 09 00:59:41 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1ie6Sj-000xgG-7z for ged-emacs-devel@m.gmane.org; Mon, 09 Dec 2019 00:59:41 +0100 Original-Received: from localhost ([::1]:34424 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ie6Si-0000SU-0A for ged-emacs-devel@m.gmane.org; Sun, 08 Dec 2019 18:59:40 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44998) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ie6Sc-0000SK-0m for emacs-devel@gnu.org; Sun, 08 Dec 2019 18:59:35 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ie6Sa-0004vl-TE for emacs-devel@gnu.org; Sun, 08 Dec 2019 18:59:33 -0500 Original-Received: from mail-il1-x131.google.com ([2607:f8b0:4864:20::131]:44311) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ie6Sa-0004sC-Ni for emacs-devel@gnu.org; Sun, 08 Dec 2019 18:59:32 -0500 Original-Received: by mail-il1-x131.google.com with SMTP id z12so11129075iln.11 for ; Sun, 08 Dec 2019 15:59:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=tc9DDrktNEWwvETfn4wBuSdUCLLlJLDbobHiP0JHgtc=; b=JQbKNAfodgapSiulvUV0tLL7vUgDKny2P2ieUcCep5Dkr052Krq9ygRmqQKXvO1Cn8 8ZbG9GoZuCxfQUNDWgpaL6vj6fB2OfW+GE/lILpSaYQJUX/+yTGUQZKm6xcUTNkp+aUW 9nhzjogeOtiBOr07ElYILnuKKoKQDkwo7XpcxreCkrfm/jRvtBRU081whGFN7jRUX/pa YpaC2l4tffXM4UbTTn1H7pNCjQbG+7UnOrgArq8srOnOe2MqV7xblYlISTcFCuxa2zz1 jkWw1OwhzK5l+Ni2fqpuHUf3SOGyOn8liTyYM52ZVYs8hFnZpLsJNMXVuXbVMHplRY1l G3Rg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=tc9DDrktNEWwvETfn4wBuSdUCLLlJLDbobHiP0JHgtc=; b=CfYRVXmkELmPPYei60pNpYGuPVgi3uAsne2RpbpLAB6EBRe1IDbdcemjchKL3OBJ9x 6EqQWfNkImcyKZ6w6pVMI6D00HZxkPOcFqaJvEJnNPAY7v4guRAcnlFhU8jtOVZnEsZW 363tKJ8Cpao8h/eVAaFIjQUiUsOCM7jZ30c4THP+DntbwQ8fNvTr9a7owBy9WmX017za tn4/WZS9pRSbZL83py7vDjs4DIG4Pks8wWtLQWf6SWiLV5HHVEPxnJ7Lt7z5VTkUtklb +j3Oz6GoOJW6wETJ4vMTkZzzu7D2vk2q3QMEXSBgsOWWbQ3y2EqU67du3Umv39RfDis9 Kkyg== X-Gm-Message-State: APjAAAWiUrFEjDZvYh4YVlYzggsW7g9CsTz0kk5+6nRUq67T2fWf3cHb t870MKSnfKMoMVps21DCpMSn4wrr82U6oaJq07k= X-Google-Smtp-Source: APXvYqzpzUFZXxqTdhwm2phwEYrEXfY1KjIFGihRUVXP2wlaN7/38o6gnz1zpg67inRDYCUws5dHgKw6wtQfpwYHAj8= X-Received: by 2002:a92:884e:: with SMTP id h75mr25794884ild.199.1575849571370; Sun, 08 Dec 2019 15:59:31 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::131 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:243249 Archived-At: On Mon, Dec 9, 2019 at 12:45 AM Dmitry Gutov wrote: > > Hi Joao! > > > New fido-mode, emulates ido-mode with icomplete-mode > > This looks pretty rad! Thanks Dmitry, really glad you like it. And I'm also glad you mention the missing bits, because it gives me the opportunity to add some more things to that list. 1. Yes it probably needs those two things (though the current idle delay seems OK for me). 2. Another thing it needs is to simplify how you display the already matched candidate. Sometimes some weird {...} will show up that I can't interpret. Again, I just want it to work like ido. 3. It needs to remember entered directory history, again just like ido (or at least I remember ido used to do that). Don't have a good plan how to do this yet. 4. it needs to be able to C-x f history-fragment M-p M-p ... This last one is proving extremely challenging. I want to do it with reverse isearch, instead of reinvent the wheel, of course. It seems within reach because if I do C-x f C-M-r history-fragment C-r C-r I get what i want. But of course fido's mission is to do it just like ido. The problem I'm having is how to simulate pasting the history-fragment bit after I start a reverse isearch. There are no hook., I've tried timers, internal isearch variables, always failed. Who can help me? Here's what I have: (defun icomplete--category () (let* ((beg (icomplete--field-beg)) (md (completion--field-metadata beg))) (alist-get 'category (cdr md)))) (defun icomplete-fido-previous-input (n) "Recall previous input or start a reverse-isearch." (interactive "p") (let* ((field-string (icomplete--field-string)) (isearch-initial-string (and (eobp) (if (eq (icomplete--category) 'file) (file-name-nondirectory field-string) field-string)))) (cond ((or (null isearch-initial-string) (string-empty-p isearch-initial-string)) (previous-history-element n)) (t (delete-region (- (point-max) (length isearch-initial-string)) (point-max)) ;; How to I make `isearch-backward' start with ;; `isearch-initial-string'???? (isearch-backward))))) Jo=C3=A3o