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.devel Subject: Re: Subversion of user chosen major mode by Emacs. [Was: My usage of imenu is broken.] Date: Thu, 30 May 2024 08:25:39 +0300 Message-ID: <867cfbswfg.fsf@gnu.org> References: <86r0dmtbk2.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33890"; mail-complaints-to="usenet@ciao.gmane.io" Cc: acm@muc.de, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu May 30 07:26:44 2024 Return-path: Envelope-to: ged-emacs-devel@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 1sCYJH-0008b7-VF for ged-emacs-devel@m.gmane-mx.org; Thu, 30 May 2024 07:26:44 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sCYIK-00011K-2Z; Thu, 30 May 2024 01:25:44 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sCYII-00010X-1p for emacs-devel@gnu.org; Thu, 30 May 2024 01:25:42 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sCYIH-0003I1-33; Thu, 30 May 2024 01:25:41 -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=+8XAVU4wxlnK0H1XhW6TfnwGPRkle8luAD4gRyWYOEI=; b=Z8Lb8eq2U91S bMMyodGUkIVlslSIS8vDmSIgZW6oEgx265xf60kgu6LazJH7LKVdWnnQYFt/uGm+VXMdRwryyD4iK mRCowx44NbUwGRNrxNf0nyym00CdvSJrWte9NSiy6I/XdURUZutiyI3oZSRUo3tWHdtoOZqWUa/Zd cm3JTqL65C9STUCznDnDT7B/eHwro90NZvZPrAvl+orDaMWsbgKimV70v2erfvbHkk+h+qc05CGj3 EM6sLS+v+XlGZ1fFQe3Q/TI46oHLVqPoJrITs7NqCDwp1r7HFzGY9o+u5ATd3B5FFGq/M04+Hq9n9 Fegnz9PFwVJJtvnT44cgTw==; In-Reply-To: (message from Stefan Monnier on Wed, 29 May 2024 21:32:05 -0400) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:319720 Archived-At: > From: Stefan Monnier > Cc: Eli Zaretskii , emacs-devel@gnu.org > Date: Wed, 29 May 2024 21:32:05 -0400 > > > If somebody has specified -*- c-mode -*-, then they mean CC Mode. > > If they don't, they should write -*- c-ts-mode -*- instead, or Emacs > > should provide something like -*- c-generic-mode -*-. > > I strongly disagree: file-local variables should describe the file's > content, not the user's favorite environment to edit it. How do we know that this was the intent? It could be either of these two, whether you like it or not. If we want to know for sure, perhaps we need to introduce a new kind of cookie, like 'force-mode: c++-mode' or somesuch. > Otherwise, it's impossible for two users who have different preferences > to share that file. How do I force the use of a specific mode when more than one can handle the file? It is possible that the file relies on some features specific to that mode, so such use cases are not outlandish.