From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [elpa] master 567ea7e 1/3: Ivy-mode now works better with `find-file' Date: Sat, 18 Apr 2015 10:12:13 -0400 Message-ID: References: <20150417081157.13187.57850@vcs.savannah.gnu.org> <87d232ha4i.fsf@gmail.com> <874moem44j.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1429366363 25484 80.91.229.3 (18 Apr 2015 14:12:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 18 Apr 2015 14:12:43 +0000 (UTC) Cc: emacs-devel@gnu.org To: Thierry Volpiatto Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Apr 18 16:12:35 2015 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 1YjTU2-0005ZJ-5L for ged-emacs-devel@m.gmane.org; Sat, 18 Apr 2015 16:12:34 +0200 Original-Received: from localhost ([::1]:45814 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YjTU1-0002do-4n for ged-emacs-devel@m.gmane.org; Sat, 18 Apr 2015 10:12:33 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49202) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YjTTo-0002dh-3q for emacs-devel@gnu.org; Sat, 18 Apr 2015 10:12:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YjTTk-0006eR-UU for emacs-devel@gnu.org; Sat, 18 Apr 2015 10:12:20 -0400 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:51616) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YjTTk-0006eK-Pc for emacs-devel@gnu.org; Sat, 18 Apr 2015 10:12:16 -0400 Original-Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id t3IECDtv020003; Sat, 18 Apr 2015 10:12:13 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 391CE2174; Sat, 18 Apr 2015 10:12:13 -0400 (EDT) In-Reply-To: <874moem44j.fsf@gmail.com> (Thierry Volpiatto's message of "Sat, 18 Apr 2015 06:50:36 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV5280=0 X-NAI-Spam-Version: 2.3.0.9393 : core <5280> : inlines <2752> : streams <1424547> : uri <1909893> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.22 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:185588 Archived-At: > This is working, but the problem is that functions are made to return > the completion part of what you have in minibuffer, and this is > impossible to handle from 3rd tools. > Take the example of find-file-at-point, it returns a list of relative > file names, what should we call to return the same list prefixed by what > is in minibuffer ? I have the impression that the question is aimed in my direction, but I don't understand it enough to answer. E.g. I don't understand what you mean by "find-file-at-point returns a list of relative file names" and how it's relevant to the discussion. Maybe the answer you're looking for is something like: (pcase-let ((`(,start . ,_) (completion-boundaries "")) (compls (all-completions ))) (if (zerop start) compls (let ((prefix (substring 0 start))) (mapcar (lambda (compl) (concat prefix compl)) compls)))) -- Stefan