From unknown Fri Aug 15 11:10:51 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#20192 <20192@debbugs.gnu.org> To: bug#20192 <20192@debbugs.gnu.org> Subject: Status: [PATCH] for C or C++ sources (ff-find-other-file) now has a symmetric mapping Reply-To: bug#20192 <20192@debbugs.gnu.org> Date: Fri, 15 Aug 2025 18:10:51 +0000 retitle 20192 [PATCH] for C or C++ sources (ff-find-other-file) now has a s= ymmetric mapping reassign 20192 emacs submitter 20192 Dima Kogan severity 20192 minor tag 20192 patch fixed thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 24 15:53:20 2015 Received: (at submit) by debbugs.gnu.org; 24 Mar 2015 19:53:20 +0000 Received: from localhost ([127.0.0.1]:35267 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YaUt6-0007kU-Ce for submit@debbugs.gnu.org; Tue, 24 Mar 2015 15:53:20 -0400 Received: from eggs.gnu.org ([208.118.235.92]:37707) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YaUt3-0007kE-6S for submit@debbugs.gnu.org; Tue, 24 Mar 2015 15:53:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YaUsv-00086o-NP for submit@debbugs.gnu.org; Tue, 24 Mar 2015 15:53:11 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:37604) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YaUsv-00086Z-KT for submit@debbugs.gnu.org; Tue, 24 Mar 2015 15:53:09 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39370) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YaUsu-0002gp-8v for bug-gnu-emacs@gnu.org; Tue, 24 Mar 2015 15:53:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YaUsp-00084p-9p for bug-gnu-emacs@gnu.org; Tue, 24 Mar 2015 15:53:08 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:45894) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YaUsp-000847-1K for bug-gnu-emacs@gnu.org; Tue, 24 Mar 2015 15:53:03 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id D6B5120D6C for ; Tue, 24 Mar 2015 15:52:58 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Tue, 24 Mar 2015 15:53:01 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=secretsauce.net; h=x-sasl-enc:from:to:subject:date:message-id:mime-version :content-type; s=mesmtp; bh=Ta/fWV66p4J0Kz80ZhVdl+vM/fQ=; b=ctv1 cGCPTq3P0K7tq80kKXynXjs80xxTs3IXi7OqMC9+Xljayz/tbacg9FW9xGHoM50w vfRhR/Fm1RjMVEumCQirvgz45vnm/dlCCcynaPoNra658rzjrfbTgrIPLzQRm2/m aAvaW3+cRejkrvCW3oM9j7HtfApkzBq4Z1NaNUI= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=x-sasl-enc:from:to:subject:date :message-id:mime-version:content-type; s=smtpout; bh=Ta/fWV66p4J 0Kz80ZhVdl+vM/fQ=; b=aiGWLWSrl+SUwHMUmBoLuCL0PD9UiwRy28BZdaZdLpW rkdI64TafhPxUF3GV/bt5/iXLTnJpEPriGRIHEBuHHipPBmlN2qU0rnqHAKQg4Yd 53d842hxLhq62VoMkYKj2i0b6TgbsRs4XX0sa0+xjjHTO61dexpgsG3+VscqIx+0 = X-Sasl-enc: e94HkIFbpDkvIsSywMa1JhUcmZF0mnzMxbdP1B/h8/76 1427226781 Received: from shorty.local (unknown [104.35.103.243]) by mail.messagingengine.com (Postfix) with ESMTPA id 303D36800E3 for ; Tue, 24 Mar 2015 15:53:01 -0400 (EDT) Received: from ip6-localhost ([::1] helo=shorty) by shorty.local with esmtp (Exim 4.84) (envelope-from ) id 1YaUtv-0003zT-4D for bug-gnu-emacs@gnu.org; Tue, 24 Mar 2015 12:54:11 -0700 From: Dima Kogan To: bug-gnu-emacs@gnu.org Subject: [PATCH] for C or C++ sources (ff-find-other-file) now has a symmetric mapping Date: Tue, 24 Mar 2015 12:54:11 -0700 Message-ID: <87r3sexjbw.fsf@secretsauce.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) --=-=-= Content-Type: text/plain Hi `cc-other-file-alist' has a mapping of file extensions to switch between headers and sources, but the mappings weren't completely symmetric. In particular .cpp would map to .hh, but .hh would NOT map to .cpp. This patch updates the mappings to always contain symmetric pairs so that repeated invocations of (ff-find-other-file) can toggle between all pairs of sources/headers. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-for-C-or-C-sources-ff-find-other-file-now-has-a-symm.patch >From 9175ffbbd0691fe2084933e47b4d6649ad243f5d Mon Sep 17 00:00:00 2001 From: Dima Kogan Date: Tue, 24 Mar 2015 12:53:08 -0700 Subject: [PATCH] for C or C++ sources, (ff-find-other-file) now has a symmetric mapping `cc-other-file-alist' has a mapping of file extensions to switch between headers and sources, but the mappings weren't completely symmetric. In particular .cpp would map to .hh, but .hh would NOT map to .cpp. This patch updates the mappings to always contain symmetric pairs so that repeated invocations of (ff-find-other-file) can toggle between all pairs of sources/headers. --- lisp/find-file.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/find-file.el b/lisp/find-file.el index 97e95d2..a5d15c5 100644 --- a/lisp/find-file.el +++ b/lisp/find-file.el @@ -242,11 +242,11 @@ the preceding slash. The star represents all the subdirectories except (defcustom cc-other-file-alist '(("\\.cc\\'" (".hh" ".h")) - ("\\.hh\\'" (".cc" ".C")) + ("\\.hh\\'" (".cc" ".C" ".CC" ".cxx" ".cpp" ".c++")) ("\\.c\\'" (".h")) ("\\.m\\'" (".h")) - ("\\.h\\'" (".c" ".cc" ".C" ".CC" ".cxx" ".cpp" ".m")) + ("\\.h\\'" (".c" ".cc" ".C" ".CC" ".cxx" ".cpp" ".c++" ".m")) ("\\.C\\'" (".H" ".hh" ".h")) ("\\.H\\'" (".C" ".CC")) -- 2.1.4 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 23 05:45:17 2016 Received: (at 20192) by debbugs.gnu.org; 23 Feb 2016 10:45:17 +0000 Received: from localhost ([127.0.0.1]:39270 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aYASz-0006A3-0Y for submit@debbugs.gnu.org; Tue, 23 Feb 2016 05:45:17 -0500 Received: from hermes.netfonds.no ([80.91.224.195]:56609) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aYASx-00067p-6i for 20192@debbugs.gnu.org; Tue, 23 Feb 2016 05:45:15 -0500 Received: from cpe-60-225-211-161.nsw.bigpond.net.au ([60.225.211.161] helo=mouse) by hermes.netfonds.no with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1aYASV-0003Ph-CC; Tue, 23 Feb 2016 11:44:48 +0100 From: Lars Ingebrigtsen To: Dima Kogan Subject: Re: bug#20192: [PATCH] for C or C++ sources (ff-find-other-file) now has a symmetric mapping References: <87r3sexjbw.fsf@secretsauce.net> Date: Tue, 23 Feb 2016 21:44:43 +1100 In-Reply-To: <87r3sexjbw.fsf@secretsauce.net> (Dima Kogan's message of "Tue, 24 Mar 2015 12:54:11 -0700") Message-ID: <87fuwjso2s.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-MailScanner-ID: 1aYASV-0003Ph-CC X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1456829088.29839@GA7pu+HKDnm5Km7oZUrWdw X-Spam-Status: No X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 20192 Cc: 20192@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Dima Kogan writes: > `cc-other-file-alist' has a mapping of file extensions to switch > between headers and sources, but the mappings weren't completely > symmetric. In particular .cpp would map to .hh, but .hh would NOT map > to .cpp. This patch updates the mappings to always contain symmetric > pairs so that repeated invocations of (ff-find-other-file) can toggle > between all pairs of sources/headers. I think this sounds like a reasonable addition, but that's not a function I've ever used, so I can't really say. Does anybody object to this change? --- a/lisp/find-file.el +++ b/lisp/find-file.el @@ -242,11 +242,11 @@ the preceding slash. The star represents all the subdirectories except (defcustom cc-other-file-alist '(("\\.cc\\'" (".hh" ".h")) - ("\\.hh\\'" (".cc" ".C")) + ("\\.hh\\'" (".cc" ".C" ".CC" ".cxx" ".cpp" ".c++")) ("\\.c\\'" (".h")) ("\\.m\\'" (".h")) - ("\\.h\\'" (".c" ".cc" ".C" ".CC" ".cxx" ".cpp" ".m")) + ("\\.h\\'" (".c" ".cc" ".C" ".CC" ".cxx" ".cpp" ".c++" ".m")) ("\\.C\\'" (".H" ".hh" ".h")) ("\\.H\\'" (".C" ".CC")) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sun May 21 19:24:01 2017 Received: (at 20192) by debbugs.gnu.org; 21 May 2017 23:24:01 +0000 Received: from localhost ([127.0.0.1]:59756 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dCaCb-0000Zu-Qk for submit@debbugs.gnu.org; Sun, 21 May 2017 19:24:01 -0400 Received: from mail-it0-f65.google.com ([209.85.214.65]:33885) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dCaCT-0000ZW-Ia; Sun, 21 May 2017 19:23:53 -0400 Received: by mail-it0-f65.google.com with SMTP id d68so12222301ita.1; Sun, 21 May 2017 16:23:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=oC6JewhjwLZN6kO3UV9x7WKQwqbLbiFLQ0UgP40HFXU=; b=CDi/6/L6qlEFJfcSGV8hTSCge8o81Gvh9ak4iUVCL0nQG0FSDJn/wAlRWwVakZNofM cZXM4u3rXXvEn55TMvRtrkUBwMscCBRX0aqcUb62Ix0ZPeO1MzsihWvy2cqvdz+bb0Mq 4GuEA/o9rM+kcs5pPPMPvuc3oo5eyKtE5kLcs5XNYKZSqwl0r7umM7SLVfhaLKveKukV tHMLMqtr97K7qGe2qHEyYq7S+DhRFoCPy/QKscOltsVHflqb7bE/6MjsEynPjUhHCCUJ 18psSIExYIw2/A0kuLRHpotTfHwyBU6V/0aJ0ZSAudWQjijkC3T7Kw2+GM6pezAkSOKM E+ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=oC6JewhjwLZN6kO3UV9x7WKQwqbLbiFLQ0UgP40HFXU=; b=FhFTDFh//75DO4ThrqhLvviWFi2b82xpH+cw05NooCuwcYPEdfKjoM62JoaRCpGFv1 1zLH9d7Xqy9/lWrruSHy2OtjYSDhbr6VGGUtEqzxrn3frnNIZnzPgzM9q+9EW6fASlHk ZQdWaY1KkL2e8qzXZG3rKaGSaomb5ijCRn5kMgyd/2s6fdF0LyjRbcpPUEfdJVy72Lv2 FcxIDvvdZWOSS4xunUWaPiI8pKvhWZVK7zojL/uWXFJSA6liotxJuaNQHDuIuDDaLxJP ECF6T+QqDPMxBQ/PupDy0tIXBzUfHSDd+4u3s+F1Hu1oQBKWCzHK+6SJ9ylET+YqLRAx r3wA== X-Gm-Message-State: AODbwcD0dbPbjBMDKFHnJZATdQ/M5dROxjh6Vb909eRWcz43XQZlCF5N ctpV+hiTttO0/Q== X-Received: by 10.36.117.211 with SMTP id y202mr12663112itc.88.1495409023955; Sun, 21 May 2017 16:23:43 -0700 (PDT) Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id o125sm7001598ioo.21.2017.05.21.16.23.43 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 21 May 2017 16:23:43 -0700 (PDT) From: npostavs@users.sourceforge.net To: Lars Ingebrigtsen Subject: Re: bug#20192: [PATCH] for C or C++ sources (ff-find-other-file) now has a symmetric mapping References: <87r3sexjbw.fsf@secretsauce.net> <87fuwjso2s.fsf@gnus.org> Date: Sun, 21 May 2017 19:25:21 -0400 In-Reply-To: <87fuwjso2s.fsf@gnus.org> (Lars Ingebrigtsen's message of "Tue, 23 Feb 2016 21:44:43 +1100") Message-ID: <87pof1g5cu.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 20192 Cc: Dima Kogan , 20192@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) tags 20192 fixed close 20192 26.1 quit Lars Ingebrigtsen writes: > Dima Kogan writes: > >> `cc-other-file-alist' has a mapping of file extensions to switch >> between headers and sources, but the mappings weren't completely >> symmetric. In particular .cpp would map to .hh, but .hh would NOT map >> to .cpp. This patch updates the mappings to always contain symmetric >> pairs so that repeated invocations of (ff-find-other-file) can toggle >> between all pairs of sources/headers. > > I think this sounds like a reasonable addition, but that's not a > function I've ever used, so I can't really say. Does anybody object to > this change? Seems like a straightforward improvement, pushed to master [1: 08848e33ba]. [1: 08848e33ba]: 2017-05-21 17:43:02 -0400 Make ff-find-other-file symmetric for C++ (Bug#20192) http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=08848e33baf16d3137b171205f51839d8fcf7d06 From unknown Fri Aug 15 11:10:51 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 19 Jun 2017 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator