From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#61613: 30.0.50; ffap-other-window ignores ffap-require-prefix Date: Mon, 20 Feb 2023 19:01:20 +0200 Message-ID: <833570uv8f.fsf@gnu.org> References: <87pma6tlth.fsf.ref@aol.com> <87pma6tlth.fsf@aol.com> <837cwexb7l.fsf@gnu.org> <2543743F-F7A4-4474-8B89-55E472577DB7@aol.com> <833572x8oa.fsf@gnu.org> <20230219213255.rhyiu44udzpgqsq2@Ergus> <83r0ukv6ut.fsf@gnu.org> <20230220154915.qm4smcoohaiyc52c@Ergus> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10509"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 61613@debbugs.gnu.org To: Ergus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Feb 20 18:02:23 2023 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 1pU9YR-0002TT-Qb for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 20 Feb 2023 18:02:19 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pU9YG-0001jD-QV; Mon, 20 Feb 2023 12:02:11 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pU9YB-0001eh-EQ for bug-gnu-emacs@gnu.org; Mon, 20 Feb 2023 12:02:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pU9YA-0001qB-OI for bug-gnu-emacs@gnu.org; Mon, 20 Feb 2023 12:02:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pU9YA-0005MO-FZ for bug-gnu-emacs@gnu.org; Mon, 20 Feb 2023 12:02:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 20 Feb 2023 17:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61613 X-GNU-PR-Package: emacs Original-Received: via spool by 61613-submit@debbugs.gnu.org id=B61613.167691248420538 (code B ref 61613); Mon, 20 Feb 2023 17:02:02 +0000 Original-Received: (at 61613) by debbugs.gnu.org; 20 Feb 2023 17:01:24 +0000 Original-Received: from localhost ([127.0.0.1]:53354 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pU9XY-0005LB-18 for submit@debbugs.gnu.org; Mon, 20 Feb 2023 12:01:24 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:37796) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pU9XT-0005Kq-6H for 61613@debbugs.gnu.org; Mon, 20 Feb 2023 12:01:23 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pU9XN-0001X6-Mt; Mon, 20 Feb 2023 12:01:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=mz/6i7/MevmUSr6GxeXz0nLWD8Zw9oV8LkwxHXXE0WQ=; b=f5Jbz3clPIEj LpqtFa6MS6Y/yGLbtw9emEVJM+ocsLvkvSngCTxtTH2Yj2QN2957C6b8uUT0fNifW8dXd7+ehdJl/ /7xsdNWhbWnFHw1qRhDVcNLced2LMuzV4wRd46j9nXlgIdbaciLs/s9ySUIJfS3LyfySitDtzj0lJ HiReyobB4VH20hk/XaWaxIeQ1zawtDCx6bUqiTCbtIlQpq8+se5GyCz6ICdtrRqYxl5olFoen0dpW UX+hFJImNkqwa3iJWqOalGksWd8D8Ygza0MkPN+H9b1UJeR3M5N7fKP9RfHpdrEFGV51Yu5bmJJUD GVNhbj0zlGWy9VU3RiaeCQ==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pU9XM-0005fE-UI; Mon, 20 Feb 2023 12:01:13 -0500 In-Reply-To: <20230220154915.qm4smcoohaiyc52c@Ergus> (message from Ergus on Mon, 20 Feb 2023 16:49:15 +0100) 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:256203 Archived-At: > Date: Mon, 20 Feb 2023 16:49:15 +0100 > From: Ergus > Cc: 61613@debbugs.gnu.org > > >> So, what do you think? The fix may be to put the ffap-require-prefix > >> condition in ffap-read-file-or-url directly or in ffap-prompter?? > > > >I don't understand what you want to achieve by that, so please > >elaborate. ffap-file-finder's default value is a command that doesn't > >display the file in another window, so how will ffap-require-prefix > >help here? > > From the example above I expect that after: > > (setq ffap-require-prefix t) > C-x 4 f > > You see ~/ instead of /somedir. Like when we do C-x C-f. That's not what ffap-require-prefix does: (defcustom ffap-require-prefix nil "If set, reverses the prefix argument to `find-file-at-point'. This is nil so neophytes notice ffap. Experts may prefer to disable ffap most of the time." > As I said before, ffap-prompter is causing this because it is called > before switching window. So what we need is fix how the prompt is calculated, not what is the meaning of the prefix arg. > So ffap-file-finder is actually called at point before going to another > window. And it does not have any ffap-require-prefix condition. My > question is actually that. Once again, calling ffap-file-finder in this case is WRONG! We need a function that visits the file in another window, and ffap-file-finder doesn't. IOW, you are talking about a very different change to ffap-other-window. > We need to put the ffap-require-prefix condition somewhere in > ffap-read-file-or-url or ffap-prompter. Because this problem happens > with the other-frame and other-tab variants as well. I think we need to rewrite the interactive spec of those to do what you want. ffap-require-prefix is not related to this at all.