From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: tpeplt Newsgroups: gmane.emacs.help Subject: Re: file mode synonymous with major mode Date: Thu, 28 Mar 2024 15:22:14 -0400 Message-ID: <87h6gqf9g9.fsf@gmail.com> References: <867chmmzwp.fsf@p200300d62732bb94c15e79ce9a9ec518.dip0.t-ipconnect.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37812"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Heime , Heime via Users list for the GNU Emacs text editor To: Joost Kremers Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Mar 28 20:23:13 2024 Return-path: Envelope-to: geh-help-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 1rpvLF-0009UT-9s for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 28 Mar 2024 20:23:13 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rpvKQ-0007o7-Ig; Thu, 28 Mar 2024 15:22:22 -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 1rpvKM-0007nY-Tz for help-gnu-emacs@gnu.org; Thu, 28 Mar 2024 15:22:19 -0400 Original-Received: from mail-ot1-x32c.google.com ([2607:f8b0:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rpvKL-00012g-4J for help-gnu-emacs@gnu.org; Thu, 28 Mar 2024 15:22:18 -0400 Original-Received: by mail-ot1-x32c.google.com with SMTP id 46e09a7af769-6e6d089cad0so788511a34.3 for ; Thu, 28 Mar 2024 12:22:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711653735; x=1712258535; darn=gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=8n3s5Ornvo4hcf1p+ofSaAgSXGcC8iUoE01g2gHNKqA=; b=LynmzjIMjXU2h1rlkMqtedJd/VA3MGeZsUTr4YsQFdxaWiU9vMUIOZRV9l+kykCpDO hSsJtzEeDTQMA9Hfj04LTCIztcNIKpj8z7wEoifGorSuSfuAEb5NOpgJpU4n8Ty2ragX GEbPDqU66FPsLSPmpDhE6sIDnBblzz5s0W1mu8BeaoQaAVFaoxYFPugiKFezKlKqOMbE ejTJYOcYLCsFiqEbQv/UJw7vw8+z+x2kijSNIjejL2khaufOVg4Lo5i8RMCldnx2PRjj 9DqO1ykUOGgFc8Pfcdn5+MpFmANXFZK6LHYM+WtTVMlzwMl5EKVSXYEpWA+IrdWW0qIv tqlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711653735; x=1712258535; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=8n3s5Ornvo4hcf1p+ofSaAgSXGcC8iUoE01g2gHNKqA=; b=wYTCIRHZCrWA1T7nJrI6/Qusi3IEneNXD5mrCD14lAEnP4ikNffNR+I5BGrD1a6etE 82Ez477NeZEaW7CHu+5DVnhpUTu1BrcLi8ZalLOtuMHqL8+1Sr3bKi7s1COLuU+MSuPe Lz8ovx45aXkR4Sosu7++VGvRakX5pZV9/1aOXv5CmDFbbUPeLSLaq8qn/Kpd0MLHqyJa 2u066Ya4hSlLNt8zcrculQIu8FCextgitCTyHm2reps9dAox3jbjaEkgnmGu7v5BkcFS i8qs5MICEO8WrxaNIZF3CDfPSz+huDO5hJQKOkJOW3a5ACvN3bSUHzZomZQuuW8n/6/m JZ2A== X-Forwarded-Encrypted: i=1; AJvYcCVCTKIEbkdnAUTeAhXgFNxQlqlV4lQwkGRYcd1Z5JMCJz+Xjb0Y6I0ivcSys/qwXhyD7CtpEyJtcq3DrgNVZM3BMbdevyEe X-Gm-Message-State: AOJu0Yx8IsHTGHv4XsrPCPOiTgPTaWwMtl2sXiPnmsLoiKT8cVQZLTOr yROlk28mOMHBsKadz9RZBQmuaYGj01I5FLrdmp8i3LRDNcpIGA9L9MN0hfLtpIY= X-Google-Smtp-Source: AGHT+IFyeDf/3p8wtTgr44CGNT5lDc7CtXXj12XLK8GAn8vqtLvF44YDqZsFQIGx5G7hHpMA8YSzww== X-Received: by 2002:a05:6870:b626:b0:229:8edf:886b with SMTP id cm38-20020a056870b62600b002298edf886bmr140479oab.22.1711653735630; Thu, 28 Mar 2024 12:22:15 -0700 (PDT) Original-Received: from t530.local ([2600:8806:a821:2b00::a6a6]) by smtp.gmail.com with ESMTPSA id gc10-20020a05622a59ca00b0043183c17af7sm874780qtb.36.2024.03.28.12.22.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Mar 2024 12:22:15 -0700 (PDT) In-Reply-To: <867chmmzwp.fsf@p200300d62732bb94c15e79ce9a9ec518.dip0.t-ipconnect.de> (Joost Kremers's message of "Thu, 28 Mar 2024 11:08:54 +0100") Received-SPF: pass client-ip=2607:f8b0:4864:20::32c; envelope-from=tpeplt@gmail.com; helo=mail-ot1-x32c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:146194 Archived-At: Joost Kremers writes: > On Thu, Mar 28 2024, Heime wrote: >> Reading the emacs manual '24.3 Choosing File Modes'. Is it correct to as= sert >> that >> the file mode is synonymous with the major mode ?=20=20 >> >> https://www.gnu.org/software/emacs/manual/html_node/emacs/Choosing-Modes= .html > > Given that that page talks about both major and minor modes, I'd say no. = It > rather refers to any modes activated for a specific file. > > Note that it's hardly an issue. "File mode" does not have any specific me= aning > in Emacs (unlike major and minor mode), so I wouldn't worry about it too = much. > (In fact, going through the manual, there appears to be another use of th= e term > "file mode", referring to what is more commonly called "file permissions"= : see > (info "(emacs) Misc File Ops").) Also, the major mode that is in effect for a given buffer may have nothing to do with ANY file. For example, the *scratch* buffer and Help buffers have no file associated with them, but both have a major mode. You can create a new buffer simply by switching to it with C-x b (bound to =E2=80=98switch-to-buffer=E2=80=99): C-x b a-new-buffer That buffer will have your default major mode, which is usually Fundamental mode. You can then change that mode to, for example, emacs-lisp-mode, by entering the command =E2=80=98emacs-lisp-mode=E2=80=99: M-x emacs-lisp-mode Your new buffer will now have its major mode changed to one that is normally associated with Emacs Lisp files and yet still have no association with any file. Likewise, you could have a file of Emacs Lisp code associated with a buffer in emacs-lisp-mode and could change its major mode to, for example, text mode: M-x text-mode In that case, even though your file has Emacs Lisp code, the buffer associated with it could be operated on as though it was plain text. (Besides looking at the first field of the Emacs mode line near the bottom of the screen, it is also possible to determine which major mode is in effect by evaluating the variable =E2=80=98major-mode=E2=80=99, eithe= r in a Lisp expression or by typing C-h v major-mode RET.) --