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#49204: 28.0.50; How to create new file in project by project-find-file Date: Tue, 29 Jun 2021 16:49:33 +0300 Message-ID: References: <6f475812-e088-f0e0-e01f-11cd643ff3e6@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11911"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 Cc: Stephen Leake , Stefan Monnier , 49204@debbugs.gnu.org To: =?UTF-8?Q?Gi=C3=A1p_?= =?UTF-8?Q?Tr=E1=BA=A7n?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jun 29 15:50:32 2021 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 1lyE8G-0002wa-4p for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 29 Jun 2021 15:50:32 +0200 Original-Received: from localhost ([::1]:46364 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyE8F-0005ef-2m for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 29 Jun 2021 09:50:31 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43200) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyE7m-0005av-5g for bug-gnu-emacs@gnu.org; Tue, 29 Jun 2021 09:50:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42421) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyE7l-0001u7-U0 for bug-gnu-emacs@gnu.org; Tue, 29 Jun 2021 09:50:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lyE7l-0005vD-Op for bug-gnu-emacs@gnu.org; Tue, 29 Jun 2021 09:50:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 29 Jun 2021 13:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49204 X-GNU-PR-Package: emacs Original-Received: via spool by 49204-submit@debbugs.gnu.org id=B49204.162497458422735 (code B ref 49204); Tue, 29 Jun 2021 13:50:01 +0000 Original-Received: (at 49204) by debbugs.gnu.org; 29 Jun 2021 13:49:44 +0000 Original-Received: from localhost ([127.0.0.1]:53967 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lyE7T-0005ud-Qh for submit@debbugs.gnu.org; Tue, 29 Jun 2021 09:49:44 -0400 Original-Received: from mail-wr1-f42.google.com ([209.85.221.42]:43755) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lyE7S-0005uQ-DW for 49204@debbugs.gnu.org; Tue, 29 Jun 2021 09:49:42 -0400 Original-Received: by mail-wr1-f42.google.com with SMTP id a13so25900807wrf.10 for <49204@debbugs.gnu.org>; Tue, 29 Jun 2021 06:49:42 -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=/XVmSsY2jGViNuOHEAdbKmzfUyZ0M3LSV0z9kS9Q5zA=; b=mEBDnDF8AIieHeQQ+psluL4fsuOVMOAan0OPu+MoMk9H7NHIsbD4eu3GofzT3CK6Pl t8f7BmpS7E1wcFthSVCJ4G7ZkrIxMbwvaGBpzGIzpHzW3L7MPt+0AYHEta6O0l94Uega v2Lh1mEZKKq/IbvaI7LBIXl8z4ltUzZlbV5xoylDtWQVC1abA4anXFjxv94HR+HEdrQt 9If7epfll8/i3nQt2r5b0t8h0krqgAytezr9SddYowkLNUo6wUaeUNrx5KBXWFfnEXtD WhClsLNiptGiqkucf+75/TNoCATMBMDv7o2RfJFbByrC0Frel0WThPfuqMj4StTy7a7q eZRg== 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=/XVmSsY2jGViNuOHEAdbKmzfUyZ0M3LSV0z9kS9Q5zA=; b=UNWv+WGQ/FZeY7a18naE9+bcZEYZbXni/Qct8BQeQMLuGKnTpp6Z7AYezmCzvwL4J1 vhT0OtKvRyhy3iuTx09Vb3vVmwavre/lxluyGQPuxnRR0zI6DVt3DsbNUhjZdLfP0zgz jdKvKGjzRmL26J9yRMY+krh97HCIj+mSjdVhhnW0iUWyom4fzWzCatsZpJt8Rq25CkSS JHZg3PzUwlQk1lOm1EEKRpUb9Sw/5LIBzykvBMIDcPDx5Hyxx8Ivdhzl5n8ViL64QoMo EbHT3Fg/VF5xI79m2SOYGbUHGsw1erm4le5wHibgUHTsuBez+XqkFE5LPW0hT5YGgeJm TmAQ== X-Gm-Message-State: AOAM5337+joHX+KCO35+42VEaHK4ZeDmu+UJx+Ig/0EqmJjm9SYYnDKt pZULefY5FDqYyslMl9fO990= X-Google-Smtp-Source: ABdhPJwDmxYBRGnz3mzvXTbV7MlWmC2qyHP/fqIvJkEsxlWwIn9OC6nms9fkhWXHF8+95M0iBIbFjg== X-Received: by 2002:a05:6000:12c7:: with SMTP id l7mr14687345wrx.177.1624974576456; Tue, 29 Jun 2021 06:49:36 -0700 (PDT) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id b20sm1020224wmj.7.2021.06.29.06.49.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 29 Jun 2021 06:49:35 -0700 (PDT) In-Reply-To: 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:209104 Archived-At: Hi! On 28.06.2021 05:07, Giáp Trần wrote: >> That said, if you can describe the desired behavior, I could live with a >> user option. Bonus points for submitting a patch. > I have some cases as below: > 1. I'm working on project A, and I believe I can find a file-b in > project B/src/test. Then I switch project by project-switch-project > and using project-find-file to lookup him, but I'm not lucky the > file-b is not existed in project-B/src/test so I want to create this > file now without exit project-find-file > 2. I want to use project-find-file to create a new file because I have > an overview of all subfolder levels in all folders. With find-file I > don't have this overview > These are normal case occur everyday on me. Thanks for the explanations. You previously wrote about Projectile. Does it enable this workflow? I wonder how we can reconcile this requirement with the "find name at point" behavior: we use whatever string at point that looks similar enough to a file name (or a part of it). To avoid mistakes, we currently even call completing-read again if the first finished input doesn't match any files. If the command allows non-matching input, having a default value that doesn't necessarily match any file names exactly will be a problem. Moving it from DEFAULT to INITIAL-INPUT shouldn't make a difference either. Ideas welcome, everybody.