From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id KPOfOnZHxV+JaQAA0tVLHw (envelope-from ) for ; Mon, 30 Nov 2020 19:26:46 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id sFFtNnZHxV9QUQAAB5/wlQ (envelope-from ) for ; Mon, 30 Nov 2020 19:26:46 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 3925F9401BC for ; Mon, 30 Nov 2020 19:26:46 +0000 (UTC) Received: from localhost ([::1]:59268 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kjoou-0004Ot-Fs for larch@yhetil.org; Mon, 30 Nov 2020 14:26:44 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:49614) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kjooL-0004Om-0u for emacs-orgmode@gnu.org; Mon, 30 Nov 2020 14:26:09 -0500 Received: from mail-ej1-x62b.google.com ([2a00:1450:4864:20::62b]:36235) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kjooI-0001gr-Rj for emacs-orgmode@gnu.org; Mon, 30 Nov 2020 14:26:08 -0500 Received: by mail-ej1-x62b.google.com with SMTP id lt17so24057870ejb.3 for ; Mon, 30 Nov 2020 11:26:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zzamboni-org.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=rBXEJDjzK/CBGrI/guv9AvjACAUgvYsHl4s1bPIImww=; b=NBFVFUtcsrhdL6b2imUomQv0jg94OhyL/llAVPbBVWEsirL6787u2rziT4IMrMWBpW QCXzk4YsP9g45uoSC8H3uYOij7BOHVNQk1A0BwpYdlVpxisTYALNPmnLZ59e7pY8VNF/ TF1cd4Z2btlKojDHcQSLmu4+ETkrcA2+Irg87wkWUDF9WD3q+ZIOY0nVrZYooBhM2thx T2byvD7hzIk82F7Hb8vZaMfDUh54skUZgMy663tLJHJX4dRXoF4VsH+vXWsXSr3lhwbJ Tq+S0mEResKPsVAIf0fNbTixrpH+boF6CkNU4yph413qim0NGv2Lu5OeBDQ4CSdIhREY zWkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=rBXEJDjzK/CBGrI/guv9AvjACAUgvYsHl4s1bPIImww=; b=gq1ZYYIwKu+12S5krvMDSK5lTxOtYZ86l2liyfZCAovJU0cQDuKe6vEk0BU/exAtmE 7gYv1VqpzwWpJxHrVmJ0FRAmrCGpCpzN3GLSEzkpBwOKSBX6Ekzcc8TDWMFzP5b28Hu3 LQVWES1wKFSbiUyZPi4yDc0fy5lu5G24MkeWBpGH/n69LqgrpgYQFYvr9gre5A0+8ZUr GAkBtQigEPWkFMrRivUaBmvK/8JMu2d3REO/f63FJMIER6TRwzDXDMvs2VhigbmoZKpa lR+1GtLq4rRkyD8guiC3IwPx8JlWHGuNHvg56rZCO6ienDFQBG+077p/E5TqGEa91kyL G/dw== X-Gm-Message-State: AOAM530TQa1fZKTJInqueHKNuIH9vkyPBbyVxxfFhDh/tBRLS/CX8DPt QpIjcsCtDX7ahl+mEOrfPQKiWn3Kw8g7Sjit3/UmPQ== X-Google-Smtp-Source: ABdhPJxRItnd8G4rl1wQLaBxmx1G3FeUNqk3SyFjL7zP28ClkJlU04D6GNlI+2Dub+0mSw3qpoTPAz1UPkewz37ClXI= X-Received: by 2002:a17:906:1c8e:: with SMTP id g14mr9050345ejh.5.1606764364242; Mon, 30 Nov 2020 11:26:04 -0800 (PST) MIME-Version: 1.0 References: <87tut6pxp1.fsf@posteo.de> <14271996-3E32-4E0D-A61D-C69F0FC01475@health.ucsd.edu> <87o8jevhjf.fsf@posteo.de> <87360qn10s.fsf@posteo.de> In-Reply-To: <87360qn10s.fsf@posteo.de> From: Diego Zamboni Date: Mon, 30 Nov 2020 20:25:53 +0100 Message-ID: Subject: Re: How to preserve empty headings To: Titus von der Malsburg Content-Type: multipart/alternative; boundary="0000000000002b391a05b557fbe5" Received-SPF: none client-ip=2a00:1450:4864:20::62b; envelope-from=diego@zzamboni.org; helo=mail-ej1-x62b.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Berry, Charles" , Org mailing list Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -2.49 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=zzamboni-org.20150623.gappssmtp.com header.s=20150623 header.b=NBFVFUtc; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 3925F9401BC X-Spam-Score: -2.49 X-Migadu-Scanner: ns3122888.ip-94-23-21.eu X-TUID: Rva5utCK5bj1 --0000000000002b391a05b557fbe5 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable What are RET and C-j bound to? In my setup, RET is bound to =3Dorg-return=3D, which does not delete spaces= , but C-j is bound to =3Dorg-return-and-maybe-indent=3D, which does. So I hav= e the opposite behavior as yours. There were some recent changes in behavior of Org with respect to electric-indent-mode (long discussion in the list), I think this might have something to do with it but did not follow the full discussion. Hope this helps, --Diego On Mon, Nov 30, 2020 at 7:38 PM Titus von der Malsburg wrote: > > On 2020-11-30 Mon 19:25, Diego Zamboni wrote: > >> > >> I=E2=80=99m aware of several workarounds and this one is perhaps the b= est. > >> However, I=E2=80=99d prefer if RET would just work as expected. Org s= ometimes > >> inserts extra material on RET which I think is okay (e.g. indentation)= , > but > >> is there any precedent, in Org or Emacs more broadly, for RET deleting > >> text? It seems very counter-intuitive to me. > >> > > > > Could it be that the space is being deleted not when you press RET but > > when you save the file? I don't see any space deletion when entering an > > empty headline, but in my config, whitespace at end of lines is deleted > > on save. In Doom Emacs this is enabled by default, and even before I wa= s > > using =3Ddelete-trailing-whitespace=3D as part of my =3Dbefore-save-hoo= k=3D. > > --Diego > > The space is deleted immediately. But the fact that it=E2=80=99s not hap= pening on > your system perhaps means that there *is* a setting that prevents it. Th= e > question is: which? > > By the way, I=E2=80=99m using the master branch from > https://code.orgmode.org/bzg/org-mode.git as installed by straight.el. > > Titus > > --0000000000002b391a05b557fbe5 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
What are RET and C-j bound to?

In my se= tup, RET is bound to =3Dorg-return=3D, which does not delete spaces, but C-= j is bound to =3Dorg-return-and-maybe-indent=3D, which does. So I have the = opposite behavior as yours.

There were some recent= changes in behavior of Org with respect to electric-indent-mode (long disc= ussion in the list), I think this might have something to do with it but di= d not follow the full discussion.

Hope this helps,=
--Diego


On Mon, Nov 30, 2020 at 7:38 PM Titu= s von der Malsburg <malsburg@poste= o.de> wrote:

On 2020-11-30 Mon 19:25, Diego Zamboni wrote:
>>
>> I=E2=80=99m aware of several workarounds and this one is perhaps t= he best.
>> However, I=E2=80=99d prefer if RET would just work as expected.=C2= =A0 Org sometimes
>> inserts extra material on RET which I think is okay (e.g. indentat= ion), but
>> is there any precedent, in Org or Emacs more broadly, for RET dele= ting
>> text?=C2=A0 It seems very counter-intuitive to me.
>>
>
>=C2=A0 Could it be that the space is being deleted not when you press R= ET but
> when you save the file? I don't see any space deletion when enteri= ng an
> empty headline, but in my config, whitespace at end of lines is delete= d
> on save. In Doom Emacs this is enabled by default, and even before I w= as
> using =3Ddelete-trailing-whitespace=3D as part of my =3Dbefore-save-ho= ok=3D.
> --Diego

The space is deleted immediately.=C2=A0 But the fact that it=E2=80=99s not = happening on your system perhaps means that there *is* a setting that preve= nts it.=C2=A0 The question is: which?

By the way, I=E2=80=99m using the master branch from https:= //code.orgmode.org/bzg/org-mode.git as installed by straight.el.

=C2=A0 Titus

--0000000000002b391a05b557fbe5--