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#55778: 29.0.50; [PATCH] M-. into a .gz; we've all been there. Date: Tue, 07 Jun 2022 14:31:20 +0300 Message-ID: <83mteo7lrr.fsf@gnu.org> References: <87k09yw9ao.fsf@dick> <874k12auir.fsf@gnus.org> <87r14343vz.fsf@gnus.org> <83ee039prg.fsf@gnu.org> <87ee03439b.fsf@gnus.org> <83bkv79ox1.fsf@gnu.org> <87zgiqx9kx.fsf@gnus.org> <83bkv67y62.fsf@gnu.org> <87zgioomys.fsf@gnus.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17780"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 55778@debbugs.gnu.org, dick.r.chiang@gmail.com, monnier@iro.umontreal.ca To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jun 07 14:20:54 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 1nyYCc-0004RB-0V for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 07 Jun 2022 14:20:54 +0200 Original-Received: from localhost ([::1]:39956 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nyYCa-0005St-Uj for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 07 Jun 2022 08:20:52 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37656) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyXRK-0003VM-PY for bug-gnu-emacs@gnu.org; Tue, 07 Jun 2022 07:32:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44802) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nyXRK-0005FD-80 for bug-gnu-emacs@gnu.org; Tue, 07 Jun 2022 07:32:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nyXRK-00082Z-2A for bug-gnu-emacs@gnu.org; Tue, 07 Jun 2022 07:32: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: Tue, 07 Jun 2022 11:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55778 X-GNU-PR-Package: emacs Original-Received: via spool by 55778-submit@debbugs.gnu.org id=B55778.165460150229992 (code B ref 55778); Tue, 07 Jun 2022 11:32:02 +0000 Original-Received: (at 55778) by debbugs.gnu.org; 7 Jun 2022 11:31:42 +0000 Original-Received: from localhost ([127.0.0.1]:38699 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nyXQz-0007nP-P4 for submit@debbugs.gnu.org; Tue, 07 Jun 2022 07:31:42 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:52382) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nyXQv-0007g8-8l for 55778@debbugs.gnu.org; Tue, 07 Jun 2022 07:31:41 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:60362) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyXQp-00059t-9F; Tue, 07 Jun 2022 07:31:31 -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=w4/fL4VZ1qsqlFd0y/13g9HI1d2ZOZ5Y/VhBIdUFI9M=; b=bot8Ix5ESw0S /hwjP1h60Hf80FWL/aSC6maCMhZ+tv6vPU0SFwdOfh/p74UcYcFskSiaTU6qp0rqfFykO+pdftwiU 3+lw51rxysf0X08RlzOR0Ar4wh5DnlS6RY97uDV0IukjWVYGN92akmpMjJpz7ELOxLujPJuWAn1L6 syE4AmfsRzdrlm4cu2wGI500Tld9Zthnemsdl+5Q9EfDyrVD2inYE/iwQa8FBmmJbzhhnlaogTH+e cgHD62P/S1LhvLZo7IODwf+Uth6EfSBaB+75pBgswXOtsQU43OiiH/8zpd1QNXcDAEcZ7/CeNj5Rl 8hW8Qey++d/DLKG8URN/jQ==; Original-Received: from [87.69.77.57] (port=1354 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 1nyXQm-0005OD-Nv; Tue, 07 Jun 2022 07:31:29 -0400 In-Reply-To: <87zgioomys.fsf@gnus.org> (message from Lars Ingebrigtsen on Tue, 07 Jun 2022 11:13:31 +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:233867 Archived-At: > From: Lars Ingebrigtsen > Cc: dick.r.chiang@gmail.com, 55778@debbugs.gnu.org, monnier@iro.umontreal.ca > Date: Tue, 07 Jun 2022 11:13:31 +0200 > > Eli Zaretskii writes: > > > Maybe I'm missing something, but isn't ff-other-file-alist equivalent > > to your find-sibling-rules? > > No? "Alist of extensions to find given the current file's extension." > `find-sibling-rules' isn't about extensions. It isn't? Then why did you show these examples: > So I've now added a new command `find-sibling-file' to Emacs 29. This > setting does what the latter: > > (setq find-sibling-rules > '(("\\(/usr/share/emacs.*/\\(lisp/.*.el\\).gz\\)" > "/home/larsi/src/emacs/trunk/\\2\\'"))) > > Something like this does the Emacs development sibling dance: > > (setq find-sibling-rules > '(("src/emacs/trunk/[^/]+/\\(.*\\)\\'" "src/emacs/emacs-28/.*/\\1\\'") > ("emacs/trunk/\\(.*\\)\\.\\(c\\|el\\)\\'" > "emacs/trunk/test/\\1-tests.el\\'"))) > > And this is foo.c -> foo.h: > > (setq find-sibling-rules > '(("\\([^/]+\\)\\.c\\'" "\\1.h"))) AFAIU, almost all of them are about extensions. find-file.el separates the directory search from the file-name search, while you keep them together, but the approaches are equivalent, and each one has its advantages. Anyway, I'm not saying that find-file.el can support everything you wanted to support OOTB. But it can support most of it, and it can be extended to support the rest. So it sounds strange to me to come up with an entirely new feature, implemented from scratch and with an incompatible API, when these two have such a significant functionality overlap.