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.bugs Subject: bug#22564: Fundamental mode isn't fundamental enough. Date: Thu, 05 May 2022 08:43:21 +0300 Message-ID: <83k0b0356u.fsf@gnu.org> References: <20160205125559.GC7727@acm.fritz.box> <20160205215301.GG7727@acm.fritz.box> <87ee1isi8r.fsf@gnus.org> <83h7697p7b.fsf@gnu.org> <83h7664kmg.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40784"; mail-complaints-to="usenet@ciao.gmane.io" Cc: rgm@gnu.org, johnw@gnu.org, 22564@debbugs.gnu.org, monnier@iro.umontreal.ca, acm@muc.de, larsi@gnus.org To: rms@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu May 05 07:47:46 2022 Return-path: Envelope-to: geb-bug-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 1nmUL4-000ASK-2F for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 05 May 2022 07:47:46 +0200 Original-Received: from localhost ([::1]:60226 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nmUL2-0002i8-NC for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 05 May 2022 01:47:44 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50520) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nmUHS-00019g-FR for bug-gnu-emacs@gnu.org; Thu, 05 May 2022 01:44:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50248) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nmUHS-0001bZ-6A for bug-gnu-emacs@gnu.org; Thu, 05 May 2022 01:44:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nmUHS-0001pd-3c for bug-gnu-emacs@gnu.org; Thu, 05 May 2022 01:44:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 05 May 2022 05:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22564 X-GNU-PR-Package: emacs Original-Received: via spool by 22564-submit@debbugs.gnu.org id=B22564.16517294387013 (code B ref 22564); Thu, 05 May 2022 05:44:02 +0000 Original-Received: (at 22564) by debbugs.gnu.org; 5 May 2022 05:43:58 +0000 Original-Received: from localhost ([127.0.0.1]:44141 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nmUHO-0001ov-A9 for submit@debbugs.gnu.org; Thu, 05 May 2022 01:43:58 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:57058) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nmUHM-0001oR-Ub for 22564@debbugs.gnu.org; Thu, 05 May 2022 01:43:57 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:44692) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nmUHB-0001Tr-Ud; Thu, 05 May 2022 01:43:50 -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=x2usTZzpkK+w2wZqmF7uULr1MstOAQIjYUXuTketHxw=; b=n6i3Ez8O7M/N qu34C3RHvyzy8XhcGPGo4jFOsz7HpPx9eQWSheBrLAZ0ZK/xotgTPs3JhokO46HaLiurooHt/YcOL 5cPY40p5zRr5YeYT65fzBvVnUt7XuJQWAaDRfGQW/knKeRcYPHh4hro93zrtrgmJ3aMx56P0TjGem A/z6WtUnp/jBxqgUx9GsXFzmf/Z0Zg/nwFFHsPTwPg/6QL47i6zV/oIBYEt7pJg28bADhAC41qSbJ Bn6+e88lqeR+GTj7JPbKTLOiEfYR36o1dVuOryoJ/IVQYu8GUnzRwXSbRRY6jdj408Djk5f0Rs9Z3 5oB9437XQUHg5U5RAMg/oQ==; Original-Received: from [87.69.77.57] (port=3234 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nmUH3-0001Dh-Ed; Thu, 05 May 2022 01:43:40 -0400 In-Reply-To: (message from Richard Stallman on Wed, 04 May 2022 18:49:15 -0400) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:231403 Archived-At: > From: Richard Stallman > Cc: rgm@gnu.org, johnw@gnu.org, 22564@debbugs.gnu.org, > monnier@iro.umontreal.ca, acm@muc.de, larsi@gnus.org > Date: Wed, 04 May 2022 18:49:15 -0400 > > > That is only important to document if enough important major modes > > don't customize it. > > Fundamental mode is one -- and that's enough. It is the default > mode if you visit a file whose name has no special extension. > For instance, `foo'. I disagree with it being important, as I already said. But I don't think this aspect is important enough to keep arguing about it, see below. > What DOES Electric Indent mode do in Fundamental mode? > Nothing? > > I am starting to think that is what it does. No, it isn't "nothing". Once again, I already gave an example of what it does in Fundamental. Here is that example repeated: As a simple example, try this in fundamental mode, on an empty line: C-u 10 SPC C-u 10 x RET > > Sorry, I disagree that Fundamental mode is important. Its being the > > default doesn't mean users frequently see it, not at all. > > I do. And not for any special reason. If I want to put some notes > in a file, I give it a simple name. I don't add an extension just to > get some other mode. (Do you?) I find that Fundamental mode is fine. I don't add extensions, but files edited in Emacs frequently do have extensions and usually have some major mode that is not Fundamental. So I don't think your use pattern is common. Nevertheless, if we describe better what the newline and similar characters do in electric-indent-mode, that would cover Fundamental as well, no need to do something special about Fundamental, nor to argue about its importance. > > The electric characters normally include the newline, but can also > > include other characters as needed by the major mode; see > > `electric-indent-chars' for the actual list. > > Adding that would be useful, but it isn't enough because it doesn't > answer that crucial question. Which question was that? > > > How about adding, "Typically the major mode controls what reindenting does."? > > > I'm sorry, I don't think I understand how saying that would help. > > Unless a person knows "what reindenting does" (or even what is > > "reindenting"), this leaves the issue as obscure as it was before. > > The Emacs Manual does not define "reindenting". It is not exactly > synonymous with "indenting", so I think this needs clarification > in the manual itself. > > Then the doc string of Electric Indent mode could refer to the > appropriate node in the Emacs Manual. > > I think reindenting means this: > > In major modes where indenting a line idempotently adjusts its > indentation to what is called for by the line's contents and > context, "reindenting" the line is the same as indenting it. > > In other situations, the concept of "reindenting" is not > really applicable, so commands that should "reindent" actually > do nothing or have some other definion. > > Is this entirely correct? I don't know. But I think it is better to say that this mode automatically indents the current line according to the context (the surrounding lines) and the rules of the major mode. After all, the mode's name is "Electric Indent mode", not "Electric Reindent mode".