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#49865: 28.0.50; Customize project-find-file without thing-at-pont Date: Fri, 6 Aug 2021 03:51:13 +0300 Message-ID: <87c8db5b-514a-7f7f-e71d-3044bf05a4c9@yandex.ru> References: <8050cc41-2dd3-964b-e6ae-ab267a8a05b9@inventati.org> <874kc5ehca.fsf@gnus.org> 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="39748"; 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: 49865@debbugs.gnu.org To: Lars Ingebrigtsen , Manuel Uberti Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Aug 06 02:52:10 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 1mBo5p-000A83-HI for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 06 Aug 2021 02:52:09 +0200 Original-Received: from localhost ([::1]:44594 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mBo5o-0006El-8C for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 05 Aug 2021 20:52:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49338) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mBo5i-0006Eb-P8 for bug-gnu-emacs@gnu.org; Thu, 05 Aug 2021 20:52:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37164) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mBo5i-0001ju-Il for bug-gnu-emacs@gnu.org; Thu, 05 Aug 2021 20:52:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mBo5i-0004eR-Hc for bug-gnu-emacs@gnu.org; Thu, 05 Aug 2021 20:52: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, 06 Aug 2021 00:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49865 X-GNU-PR-Package: emacs Original-Received: via spool by 49865-submit@debbugs.gnu.org id=B49865.162821108217831 (code B ref 49865); Fri, 06 Aug 2021 00:52:02 +0000 Original-Received: (at 49865) by debbugs.gnu.org; 6 Aug 2021 00:51:22 +0000 Original-Received: from localhost ([127.0.0.1]:48710 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBo53-0004dX-VO for submit@debbugs.gnu.org; Thu, 05 Aug 2021 20:51:22 -0400 Original-Received: from mail-wr1-f52.google.com ([209.85.221.52]:37636) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBo53-0004dK-2s for 49865@debbugs.gnu.org; Thu, 05 Aug 2021 20:51:21 -0400 Original-Received: by mail-wr1-f52.google.com with SMTP id d8so8854452wrm.4 for <49865@debbugs.gnu.org>; Thu, 05 Aug 2021 17:51:20 -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=5d/1HxiXaGG8QdkayH2hy24bx8Tz/FC+kFjamcKkRFA=; b=kCR9aNJRuaB4m/2dXb6k1sxC8dfPGDsSrFyon86gTyRGuLodhLVdButJflZX3OhYTD nohefIM2aLVszEl7FXHfHKZXa2gaN6zRFfjqyMEdV3Iwsr9j6B889lRG+HRdzOUHciJd KRl8HYtBtGd+LeXyePhIAE2fIvyySSWbB6Q51tS0IUweUlalpM0cYLoJ6MkYAuWXN2to +R7WjqJT4mFkgX0Y0HeDMzlC+Gy300+XLZy1S1tGNuRbs4yekrMmc7+8kCg6ua1cRvEO nM6223ow6KTzbvD4/vQzzWd3NbgxpkKu9fVe0AzeE+YORT1xOb3ISfmmHOYip4IoQj1G mZ4A== 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=5d/1HxiXaGG8QdkayH2hy24bx8Tz/FC+kFjamcKkRFA=; b=FmuSNwnOrd6+XgZ2R0IPaql8ipTzBF/a4CKW3wibhvG5wNI7sK6/BClt6Co6gtXX3v D+nmUPJ+rqBR9ml1VLWP2Lb6mwhk82OI5fCSlGB+ZZmA3vSTtfbyZNknKrGcGUL13qht KhUQEOi9vNdzrXR9+21qbik2VZfZ5wUbEw8cd2ifpZ50s/i4LKYt/epciv4XZolz58hq XHqqwNH8ZX8++aPceNHm4Un2JVS4sdmqFoLDkc4/sFHJeJOk/deeFnO1LeUn0mKwtYk3 cgDVfyWOvj/5Q8ywFw0FM8a8jfvNSS5CzlZDMR9QLOwnljsaJvOaiQ21WYAIzziD9Pwt 5TPQ== X-Gm-Message-State: AOAM533Q9SbWInGRVR3a1KLX+nxdw8dkoJKJIChVtsUymtcmZEbCSEuC qZXIr4qAYcJFyfpoVl1f1Q8vrOnudlc= X-Google-Smtp-Source: ABdhPJwjpuFu8dn8o+0Tp7vnlS4s/GV8cs9kSA9r0gFC+wPXYogKfe+DFKXUYSnpW6kfr3qrkj38IA== X-Received: by 2002:a05:6000:1106:: with SMTP id z6mr8125085wrw.296.1628211075169; Thu, 05 Aug 2021 17:51:15 -0700 (PDT) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id c2sm7642536wrs.60.2021.08.05.17.51.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 05 Aug 2021 17:51:14 -0700 (PDT) In-Reply-To: <874kc5ehca.fsf@gnus.org> 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:211283 Archived-At: Hi Lars, On 04.08.2021 11:37, Lars Ingebrigtsen wrote: > This reminded me that I've been meaning to add a thing-at-point target > that is like `filename', but returns nil if the file named doesn't > exist, so I've now done this in Emacs 28. > > Perhaps project.el should use it here? I don't know if it will be the best choice here. First of all, we already have the hook file-name-at-point-functions, which is consulted by read-file-name--defaults. So one can already e.g. move point to some existing file name, press C-x C-f M-n and with the power of the ffap package have the file name inserted. But when we're completing project-wide, there will also be references that are not relative to the current directory (and instead relate to some project-configured path). Like #include "stuff/thingy.h" or require 'actor/abc' ...where the string is both not relative to the current dir and is missing the extension. ffap actually includes support for this, like having (require 'cl-lib) be recognized as '.../lisp/emacs-lisp/cl-lib.el', but it only works for a limited set of languages, and OOTB only for Elisp (for all others you need to configure variables like ffap-c++-path).