From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Wayne Harris via Users list for the GNU Emacs text editor Newsgroups: gmane.emacs.help Subject: Re: indentation Date: Sat, 01 May 2021 10:43:41 -0300 Message-ID: <86zgxe1sdu.fsf@protonmail.com> References: <20210427090348.67C9B5D0@centrum.cz> <20210427202932.DFDEF50D@centrum.cz> <20210428083227.FCFDA7C0@centrum.cz> <8635v86ber.fsf@protonmail.com> <87lf8zcxog.fsf@gnu.org> Reply-To: Wayne Harris Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22498"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Cancel-Lock: sha1:rYYix9MbB0NRgSP7/ndQtgW26bE= Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 01 15:44:18 2021 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 1lcpur-0005mn-ON for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 01 May 2021 15:44:17 +0200 Original-Received: from localhost ([::1]:56292 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lcpuq-0008RQ-RF for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 01 May 2021 09:44:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36456) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lcpuS-0008R5-PQ for help-gnu-emacs@gnu.org; Sat, 01 May 2021 09:43:52 -0400 Original-Received: from ciao.gmane.io ([116.202.254.214]:60466) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lcpuR-0006LH-6N for help-gnu-emacs@gnu.org; Sat, 01 May 2021 09:43:52 -0400 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1lcpuO-0005K5-S6 for help-gnu-emacs@gnu.org; Sat, 01 May 2021 15:43:48 +0200 X-Injected-Via-Gmane: http://gmane.org/ Received-SPF: pass client-ip=116.202.254.214; envelope-from=geh-help-gnu-emacs@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 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" Xref: news.gmane.io gmane.emacs.help:129281 Archived-At: Tassilo Horn writes: > Wayne Harris via Users list for the GNU Emacs text editor > writes: > > Hi Wayne, > >> Today I was writing some TeX and the following happened. Let me use >> ``[]'' to represent the point. >> >> \noindent {\em Notation.} As we often write polynomials in >> finite rings of characterisc 2, let's define >> %v >> \[\poly(x) = ...\] >> %e >> in the same way that it was used in the introduction. []%% Well... >> >> When I pressed RET, I got this >> >> \noindent {\em Notation.} As we often write polynomials in >> finite rings of characterisc 2, let's define >> %v >> \[\poly(x) = ...\] >> %e >> in the same way that it was used in the introduction. >> []%% Well... > > Electric indent works well when you just let Emacs do the indentation. > In your example, Emacs wouldn't indent the inline math (hitting TAB in > that line makes it pop to column 0), and then the next sentence wouldn't > be indented as well. So basically you are fighting Emacs' LaTeX > indentation rules, and that becomes harder when `electric-indent-mode' > is enabled [1]. (At least with AUCTeX, `fill-paragraph' will also > adjust the indentation.) > > FWIW, I'd write your example as > > \noindent {\em Notation.} As we often write polynomials in finite rings of > characterisc 2, let's define > \[ > \poly(x) = ... > \] > in the same way that it was used in the introduction. > > which is indented according to how AUCTeX would do it or the builtin > `latex-mode' if `latex-indent-within-escaped-parens' is t. Thank you. I had no idea what was going on there. Clearly the root cause of the problem is not understanding what is going on. That's life: I took a while to begin using paredit-mode precisely for not being able to minimially live with it, but it's been really worth it to try. (I use it constantly now.) Maybe the same will happen with electric-indent-mode. Definitely consider this subthread a request for help, not a complaint. But like the OP remarked, as these different behaviors appear after an upgrade to a newer version, it's a bit scary to imagine we won't survive with the new version.