From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 21 23:13:04 2019 Received: (at submit) by debbugs.gnu.org; 22 Oct 2019 03:13:04 +0000 Received: from localhost ([127.0.0.1]:58124 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iMkbX-0007tk-NJ for submit@debbugs.gnu.org; Mon, 21 Oct 2019 23:13:03 -0400 Received: from lists.gnu.org ([209.51.188.17]:41407) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iMkbW-0007tT-Bi for submit@debbugs.gnu.org; Mon, 21 Oct 2019 23:13:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45886) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iMkbV-0003Vk-0a for bug-gnu-emacs@gnu.org; Mon, 21 Oct 2019 23:13:02 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_40,URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iMkbS-0004TD-HS for bug-gnu-emacs@gnu.org; Mon, 21 Oct 2019 23:13:00 -0400 Received: from sender4-of-o54.zoho.com ([136.143.188.54]:21475) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iMkbR-0004RH-9T for bug-gnu-emacs@gnu.org; Mon, 21 Oct 2019 23:12:58 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1571713973; cv=none; d=zohomail.com; s=zohoarc; b=eobJvVKaXeQVPwkJUSknik3dI5QWJbrT1qAOpQNnWkKHXz4pATaNDSQcGE7zfV9S6qvWwtJxRMYB+Eygw+RmoBl70wwduRen+prRtz0DySIEaLFGwC3YaD8pevATSJqugHrBdUJgqhGTAQg0MKx/m95LCQ7OQQln7cnyL6+0uXg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1571713973; h=Content-Type:Date:From:MIME-Version:Message-ID:Subject:To; bh=dbgMNXChYnV02tOF/oTxVqBTb52aded0ddyv6U2c25w=; b=b2jPlq9j1Wao8BIRokKOm5KaXJhjN8V0VfY/3SE98kfMUG5QH/n5RzroRIAs+4QARq+negcZTs3F+9kNlKjLvFhMTFv3qlDSe99004KKFAC2eL/BfFZSg/X5v4IxA6MiE3RrfYox6kEQi3TrRMH32FHRbFU8LOj312yZDhrx1E0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=topbug.net; spf=pass smtp.mailfrom=hong@topbug.net; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1571713973; s=zoho; d=topbug.net; i=hong@topbug.net; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; l=1400; bh=dbgMNXChYnV02tOF/oTxVqBTb52aded0ddyv6U2c25w=; b=eygDlBn/427LSbnEHcaUm/v6jpHNLLRdKiO4QLATqGTEZVJn1Sa8/wNXL84jcSSo 8sUJVv/YOaTWZ9IGvnVcKO2WxEmMDegyOzqDXETAXJh3v/4BOfvYGW6Yz19NO5YH0JE 4clT8iWYwBfhy70/DRZ6LtmhyR1+MMUpIdCcQAJs= Received: from home (69-215-149-151.lightspeed.sntcca.sbcglobal.net [69.215.149.151]) by mx.zohomail.com with SMTPS id 1571713971547434.48002720750753; Mon, 21 Oct 2019 20:12:51 -0700 (PDT) From: Hong Xu To: bug-gnu-emacs@gnu.org Subject: [PATCH] Use alternative C++ source files for determining C/C++ header files. Date: Mon, 21 Oct 2019 20:12:51 -0700 Message-ID: <87r235scb0.fsf@topbug.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-ZohoMailClient: External X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 136.143.188.54 X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit 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: -2.3 (--) * lisp/progmodes/cc-mode.el (c-or-c++-mode): Add check for the existence of alternative C++ source files. --- lisp/progmodes/cc-mode.el | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index 6bdfb170f1ba..940bd4be3f92 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el @@ -2492,16 +2492,23 @@ c-or-c++-mode matching on file name insufficient for detecting major mode that should be used. -This function attempts to use file contents to determine whether -the code is C or C++ and based on that chooses whether to enable -`c-mode' or `c++-mode'." - (if (save-excursion +This function attempts to use file contents and the existence of +alternative C++ source files to determine whether the code is C +or C++ and based on that chooses whether to enable `c-mode' or +`c++-mode'." + (if (or + (save-excursion (save-restriction (save-match-data (widen) (goto-char (point-min)) (re-search-forward c-or-c++-mode--regexp (+ (point) c-guess-region-max) t)))) + ;; We could have gone through auto-mode-alist here, but it + ;; might be too slow. + (let ((base-name (file-name-sans-extension (buffer-file-name)))) + (seq-find (lambda (ext) (file-exists-p (concat base-name ext))) + '(".cc" ".cpp" ".cxx" ".c++")))) (c++-mode) (c-mode))) -- 2.20.1 From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 26 07:07:01 2019 Received: (at 37862) by debbugs.gnu.org; 26 Oct 2019 11:07:01 +0000 Received: from localhost ([127.0.0.1]:39754 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iOJuO-000069-Lx for submit@debbugs.gnu.org; Sat, 26 Oct 2019 07:07:00 -0400 Received: from eggs.gnu.org ([209.51.188.92]:52878) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iOJuM-00005n-VW for 37862@debbugs.gnu.org; Sat, 26 Oct 2019 07:06:59 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:39712) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iOJuH-0003MK-GC; Sat, 26 Oct 2019 07:06:53 -0400 Received: from [176.228.60.248] (port=2793 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iOJuF-0002s9-PP; Sat, 26 Oct 2019 07:06:53 -0400 Date: Sat, 26 Oct 2019 14:06:39 +0300 Message-Id: <83eeyzvk8w.fsf@gnu.org> From: Eli Zaretskii To: Hong Xu , Alan Mackenzie In-reply-to: <87r235scb0.fsf@topbug.net> (message from Hong Xu on Mon, 21 Oct 2019 20:12:51 -0700) Subject: Re: bug#37862: [PATCH] Use alternative C++ source files for determining C/C++ header files. References: <87r235scb0.fsf@topbug.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 37862 Cc: 37862@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: -3.3 (---) > From: Hong Xu > Date: Mon, 21 Oct 2019 20:12:51 -0700 > > > * lisp/progmodes/cc-mode.el (c-or-c++-mode): Add check for the > existence of alternative C++ source files. Thanks. Alan, are you looking at this? From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 26 11:19:26 2019 Received: (at 37862) by debbugs.gnu.org; 26 Oct 2019 15:19:26 +0000 Received: from localhost ([127.0.0.1]:41334 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iONqg-0000Nu-FQ for submit@debbugs.gnu.org; Sat, 26 Oct 2019 11:19:26 -0400 Received: from colin.muc.de ([193.149.48.1]:52857 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1iONqe-0000Nf-4y for 37862@debbugs.gnu.org; Sat, 26 Oct 2019 11:19:24 -0400 Received: (qmail 35913 invoked by uid 3782); 26 Oct 2019 15:19:22 -0000 Received: from acm.muc.de (p2E5D5144.dip0.t-ipconnect.de [46.93.81.68]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sat, 26 Oct 2019 17:19:20 +0200 Received: (qmail 22051 invoked by uid 1000); 26 Oct 2019 15:19:20 -0000 Date: Sat, 26 Oct 2019 15:19:20 +0000 To: Eli Zaretskii Subject: Re: bug#37862: [PATCH] Use alternative C++ source files for determining C/C++ header files. Message-ID: <20191026151920.GE17424@ACM> References: <87r235scb0.fsf@topbug.net> <83eeyzvk8w.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <83eeyzvk8w.fsf@gnu.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 37862 Cc: 37862@debbugs.gnu.org, Hong Xu 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: -1.0 (-) Hello, Eli. On Sat, Oct 26, 2019 at 14:06:39 +0300, Eli Zaretskii wrote: > > From: Hong Xu > > Date: Mon, 21 Oct 2019 20:12:51 -0700 > > * lisp/progmodes/cc-mode.el (c-or-c++-mode): Add check for the > > existence of alternative C++ source files. > Thanks. > Alan, are you looking at this? Yes, I've been thinking about it for a few days, now. I think what we could do with is a function `auto-mode' which, given a file name, would return the corresponding major mode as recorded in auto-mode-alist. At the moment, this functionality is a part of set-auto-mode, making it more difficult for other functions to do the same thing. It shouldn't be difficult. -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 27 09:30:45 2019 Received: (at 37862) by debbugs.gnu.org; 27 Oct 2019 13:30:45 +0000 Received: from localhost ([127.0.0.1]:41798 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iOid2-0007mF-RO for submit@debbugs.gnu.org; Sun, 27 Oct 2019 09:30:45 -0400 Received: from colin.muc.de ([193.149.48.1]:63743 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1iOid0-0007m5-G9 for 37862@debbugs.gnu.org; Sun, 27 Oct 2019 09:30:43 -0400 Received: (qmail 47103 invoked by uid 3782); 27 Oct 2019 13:30:40 -0000 Received: from acm.muc.de (p2E5D5E17.dip0.t-ipconnect.de [46.93.94.23]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 27 Oct 2019 14:30:38 +0100 Received: (qmail 28236 invoked by uid 1000); 27 Oct 2019 13:30:38 -0000 Date: Sun, 27 Oct 2019 13:30:38 +0000 To: Hong Xu Subject: Re: bug#37862: [PATCH] Use alternative C++ source files for determining C/C++ header files. Message-ID: <20191027133038.GA27906@ACM> References: <87r235scb0.fsf@topbug.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87r235scb0.fsf@topbug.net> User-Agent: Mutt/1.10.1 (2018-07-13) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 37862 Cc: 37862@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: -1.0 (-) Hello, Hong. On Mon, Oct 21, 2019 at 20:12:51 -0700, Hong Xu wrote: > * lisp/progmodes/cc-mode.el (c-or-c++-mode): Add check for the > existence of alternative C++ source files. > --- > lisp/progmodes/cc-mode.el | 15 +++++++++++---- > 1 file changed, 11 insertions(+), 4 deletions(-) > diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el > index 6bdfb170f1ba..940bd4be3f92 100644 > --- a/lisp/progmodes/cc-mode.el > +++ b/lisp/progmodes/cc-mode.el > @@ -2492,16 +2492,23 @@ c-or-c++-mode > matching on file name insufficient for detecting major mode that > should be used. > -This function attempts to use file contents to determine whether > -the code is C or C++ and based on that chooses whether to enable > -`c-mode' or `c++-mode'." > - (if (save-excursion > +This function attempts to use file contents and the existence of > +alternative C++ source files to determine whether the code is C > +or C++ and based on that chooses whether to enable `c-mode' or > +`c++-mode'." > + (if (or > + (save-excursion > (save-restriction > (save-match-data > (widen) > (goto-char (point-min)) > (re-search-forward c-or-c++-mode--regexp > (+ (point) c-guess-region-max) t)))) > + ;; We could have gone through auto-mode-alist here, but it > + ;; might be too slow. > + (let ((base-name (file-name-sans-extension (buffer-file-name)))) > + (seq-find (lambda (ext) (file-exists-p (concat base-name ext))) > + '(".cc" ".cpp" ".cxx" ".c++")))) > (c++-mode) > (c-mode))) > -- > 2.20.1 Thanks for writing this proposal. I think it would be better, given a foo.h, to find all files foo.*, and test each one in turn for a match in auto-mode-alist. Searching this alist is really not that slow, particularly as it is only being done a few times, and not in a tight loop. For this, we really want a function in the Emacs core which would find the match in auto-mode-alist. Currently, this functionality is open coded in set-auto-mode (in .../lisp/files.el). However, I'm a bit sceptical about the use of this proposed facility. Many projects (possibly most) have .c/.c++ files in a directory called "src", and .h files in a separate directory called "include". This proposed facility wouldn't work in such a set up. To extend it to cope with separate "src"/"include" directories would make it messy. -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 27 16:31:41 2019 Received: (at 37862) by debbugs.gnu.org; 27 Oct 2019 20:31:41 +0000 Received: from localhost ([127.0.0.1]:43581 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iOpCO-0002Iq-QJ for submit@debbugs.gnu.org; Sun, 27 Oct 2019 16:31:41 -0400 Received: from sender4-of-o54.zoho.com ([136.143.188.54]:21492) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iOpCL-0002Ia-44 for 37862@debbugs.gnu.org; Sun, 27 Oct 2019 16:31:38 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1572208294; cv=none; d=zohomail.com; s=zohoarc; b=UL+DOvEDw1vOsRMvQSoMYXXBMuDl4bP1ta3RHDsIqQdZMyPU2DQWFac+DXJqfKXm6tLrPKw32o0tMOmUK2tAWQNi6e3mmJd+bTfrV2rTXCNYOFf7YyWUJU37CVbTkwzZfK6UpiSIPjxNppi572N8bHw0pJBvHX+ZvIyOAwvcjUg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1572208294; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=vSHJb4v52vrPaTvekFFa+3c3Gc1/lEvy8015bfMaBxE=; b=IqPT4an2sC3yvBUDf7pHjvLYVLAkQFY8yRiNbmCY/r19EWHBgWSemYV6+l1ATpsa9W3+F92I9Nmj20yTIwQjQ2gVFajxktF1UKzvgEWpDALvK/6TQxE7nufFBNd1AM5NxQMfIQgznEcwRWY43AulpHvfBxzlCNse7oKJ9oiGWDo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=topbug.net; spf=pass smtp.mailfrom=hong@topbug.net; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1572208294; s=zoho; d=topbug.net; i=hong@topbug.net; h=Subject:To:Cc:References:From:Message-ID:Date:MIME-Version:In-Reply-To:Content-Type:Content-Transfer-Encoding; l=1334; bh=vSHJb4v52vrPaTvekFFa+3c3Gc1/lEvy8015bfMaBxE=; b=Ul1ZKlkOb4Yp62MevGaFfdrfcFXCRil9whzWYbMA4w6SAKwkq8dZon9dMy+H1g/s P+TKe/UnlQpJLVJawVSnB6aWu67qLKA/KNdlCQUbo9z1y8Mm1FGNntem1JLLGmzyHtU BabwsQQm0WG9PgIn/CdGne0dALOZ85boTt/2ntRk= Received: from [192.168.88.88] (69-215-149-151.lightspeed.sntcca.sbcglobal.net [69.215.149.151]) by mx.zohomail.com with SMTPS id 1572208294404234.7524913405265; Sun, 27 Oct 2019 13:31:34 -0700 (PDT) Subject: Re: bug#37862: [PATCH] Use alternative C++ source files for determining C/C++ header files. To: Alan Mackenzie References: <87r235scb0.fsf@topbug.net> <20191027133038.GA27906@ACM> From: Hong Xu Openpgp: preference=signencrypt Message-ID: <89b138ad-e044-d117-e26f-414d29ca7732@topbug.net> Date: Sun, 27 Oct 2019 13:31:33 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20191027133038.GA27906@ACM> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-ZohoMailClient: External X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 37862 Cc: 37862@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: -1.0 (-) On 10/27/19 6:30 AM, Alan Mackenzie wrote: > > Thanks for writing this proposal. > > I think it would be better, given a foo.h, to find all files foo.*, and > test each one in turn for a match in auto-mode-alist. Searching this > alist is really not that slow, particularly as it is only being done a > few times, and not in a tight loop. I agree with this approach, if it would not be too slow. Perhaps we can set a limit on the number of files that match foo.*. > > For this, we really want a function in the Emacs core which would find > the match in auto-mode-alist. Currently, this functionality is open > coded in set-auto-mode (in .../lisp/files.el). I like the idea to create a separate function that provides this feature. Do you mean it's somewhat buried in `set-auto-mode'? It's probably also useful in other places. > > However, I'm a bit sceptical about the use of this proposed facility. > Many projects (possibly most) have .c/.c++ files in a directory called > "src", and .h files in a separate directory called "include". This > proposed facility wouldn't work in such a set up. To extend it to cope > with separate "src"/"include" directories would make it messy. This is true; but I think no guessing is perfect. At least the proposed solution should help with some smaller projects. From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 07 20:07:17 2019 Received: (at control) by debbugs.gnu.org; 8 Nov 2019 01:07:17 +0000 Received: from localhost ([127.0.0.1]:44195 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iSsk9-0002Z0-Bq for submit@debbugs.gnu.org; Thu, 07 Nov 2019 20:07:17 -0500 Received: from host.gofardesign.uk ([208.79.239.190]:40683) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iSsk7-0002Yi-Mc for control@debbugs.gnu.org; Thu, 07 Nov 2019 20:07:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=marxist.se; s=default; h=Subject:From:To:Date:Sender:Reply-To:Message-ID:Cc:MIME-Version :Content-Type:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=iFTWZr249Iwej09CP93MWhhJ1FE5LAD1AhOY0Wh9YXY=; b=i+J9cPPYVIJJNva3+O+Sbpgvl7 rUFn2+7+3jqsQUFwuakcA9p/i57AqnKDkLL5n/VsUiOIMS6tH3SKvpfSW5Nu4mH4KNAOvTnKF7GIq /+6oOiFK1GIpGdlJysHfxKhpmaeLsRuKfbNwgLh1q+vcR0eiV4BmAScg/r7Z0fOtaMDo=; Received: from h-70-69.a785.priv.bahnhof.se ([155.4.70.69]:50176 helo=localhost) by host.gofardesign.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1iSsk2-0001Uw-11 for control@debbugs.gnu.org; Thu, 07 Nov 2019 19:07:10 -0600 Date: Fri, 08 Nov 2019 02:07:08 +0100 To: control@debbugs.gnu.org From: Stefan Kangas Subject: control message for bug #37862 X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - host.gofardesign.uk X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - marxist.se X-Get-Message-Sender-Via: host.gofardesign.uk: authenticated_id: stefan@marxist.se X-Authenticated-Sender: host.gofardesign.uk: stefan@marxist.se X-Source: X-Source-Args: X-Source-Dir: X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: control 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" Message-Id: X-Spam-Score: -1.0 (-) reassign 37862 emacs,cc-mode quit From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 26 21:22:25 2020 Received: (at control) by debbugs.gnu.org; 27 Feb 2020 02:22:25 +0000 Received: from localhost ([127.0.0.1]:57986 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j78oj-0002JQ-Gn for submit@debbugs.gnu.org; Wed, 26 Feb 2020 21:22:25 -0500 Received: from mail-qv1-f51.google.com ([209.85.219.51]:36989) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j78oi-0002JC-R5 for control@debbugs.gnu.org; Wed, 26 Feb 2020 21:22:25 -0500 Received: by mail-qv1-f51.google.com with SMTP id ci20so845341qvb.4 for ; Wed, 26 Feb 2020 18:22:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=QE059cK+WU7bHEf3MpiTL9JyOnmqFlNW7trdjDp94vA=; b=e5sVEzHVHKCK1gCKIZfDPUU8tRXfvB0go9NctKR9WTXdT8GB0/FlJ1gIpXM+bqT3m3 r6d46w4o75flrX4VvptOGzTFJP+UHEmnGWeckHFzL1MjugqrzxMD+3euAWIAwpKy6VjE 4H3NGJeAzb9fZxNi1qPcwroe2eGf0w0udeoCe2d2R1FXxapCdlIkyRgutrzStGmyd4ie Ft61ZS9sKwEugqM345TBhrPHrpIyD5x4Vzx5oCTSztQQVU4fb+um0AlQ/lF/UyFKXml6 d+XqbwQsM7Il0C5Wi8ebZWOb5rQBZxXaEVqJjpSdEtTej7Rc1/VtiB61ObAWgMxCHZfw cx+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=QE059cK+WU7bHEf3MpiTL9JyOnmqFlNW7trdjDp94vA=; b=l9uez8GIqNEXxCl42OLtc3zLhUsFDuBXZdeAMm55ns2MjoV5o9nyg6doTJvgBCRPnb Ff9jGNY0l0sVsMLceA8Tekzc9ZZIHBycEog1j6UWTOck4kD7RWdlJGNunuEKIBHgQHsg wzosMh+fqpTGXkRdmH+7FFezt4tJwyUVlxKoHAWNuS49C0poQpmvJlmoi3/Ty7juYaAS MXZ+sQdrv5oTzG4KdnEeFvj41xGkGtCbOTOqlhCxYTNMMRNARlUKi/1YcykogPpisgHA mVSzqqswAdfsJEi7uQu1FChVM7EO5rnwVOFF3M8terQs8mkcr4j+oS4BbcDAL4S0udru JwnQ== X-Gm-Message-State: APjAAAWqqrSymnaUZrNcbpCUfYaZFs2w8k960BDG7cJ2vJ7GcpSlyPO7 TUxFuZ1NIN5dQcytQa9txku96QFcgcY= X-Google-Smtp-Source: APXvYqxNKvocV7IH/TprJO2i5sOo4QS7VWPKsiIUlJh2u+kyKjzzKMs70gQyIG4w8xu90GZvm84Lgg== X-Received: by 2002:a0c:a998:: with SMTP id a24mr2352553qvb.11.1582770139190; Wed, 26 Feb 2020 18:22:19 -0800 (PST) Received: from minid (cbl-45-2-119-47.yyz.frontiernetworks.ca. [45.2.119.47]) by smtp.gmail.com with ESMTPSA id b23sm932510qkc.39.2020.02.26.18.22.18 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 26 Feb 2020 18:22:18 -0800 (PST) From: Noam Postavsky To: control@debbugs.gnu.org Subject: control message for bug #0 Date: Wed, 26 Feb 2020 21:22:18 -0500 Message-ID: <87mu94ahwl.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control 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: -1.0 (-) severity 37862 wishlist quit From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 04 13:10:32 2020 Received: (at 37862) by debbugs.gnu.org; 4 Jul 2020 17:10:32 +0000 Received: from localhost ([127.0.0.1]:59520 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrlgO-0000Sy-5t for submit@debbugs.gnu.org; Sat, 04 Jul 2020 13:10:32 -0400 Received: from colin.muc.de ([193.149.48.1]:46979 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1jrlgL-0000Sa-9q for 37862@debbugs.gnu.org; Sat, 04 Jul 2020 13:10:30 -0400 Received: (qmail 24077 invoked by uid 3782); 4 Jul 2020 17:10:22 -0000 Received: from acm.muc.de (p2e5d5832.dip0.t-ipconnect.de [46.93.88.50]) by localhost.muc.de (tmda-ofmipd) with ESMTP; Sat, 04 Jul 2020 19:10:22 +0200 Received: (qmail 23162 invoked by uid 1000); 4 Jul 2020 17:10:22 -0000 Date: Sat, 4 Jul 2020 17:10:22 +0000 To: Hong Xu Subject: Re: bug#37862: [PATCH] Use alternative C++ source files for determining C/C++ header files. Message-ID: <20200704171022.GC19042@ACM> References: <87r235scb0.fsf@topbug.net> <20191027133038.GA27906@ACM> <89b138ad-e044-d117-e26f-414d29ca7732@topbug.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <89b138ad-e044-d117-e26f-414d29ca7732@topbug.net> X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 37862 Cc: 37862@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: -1.0 (-) Hello, Hong. On Sun, Oct 27, 2019 at 13:31:33 -0700, Hong Xu wrote: > On 10/27/19 6:30 AM, Alan Mackenzie wrote: > > Thanks for writing this proposal. > > I think it would be better, given a foo.h, to find all files foo.*, and > > test each one in turn for a match in auto-mode-alist. Searching this > > alist is really not that slow, particularly as it is only being done a > > few times, and not in a tight loop. > I agree with this approach, if it would not be too slow. Perhaps we can > set a limit on the number of files that match foo.*. > > For this, we really want a function in the Emacs core which would find > > the match in auto-mode-alist. Currently, this functionality is open > > coded in set-auto-mode (in .../lisp/files.el). > I like the idea to create a separate function that provides this > feature. Do you mean it's somewhat buried in `set-auto-mode'? It's > probably also useful in other places. > > However, I'm a bit sceptical about the use of this proposed facility. > > Many projects (possibly most) have .c/.c++ files in a directory called > > "src", and .h files in a separate directory called "include". This > > proposed facility wouldn't work in such a set up. To extend it to cope > > with separate "src"/"include" directories would make it messy. > This is true; but I think no guessing is perfect. At least the proposed > solution should help with some smaller projects. After thinking it over for some time, I'm sorry to say I've decided not to commit your change to Emacs. I think the disadvantages would outweigh the advantages. But again, thanks for taking the trouble to post the idea on the buglist. -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 04 13:17:17 2020 Received: (at control) by debbugs.gnu.org; 4 Jul 2020 17:17:17 +0000 Received: from localhost ([127.0.0.1]:59530 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrlmv-0000dr-8v for submit@debbugs.gnu.org; Sat, 04 Jul 2020 13:17:17 -0400 Received: from colin.muc.de ([193.149.48.1]:47303 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1jrlmt-0000dd-Og for control@debbugs.gnu.org; Sat, 04 Jul 2020 13:17:16 -0400 Received: (qmail 28849 invoked by uid 3782); 4 Jul 2020 17:17:09 -0000 Received: from acm.muc.de (p2e5d5832.dip0.t-ipconnect.de [46.93.88.50]) by localhost.muc.de (tmda-ofmipd) with ESMTP; Sat, 04 Jul 2020 19:17:08 +0200 Received: (qmail 23221 invoked by uid 1000); 4 Jul 2020 17:17:09 -0000 Date: Sat, 4 Jul 2020 17:17:09 +0000 To: control@debbugs.gnu.org Subject: Re: bug#37862: [PATCH] Use alternative C++ source files for determining C/C++ header files. Message-ID: <20200704171709.GD19042@ACM> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control 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: -1.0 (-) tags 37862 wontfix close 37862 quit -- Alan Mackenzie (Nuremberg, Germany). From unknown Sun Aug 17 22:09:01 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 02 Aug 2020 11:24:06 +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