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#57325: 27.1; functions in ff-other-file-alist Date: Mon, 29 Aug 2022 17:04:44 +0300 Message-ID: <83r10zw3gj.fsf@gnu.org> References: <87fshpjviu.fsf@betli.tmit.bme.hu> <83h725bf4w.fsf@gnu.org> <875yiljslg.fsf@betli.tmit.bme.hu> <837d30biz4.fsf@gnu.org> <831qt44u5f.fsf@gnu.org> <87czcjs1mv.fsf@betli.tmit.bme.hu> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34637"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 57325@debbugs.gnu.org To: Felician Nemeth Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Aug 29 16:05:13 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 1oSfO4-0008sE-Sd for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 29 Aug 2022 16:05:13 +0200 Original-Received: from localhost ([::1]:60488 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oSfO3-0007KS-TL for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 29 Aug 2022 10:05:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46556) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oSfNu-0007KK-Lw for bug-gnu-emacs@gnu.org; Mon, 29 Aug 2022 10:05:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43555) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oSfNu-0005M1-Cx for bug-gnu-emacs@gnu.org; Mon, 29 Aug 2022 10:05:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oSfNu-0001Ti-5b for bug-gnu-emacs@gnu.org; Mon, 29 Aug 2022 10:05:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 29 Aug 2022 14:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57325 X-GNU-PR-Package: emacs Original-Received: via spool by 57325-submit@debbugs.gnu.org id=B57325.16617818735636 (code B ref 57325); Mon, 29 Aug 2022 14:05:02 +0000 Original-Received: (at 57325) by debbugs.gnu.org; 29 Aug 2022 14:04:33 +0000 Original-Received: from localhost ([127.0.0.1]:33304 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oSfNQ-0001Sp-UE for submit@debbugs.gnu.org; Mon, 29 Aug 2022 10:04:33 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:51122) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oSfNO-0001Sa-MK for 57325@debbugs.gnu.org; Mon, 29 Aug 2022 10:04:31 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:42648) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oSfNI-0005Is-EV; Mon, 29 Aug 2022 10:04:24 -0400 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=+W50aEtNwcXZRezCEmNW1bVZNMhhljEZuaREPyumeCA=; b=QgWNg/OsfZBO UVXaqbP8hDU+pbe5PTHMppZgkeJBvf8/cPpdo/W7by6LgxspErROp7MqZ6N0XZgNwI6n6Pin0T5mo HZB3zop6CeCHQES41nTR1Jqh7YOsHZ5cMGVWdQWzCG7THyjZ7Ve8tpgGCnimkQdjNG32TgatfqNQN SoPZUx0WeLlaSYnu/JI1zhTnCs1CU6wdQpPixkm4Gb7mfwGtX+HhiQ0n4ZMsUm022LIgFfc2TIKSM VhC4w/WACU/YJPaR/VC+PNRYqwUXLNvRmgy8fdCyu4iKXqTF9jcIzUaDf84CoH8TwTHKvyV+7PuYP u2cgTVdUwnD4wsl/STvNGQ==; Original-Received: from [87.69.77.57] (port=3038 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 1oSfNH-0000yr-Tt; Mon, 29 Aug 2022 10:04:24 -0400 In-Reply-To: <87czcjs1mv.fsf@betli.tmit.bme.hu> (message from Felician Nemeth on Mon, 29 Aug 2022 13:57:44 +0200) 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:241026 Archived-At: > From: Felician Nemeth > Cc: 57325@debbugs.gnu.org > Date: Mon, 29 Aug 2022 13:57:44 +0200 > > Eli Zaretskii writes: > > > AFAICT, what you saw is the consequence of one basic problem: > > ff-find-the-other-file is unprepared to deal with a function that > > returns nil (instead of a list of file-name extensions to try). So it > > tries to use that nil value as if it was a list of extensions, and the > > result is basically random. > > > > It should be easy to make ff-find-the-other-file detect the nil value > > and handle it as if it found no match for the current buffer's file. > > Do you think this would be better? Or we could simply document that a > > function in ff-other-file-alist must return a list of extensions. > > > > WDYT? > > I think extending the documentation to explain what is expected from the > function is enough. It would have helped me. I did that now. > Also, when the function returns an absolute file name, then the > returned file should be already opened, otherwise ff-find-other-file > cannot find it. Hmm... not sure how this is relevant. The function should return a list of extensions, not a file name. What am I missing?