From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.help Subject: Re: indentation Date: Fri, 30 Apr 2021 22:17:07 +0200 Message-ID: <87lf8zcxog.fsf@gnu.org> References: <20210427090348.67C9B5D0@centrum.cz> <20210427202932.DFDEF50D@centrum.cz> <20210428083227.FCFDA7C0@centrum.cz> <8635v86ber.fsf@protonmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14784"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.5.12; emacs 28.0.50 Cc: help-gnu-emacs@gnu.org To: Wayne Harris Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Apr 30 23:41:41 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 1lcatI-0003lS-Vd for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 30 Apr 2021 23:41:40 +0200 Original-Received: from localhost ([::1]:43406 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lcatI-0005jE-2r for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 30 Apr 2021 17:41:40 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55442) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lcZxE-0000gb-V9 for help-gnu-emacs@gnu.org; Fri, 30 Apr 2021 16:41:40 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:56832) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lcZxE-0005Zo-M1; Fri, 30 Apr 2021 16:41:40 -0400 Original-Received: from auth2-smtp.messagingengine.com ([66.111.4.228]:33125) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.82) (envelope-from ) id 1lcZxD-0001BX-Vw; Fri, 30 Apr 2021 16:41:40 -0400 Original-Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailauth.nyi.internal (Postfix) with ESMTP id 44A0A27C005A; Fri, 30 Apr 2021 16:41:39 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Fri, 30 Apr 2021 16:41:39 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvddviedgudehfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpehffgfhvffuffgjkfggtgesthdtredttdertdenucfhrhhomhepvfgrshhs ihhlohcujfhorhhnuceothhsughhsehgnhhurdhorhhgqeenucggtffrrghtthgvrhhnpe evveeikeetkeeviefgfeffiedvteeguddvffeuueduveegtddthedvhfeuveffhfenucfk phepkeejrdduieefrdefuddrudehgeenucevlhhushhtvghrufhiiigvpedtnecurfgrrh grmhepmhgrihhlfhhrohhmpehthhhorhhnodhmvghsmhhtphgruhhthhhpvghrshhonhgr lhhithihqdekieejfeekjeekgedqieefhedvleekqdhtshguhheppehgnhhurdhorhhgse hfrghsthhmrghilhdrfhhm X-ME-Proxy: Original-Received: from thinkpad-t440p (p57a31f9a.dip0.t-ipconnect.de [87.163.31.154]) by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 30 Apr 2021 16:41:38 -0400 (EDT) In-reply-to: <8635v86ber.fsf@protonmail.com> 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:129227 Archived-At: 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 --8<---------------cut here---------------start------------->8--- \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. --8<---------------cut here---------------end--------------->8--- which is indented according to how AUCTeX would do it or the builtin `latex-mode' if `latex-indent-within-escaped-parens' is t. Bye, Tassilo