From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Ask etags to stop language auto-detection from falling back to Fortran and C? Date: Fri, 12 Jan 2018 10:16:24 +0200 Message-ID: <83y3l3331j.fsf@gnu.org> References: <7b2bedb2-7d1d-7307-e62e-c413bf1cd2de@yandex.ru> <83efmw4ab2.fsf@gnu.org> <69829b9d-a415-c323-f347-1d187b506012@yandex.ru> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1515744976 18096 195.159.176.226 (12 Jan 2018 08:16:16 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 12 Jan 2018 08:16:16 +0000 (UTC) Cc: emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jan 12 09:16:12 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eZuVP-0003lw-9T for ged-emacs-devel@m.gmane.org; Fri, 12 Jan 2018 09:16:03 +0100 Original-Received: from localhost ([::1]:52866 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eZuXO-0006CP-Uu for ged-emacs-devel@m.gmane.org; Fri, 12 Jan 2018 03:18:06 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52769) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eZuW9-0005nM-Gw for emacs-devel@gnu.org; Fri, 12 Jan 2018 03:16:50 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eZuW4-0008CU-5r for emacs-devel@gnu.org; Fri, 12 Jan 2018 03:16:48 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:36437) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eZuW4-0008CN-2t; Fri, 12 Jan 2018 03:16:44 -0500 Original-Received: from [176.228.60.248] (port=3634 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eZuW3-0005ty-HX; Fri, 12 Jan 2018 03:16:43 -0500 In-reply-to: <69829b9d-a415-c323-f347-1d187b506012@yandex.ru> (message from Dmitry Gutov on Fri, 12 Jan 2018 00:49:36 +0300) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:221871 Archived-At: > Cc: emacs-devel@gnu.org > From: Dmitry Gutov > Date: Fri, 12 Jan 2018 00:49:36 +0300 > > On 1/11/18 7:41 PM, Eli Zaretskii wrote: > > > There is already such an option: --language=none. If you have both > > files that you do want etags to parse for some language and files that > > you don't, > > I want etags to detect the language, but without the ridiculous > fallback. I don't understand: if the file's language can be detected by means known to etags, then it will never get to the fallbacks. It will only try the fallbacks if all the means to detect the language failed. So what do you mean by "detect, but without the fallbacks"? > > then either put all the latter at the end of the list and > > precede them with --language=none, or wrap each such file name with > > "--language=none FILE --language=auto". This works because --language > > takes effect on files specified after it. > > Won't "--language=none" stop it detecting the language based on file > extension and the sharp-bang declaration? It will, for the files following --language=none on the command line (but not for those that come before this switch). But if the extension and/or sharp-bang are in the file, the detection should not have failed, and the fallbacks would not have been attempted. So I feel I'm missing something in your use case, because I don't understand why you think --language=none is not what you want.