From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id YPBiLoCI4F9GHQAA0tVLHw (envelope-from ) for ; Mon, 21 Dec 2020 11:35:28 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id GOFAKoCI4F9JHwAAbx9fmQ (envelope-from ) for ; Mon, 21 Dec 2020 11:35:28 +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 05DC39404C8 for ; Mon, 21 Dec 2020 11:35:27 +0000 (UTC) Received: from localhost ([::1]:53334 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krJTK-00057P-72 for larch@yhetil.org; Mon, 21 Dec 2020 06:35:26 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58390) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krJSu-00057I-E5 for emacs-orgmode@gnu.org; Mon, 21 Dec 2020 06:35:00 -0500 Received: from mail-ej1-x62a.google.com ([2a00:1450:4864:20::62a]:38844) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1krJSs-0007IO-Ka; Mon, 21 Dec 2020 06:35:00 -0500 Received: by mail-ej1-x62a.google.com with SMTP id 6so12967026ejz.5; Mon, 21 Dec 2020 03:34:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=4ev8CQ5z3F/v6bvhhRm8nTEdqx0uEUNMEJvflpSkF0g=; b=PJc1PkcaVDljXiYAfcel9etokfvLr/Ldck4SUMRJCmTBizmrjtFkrvEvJ8E5ro2oQx cuB9LZ5fctpSpbFdmWToyc+UphsyYVRbqapvaglYBBV6Z3DB5amCph0YBV3kRg9OR7zF Y152JAlabG+zXF1EZehH7WgBhKg0jA1WyKg3I6TzsV7HIgUXLTZfhkzavdNTm4BQLr3B H0p1TZqgBY4iZtvoRC81/elaB1WsRGjbasesejErJovzk91iwPDk6acL7A+mUkEqAlon fSAnuDMzDmMFNDKFjwgVKKHOxMgXO3atO8Ub5wNW/YfYNDc96t7dz3eSmmHG39t7/GQx KxXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=4ev8CQ5z3F/v6bvhhRm8nTEdqx0uEUNMEJvflpSkF0g=; b=IuM+5cNEAbVHdwzHH9hp5dIgr4VdYo5mKG9rNFooDyfm7sIaxchPncdi57Bm/+3BAB Q7PI3J6szqGODGBnKiBPFOo3HaXSd3WrmF24RQXxWifodkiD0toLFna3jlX0nwDGHqep q3GmvvyD3ONPPo8DtEsbNMfhdH1gl7hBob6unw2NvxcsY9UwnxGac6fZZUvotstWjaZZ LnTueRlRn8uhhYPDNuHF1TXBV8mGFPjMn4aVlznRzdUvYIwybJU63JeUo7JnQJLzENvW nGbXYlD5ILgc3sf7HNPOtv2XQy98Y69/pD1I4glRbWuqFLiaZvP+QN8TQWsbsA7KgHEm IWAA== X-Gm-Message-State: AOAM530JM8HrMsYcysOgSm6YGzlebIR4qaMv2OwIFD7V57dsHSer/VIn lELYesk5yoDE5Y5phsDAmLhZp+SWyUf5jw== X-Google-Smtp-Source: ABdhPJyEvJg+dQqUVreDRTJhzMwGqOPV+venp41CcU+KhygNFJ909oMKNfHQKln/MbsT69MrEEKo8w== X-Received: by 2002:a17:906:134f:: with SMTP id x15mr14974819ejb.278.1608550496281; Mon, 21 Dec 2020 03:34:56 -0800 (PST) Received: from my-little-tumbleweed ([2a01:e0a:20e:d340:922b:34ff:fe95:9aed]) by smtp.gmail.com with ESMTPSA id oq27sm8780618ejb.108.2020.12.21.03.34.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 03:34:55 -0800 (PST) From: =?utf-8?Q?K=C3=A9vin_Le_Gouguec?= To: Bastien Subject: Re: did behaviour of RET change again? References: <87im8z1cxq.fsf@ucl.ac.uk> <874kkgie3e.fsf@gnu.org> Date: Mon, 21 Dec 2020 12:34:54 +0100 In-Reply-To: <874kkgie3e.fsf@gnu.org> (Bastien's message of "Sun, 20 Dec 2020 18:25:57 +0100") Message-ID: <87y2hr5r4x.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2a00:1450:4864:20::62a; envelope-from=kevin.legouguec@gmail.com; helo=mail-ej1-x62a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-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: Greg Minshall , Emacs Org mode mailing list , Eric S Fraga Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -0.22 Authentication-Results: aspmx1.migadu.com; dkim=fail (headers rsa verify failed) header.d=gmail.com header.s=20161025 header.b=PJc1Pkca; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=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: 05DC39404C8 X-Spam-Score: -0.22 X-Migadu-Scanner: scn1.migadu.com X-TUID: kIK118WxuwRp --=-=-= Content-Type: text/plain Bastien writes: > I see something wrong right now: RET after a headline should only try > to indent below the beginning of the headline with org-adapt-indentation > is t, but not nil or headline-data. > > For now, when org-adapt-indentation is headline-data, RET still indents. > > I will see how to fix this. > > Also, I'm thinking of using headline-data as the new default for the > org-adapt-indentation option. WDYT? I personally agree that headline-data makes more sense as a default given the feedback we received a few weeks ago; as you noticed though there might be a few loose ends to tie up before making the switch: - As you said, RET after a headline indents, but the common case for hitting RET after a headline is probably to write text, since IME headline drawers are always inserted with dedicated commands; thus RET should not indent after a header. - RET after a headline drawer's :END: also indents. - RET in a list item does not indent; it's not obvious that it should, but FWIW (1) RET indents when org-adapt-indentation is t (2) that would be my preference. Also, Greg Minshall (CC'ed) helpfully laid out how org-adapt-indentation and electric-indent-mode play together in one neat table: https://orgmode.org/list/2020-11-13T18-23-43@devnull.Karl-Voit.at/t/#mec37faab85f3de59e25a7c1640e5f50be5494192 I didn't take the time to properly review his findings, but there might be more inconsistencies lurking in there. Finally, not a big problem if headline-data becomes the default, but: the :safe predicate is still booleanp. Patch attached: --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-lisp-org.el-org-adapt-indentation-Mark-headline-data.patch >From fd8dab0c42d7104566437b51526b25979f1056fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Le=20Gouguec?= Date: Mon, 21 Dec 2020 12:09:56 +0100 Subject: [PATCH] * lisp/org.el (org-adapt-indentation): Mark 'headline-data as safe --- lisp/org.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org.el b/lisp/org.el index 1f7e434ce..f75745aba 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -1610,7 +1610,7 @@ time in Emacs." (const :tag "Adapt indentation for headline data lines" 'headline-data) (const :tag "Do not adapt indentation at all" nil)) - :safe #'booleanp) + :safe (lambda (x) (memq x '(t nil headline-data)))) (defvaralias 'org-special-ctrl-a 'org-special-ctrl-a/e) -- 2.29.2 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Eric S Fraga writes: > Just to say that RET seems to be working again. No idea what happened > or changed, mind you... Sorry for the noise. Glad things fell back in place somehow. The only explanation I can conjure for weird/transient/irreproducible behaviour is directory-local settings, e.g. org-mode.git's .dir-locals.el sets org-adapt-indentation to nil=E2=80=A6 but there might have been something else at work in your ca= se =F0=9F=A4=B7 --=-=-=--