From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#44297: [Feature request] project.el: Additional utility functions Date: Fri, 30 Oct 2020 19:47:25 +0200 Message-ID: <5a991b42-c930-a5f2-3581-d6ea26f561f0@yandex.ru> References: <1785587458.69035.1603939939547@ichabod.co-bxl> <871rhhv4q8.fsf@mail.linkov.net> <64182b62-dad4-08db-379b-acfddea26327@yandex.ru> <87wnz8io18.fsf@tcd.ie> <2110324612.148355.1604018860967@ichabod.co-bxl> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17361"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 Cc: 44297@debbugs.gnu.org, Juri Linkov To: Brian Leung , "Basil L. Contovounesios" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 30 18:49:47 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1kYYX3-0004Mb-UO for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 30 Oct 2020 18:49:46 +0100 Original-Received: from localhost ([::1]:57098 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kYYX2-0000RB-So for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 30 Oct 2020 13:49:44 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41388) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kYYVO-00076e-Pe for bug-gnu-emacs@gnu.org; Fri, 30 Oct 2020 13:48:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48061) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kYYVO-0002gf-Eq for bug-gnu-emacs@gnu.org; Fri, 30 Oct 2020 13:48:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kYYVO-0002fJ-9W for bug-gnu-emacs@gnu.org; Fri, 30 Oct 2020 13:48:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 30 Oct 2020 17:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44297 X-GNU-PR-Package: emacs Original-Received: via spool by 44297-submit@debbugs.gnu.org id=B44297.160408005910215 (code B ref 44297); Fri, 30 Oct 2020 17:48:02 +0000 Original-Received: (at 44297) by debbugs.gnu.org; 30 Oct 2020 17:47:39 +0000 Original-Received: from localhost ([127.0.0.1]:59607 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kYYV1-0002eh-7o for submit@debbugs.gnu.org; Fri, 30 Oct 2020 13:47:39 -0400 Original-Received: from mail-ej1-f42.google.com ([209.85.218.42]:35031) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kYYUw-0002eR-5I for 44297@debbugs.gnu.org; Fri, 30 Oct 2020 13:47:38 -0400 Original-Received: by mail-ej1-f42.google.com with SMTP id p5so9770920ejj.2 for <44297@debbugs.gnu.org>; Fri, 30 Oct 2020 10:47:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=ZPfzYxakSPxAG+Mu37B2bBSslSCFz2LL6vTstEwpQLc=; b=T5jx6XPiwW/q0wDfZdXlUwkNNEzEtoeEBNWpwiwP+bpL+E3u3w0eYU1uquNEQhDzs6 mqoVBUfVged7D+zYKHysn7eyO2TQCPyHHdDraMcRu8mdyrXxEOx15T+xByIi+Qyv+bnh t5rhy+weQaBP1yHsraRS/ZIQIds5gd4HukwK/LNxfhp0oWq5eU+Uk8juwZkERsBq2bvD GjXmPWng3pUoYNhQO7C4HTYX4he+NtfDwYU0965YJdRr9HmkB2uh3H7iLxaWyWlJfQSr 9vBbUwRPiNo63ZNRGB5faxxLpAS3MzEsFVMFRo6BCXwp32YzFCmM542FaeplFWnfZNFc UNkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=ZPfzYxakSPxAG+Mu37B2bBSslSCFz2LL6vTstEwpQLc=; b=svM83fH7QQfljldMAgdppwtOTa/SmuEO8je0LacM7q6EaW5daG5qraePsvcXm2Dkfz Ro8pBZpkZsF9OgjmBCyTlNjzQN4VdgIJx2o5Z/9g4vki0iXbjgsox07G3cXzOeembrQC h5QrbYECsocbRO69m312uLIpZs5LuRZ9gZNdJLN0TG78bSTlqWxZlPLrYuCEIKinbK8x yx6dyHQ74p9hRRG+qoaKTbONLa4l5MeR1MmOWz1YEYswCqRtkJoaaJosVs0/7dsRGIc2 FJ263OzkbzRg+oO9oR3Kg3tWH4+G+94AvG2RVKQqLWdJeWj7sIpSuoq1oOBfdluLoF3h mhwA== X-Gm-Message-State: AOAM533Qu4hxa5/FiXGIU+C8aFJDv9eiJf/YjmsIVtolHGZs5f368w/N sks6ML6a1qo8+BSamnL8gocZeTXS1NVW6A== X-Google-Smtp-Source: ABdhPJx1soHL/TQE+o208X5i0p3II1QsQ++zsuhYElr4xCYxK8gKNKsHugKAtpRo0wf/E9APFELhJg== X-Received: by 2002:a17:906:280a:: with SMTP id r10mr3628633ejc.45.1604080048058; Fri, 30 Oct 2020 10:47:28 -0700 (PDT) Original-Received: from [192.168.0.4] ([66.205.71.3]) by smtp.googlemail.com with ESMTPSA id b24sm2614096edt.68.2020.10.30.10.47.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 30 Oct 2020 10:47:27 -0700 (PDT) In-Reply-To: <2110324612.148355.1604018860967@ichabod.co-bxl> Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:192168 Archived-At: On 30.10.2020 02:47, Brian Leung wrote: >>> project-find-file-in-directory: completing-read for a directory > within the project, and then within the selected directory, > completing-read for a file within that directory >> >> Is that one really a frequent operation? >> >> I would imagine that project-find-file, with fuzzy search, would be a > faster solution either way. > > It's something that seems good on paper but that I always forget to > use (with Projectile). What do you mean by "forget"? You still use the command, but never type out words to match against the directory? > My rationale for its usefulness is that having > to visually filter similar file names based on directory can be a > mental burden sometimes when there are similarly-named files in different > directories. I don't feel too strongly about this, though, and could > live without this feature. Perhaps we could come up with a completion style that uses special indicators, e.g. some sigil to mean "input that comes after this should only be matched against the base file name". Just spitballing. I'm not sure what the implementation would look like. >>> https://www.emacswiki.org/emacs/FindOtherFile >>> >>> Projectile also has a command with a similar name. >>> >>> The feature will be pretty C/C++-centric >> >> Not if it's customised via ff-other-file-alist or similar. > > It's also useful with OCaml. Very good. >>> What I don't understand, is why should it be in the project- namespace? Looking >>> for a file with the same name in the current dir doesn't execute the notion of >>> the current project, even a little bit. >>> >>> Projectile does a project-wide search for a file with the same basename (but a >>> different extension). Is that actually useful? >> >> Maybe when e.g. headers and source files are in different directories? >> I don't know whether that's already supported by find-file.el. > > I cannot figure out how to quickly retrieve the header with > ff-find-other-file when the source and header are in different > directories; it seems necessary to manually find the containing > directory with completing-read during the ff-find-other-file > execution, which is cumbersome. So I think this feature would make > sense in project.el. Yes, OK.