From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Bob Rogers Newsgroups: gmane.emacs.bugs Subject: bug#50279: 28.0.50; ffap-file-finder customization no longer works Date: Mon, 5 Sep 2022 20:10:03 -0700 Message-ID: <25366.47627.123588.827321@orion.rgrjr.com> References: <24877.4196.703337.360137@orion.rgrjr.com> <87r1ea5q7t.fsf@gnus.org> <24877.41211.907036.418118@orion.rgrjr.com> <87ilzmjn2a.fsf@gnus.org> <87y27f8j4j.fsf@gnus.org> <24916.36899.634409.375398@orion.rgrjr.com> <877dey7fy4.fsf@gnus.org> <87k0701575.fsf@gnus.org> <25347.54339.422978.567767@orion.rgrjr.com> <87v8qjth2k.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21806"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 50279@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Sep 06 05:11:11 2022 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 1oVOzX-0005WM-CJ for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 06 Sep 2022 05:11:11 +0200 Original-Received: from localhost ([::1]:48306 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oVOzV-0002qP-LE for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 05 Sep 2022 23:11:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55014) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oVOzO-0002q2-S1 for bug-gnu-emacs@gnu.org; Mon, 05 Sep 2022 23:11:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60601) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oVOzO-0003ku-FU for bug-gnu-emacs@gnu.org; Mon, 05 Sep 2022 23:11:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oVOzN-0005YT-US for bug-gnu-emacs@gnu.org; Mon, 05 Sep 2022 23:11:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Bob Rogers Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 06 Sep 2022 03:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50279 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 50279-submit@debbugs.gnu.org id=B50279.166243381321263 (code B ref 50279); Tue, 06 Sep 2022 03:11:01 +0000 Original-Received: (at 50279) by debbugs.gnu.org; 6 Sep 2022 03:10:13 +0000 Original-Received: from localhost ([127.0.0.1]:49300 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oVOya-0005Wr-Or for submit@debbugs.gnu.org; Mon, 05 Sep 2022 23:10:13 -0400 Original-Received: from mail-pj1-f41.google.com ([209.85.216.41]:37721) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oVOyY-0005WZ-QF for 50279@debbugs.gnu.org; Mon, 05 Sep 2022 23:10:11 -0400 Original-Received: by mail-pj1-f41.google.com with SMTP id o2-20020a17090a9f8200b0020025a22208so6374101pjp.2 for <50279@debbugs.gnu.org>; Mon, 05 Sep 2022 20:10:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rgrjr-com.20210112.gappssmtp.com; s=20210112; h=references:in-reply-to:subject:cc:to:date:message-id :content-transfer-encoding:mime-version:from:from:to:cc:subject:date; bh=x6/fM3EZM6wb0XwvYysGLgNf16aDNVyt/HzPqWg4kxs=; b=JlM6GV+VBpeFjZqKwX77fCcBoplH5Dy6LJsA11hXfrK1LOvEwdctyGLyQ0K0+9+LyL 6shlUajZXJok+nylF/m1lC/ylBsrVscY7VtVbhgwMbqYbDiaRCEI1MrLy1OqqzaQwGwE ivqy003Ru5W5P+MWj8s31hu7kK7zezV5aef4dB0n13hCirmM7rFWTsob+t7pjE7ftYHE RM4wkJokcQxmRvNX6W7Sz2GuS4730cppXa+2nGUgUH8QMvyrAsG4jSJisgJv+HWZ71p1 8GOZ+IDjnWHMcqfBlUTPyiTXZz4yNabaAyZkaYXl2zDoAkb+hQnqAF29q2NubDUPOKBa +BdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=references:in-reply-to:subject:cc:to:date:message-id :content-transfer-encoding:mime-version:from:x-gm-message-state:from :to:cc:subject:date; bh=x6/fM3EZM6wb0XwvYysGLgNf16aDNVyt/HzPqWg4kxs=; b=4rcya4gT97/1z0E00xXYwkj/WFQdTQ1dW2Q61wArfP80XE+svtsNsgw78jg+h0zTaX XIXSRxw3NidbKBJF9+mkTqwiVeXFGYZf0kIdJnSBT+dkrh7AQ3aI0XBPieMQWxgdwMFy 5ju5sW38sV3ptA4G5Yxxsa4Z8oniooermIlSpsKRDr8K6GuP/l63U1Z5wf3Kvee4UCC+ Kb5JO84bZR1n/RugavRePdPMKk5ZJR/0mONyz7IdoTGA1sJGnjBrHhucRK+kccAshlKA iHx5fWZe8k/eBJ/v2+j/aV488/FZZ9i2ObDBnZ7cNLJXKIKITI5nGWG1PYsMA7e9FD3/ TtYg== X-Gm-Message-State: ACgBeo0WFXAqkrVhRmKw0nxfdJVLS7qjLa5W/dHhcORXf+EyB3k3abNP z1chN45ziZMtTuvPtqdJtrN9Ug== X-Google-Smtp-Source: AA6agR4lI6PRRTRcZrYJOpd98+RB7wZa5nWtRQot0+xpD/O00GkMDq1zpY7CPrSTnxQs6Q4PJOwpsA== X-Received: by 2002:a17:90b:4b52:b0:1fd:ed88:967e with SMTP id mi18-20020a17090b4b5200b001fded88967emr22305341pjb.108.1662433804690; Mon, 05 Sep 2022 20:10:04 -0700 (PDT) Original-Received: from orion.rgrjr.com ([2600:1700:7c2c:e000::24]) by smtp.gmail.com with ESMTPSA id q10-20020a170902edca00b00176ab6a0d5fsm3209818plk.54.2022.09.05.20.10.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Sep 2022 20:10:04 -0700 (PDT) In-Reply-To: <87v8qjth2k.fsf@gnus.org> X-Mailer: VM 7.19 under Emacs 29.0.50 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:241616 Archived-At: From: Lars Ingebrigtsen Date: Tue, 23 Aug 2022 12:00:51 +0200 Bob Rogers writes: > Our furniture delivery has been delayed, so I've started to clean up > some software loose ends (and catch up on emacs-devel); with any luck > I may have time to look at this again. Great! Having finally gotten around to investigating this properly, I find that the solution should have been obvious: dickmao removed the feature in the following commit: commit 253b36bd40d1b342cdda09b0bee183788120f67e Author: dickmao Date: Tue Aug 3 12:02:48 2021 -0400 ffap ido accommodation Now that ffap-file-finder can be ido-find-file, the noninteractive portion of find-file-at-point cannot assume ffap-file-finder always takes an argument (ido-find-file does not). * lisp/ffap.el (find-file-at-point): Do not call ffap-file-finder. * test/lisp/ffap-tests.el (ffap-ido-mode): Test it. I no longer understand why we thought it could not be reproduced in "emacs -Q", as I can do so with the following code: (defun rgr-ffap-file-finder (file-name &optional wildcards) (interactive "FFind file: \np") (message "[got %S]" file-name) (find-file file-name wildcards)) (setq ffap-file-finder 'rgr-ffap-file-finder) and this recipe: 1. "emacs -Q" 2. Load the code above. 3. Locate a suitable file in dired (I used a JPEG). 4. Position point on the file name, and do "M-x ffap". The JPEG will appear in emacs but the "[got ...]" message will not appear. Additionally, find-file-at-point can be instrumented with the patch below. That will identify the exact find-file call being used, and is how I traced it to this commit. But of course resolving my issue without breaking dickmao's issue is beyond my pay grade. ;-} Though I do notice that ffap.el already has (memq ffap-file-finder '(find-file find-alternate-file)) as a way of testing for arg-handling capability. But maybe that's enough of a code smell. -- Bob ------------------------------------------------------------------------ diff --git a/lisp/ffap.el b/lisp/ffap.el index 88b4bce9fd..a4dec5e792 100644 --- a/lisp/ffap.el +++ b/lisp/ffap.el @@ -1623,6 +1623,7 @@ find-file-at-point ((or (not ffap-newfile-prompt) (file-exists-p filename) (y-or-n-p "File does not exist, create buffer? ")) + (message "ffap calling find-file on %S directly" filename) (find-file ;; expand-file-name fixes "~/~/.emacs" bug (expand-file-name filename)))