From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.help Subject: Re: indentation Date: Fri, 30 Apr 2021 07:58:48 +0000 Message-ID: <877dkktd8n.fsf@posteo.net> References: <20210427090348.67C9B5D0@centrum.cz> <20210427202932.DFDEF50D@centrum.cz> <20210428083227.FCFDA7C0@centrum.cz> <20210429091455.3C8C08A9@centrum.cz> <20210430090513.BD2C4C90@centrum.cz> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25929"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Apr 30 09:59:42 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 1lcO3p-0006eI-TP for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 30 Apr 2021 09:59:41 +0200 Original-Received: from localhost ([::1]:41216 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lcO3o-0006zN-Rd for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 30 Apr 2021 03:59:40 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:32956) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lcO37-0006yP-Qc for help-gnu-emacs@gnu.org; Fri, 30 Apr 2021 03:58:58 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]:55859) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lcO35-0002qz-KJ for help-gnu-emacs@gnu.org; Fri, 30 Apr 2021 03:58:57 -0400 Original-Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 86AF3240026 for ; Fri, 30 Apr 2021 09:58:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1619769531; bh=j4OEO/1fntCw/Y4UTCDRpFGiGoEkfEnaZ0QN3D7DUdE=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=Ida82+tJ8uwLG2z1+6Qg+g51nN7fqxEQwuwccVvNCGTIJnWGz1uhVpKlaxvLVm8mo 4MZiTMLjRawFOn4TpGw9iCU2Pr2fe1Ki1SXoBN2DQ18fwlzOicGHlRal7fysAVDTFV i5mCFhsZVCy5L6/oSlprPGhn8YzXyMzIxv084J1sOx/hPeV8bO4fbKQ23U5POu38WY UeGXX1m2mrEUgym6PJAOJ1CVVJ54RhZSKCjpAt930jTSU4rR1ZIiOqSEMk46CQhnPk re0qq5/K/iFgmS0W5k0LJByxE9gVcMe+AOCnT+9a5eiDQFcJubx9KO4mqzCzEg+aGh TdFmZspleIMnw== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4FWlB21BY1z6tmb; Fri, 30 Apr 2021 09:58:50 +0200 (CEST) Autocrypt: addr=philipk@posteo.net; prefer-encrypt=mutual; keydata= mDMEYHHqUhYJKwYBBAHaRw8BAQdAp3GdmYJ6tm5McweY6dEvIYIiry+Oz9rU4MH6NHWK0Ee0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiQBBMWCAA4FiEEDM2H44ZoPt9Ms0eHtVrAHPRh1FwFAmBx6lICGwMFCwkIBwIGFQoJ CAsCBBYCAwECHgECF4AACgkQtVrAHPRh1FyTkgEAjlbGPxFchvMbxzAES3r8QLuZgCxeAXunM9gh io0ePtUBALVhh9G6wIoZhl0gUCbQpoN/UJHI08Gm1qDob5zDxnIHuDgEYHHqUhIKKwYBBAGXVQEF AQEHQNcRB+MUimTMqoxxMMUERpOR+Q4b1KgncDZkhrO2ql1tAwEIB4h4BBgWCAAgFiEEDM2H44Zo Pt9Ms0eHtVrAHPRh1FwFAmBx6lICGwwACgkQtVrAHPRh1Fw1JwD/Qo7kvtib8jy7puyWrSv0MeTS g8qIxgoRWJE/KKdkCLEA/jb9b9/g8nnX+UcwHf/4VfKsjExlnND3FrBviXUW6NcB In-Reply-To: <20210430090513.BD2C4C90@centrum.cz> (ptlo@centrum.cz's message of "Fri, 30 Apr 2021 09:05:13 +0200") Received-SPF: pass client-ip=185.67.36.65; envelope-from=philipk@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, 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.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:129212 Archived-At: writes: > But the problem where it all started is, when I press enter, the new > empty line got indented to first character of previous line. There is > absolutely no reason to impose that the block shall continue. Instead, > an END statement may follow which is indented differently. Also one > can wish to insert an empty line and then an automated insertion of > spaces for no reason is hard to justify. Indeed I always felt the urge > to delete those spaces (still was thinking how to do it as fast as > possible and get over without new indentation...) What language are we talking about? Maybe it is not clever enough, ie. you haven't enabled electric-pair-mode? When working with C, that automatically inserts the opening and closing parentheses, and when I press enter {|} becomes { | } just as I would want it. And of course, all instructions should be intended. Even if I weren't to enable electric-pair-mode, electric-indent-mode would do the right thing when closing a block, because it automatically re-indents the '}', when it is on it's own. -- Philip K.