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.help Subject: Re: New line and trailing whitespaces Date: Sat, 20 Apr 2024 17:16:37 +0300 Message-ID: <86o7a486gq.fsf@gnu.org> References: <86sezg87oh.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27625"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Apr 20 16:17:05 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 1ryBWa-0006uC-E6 for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 20 Apr 2024 16:17:04 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ryBWC-000718-LL; Sat, 20 Apr 2024 10:16:40 -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 1ryBWB-00070k-A2 for help-gnu-emacs@gnu.org; Sat, 20 Apr 2024 10:16:39 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ryBWB-0002P1-1q for help-gnu-emacs@gnu.org; Sat, 20 Apr 2024 10:16:39 -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=Cl1YgmCfL6g7rjViWyuCL8oBTGzs429jq12haMg7V5g=; b=c6+KyuCf/4kq tvvxE/fFKC+hwL622se8FJF6i+kJ34Gr2YOaJk+bvva6dZNWgyL9Yo7a1P7GSpMf1zoLXxuU6A5SP +MJRIGm8b6nuP3sSG86f1O0sD+fZSclrWMn2M8lTQOeLf92DrUyR3ntZofeuexYsuHRtS+z43E9se q1SJmepIAKFQ3Q/y2uAaGC7x2smSrmgiSkHYuiPVFN0UI2B9aTQ0A+InyJUa1+1zt+A3giJnPyhBN Bo4gy/1ega2zLsxvkIRDuYrFuLROF7SAYy5MhGa9pMdBj7j31Ub1TcuDmvRuFtTJmnXoU/SsDIVeJ ivfYPjuL3KjzQoKyWHzUaQ==; In-Reply-To: <86sezg87oh.fsf@gnu.org> (message from Eli Zaretskii on Sat, 20 Apr 2024 16:50:22 +0300) 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:146405 Archived-At: > Date: Sat, 20 Apr 2024 16:50:22 +0300 > From: Eli Zaretskii > > > Date: Sat, 20 Apr 2024 14:10:34 +0200 > > From: Ergus > > > > When the cursor is in an empty line and I press enter, the cursor jumps > > to the new line and indents (similar to what emacs does) but also > > removes the trailing whitespaces in the previous/leaving line. > > Emacs does that since a long time ago (unless I misunderstand what you > mean). Just to be more specific: it's the electric-indent-mode, which is ON by default in Emacs since v24, that does this. So if you don't see this when you press RET, just turning electric-indent-mode should be all you need.