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 ms0.migadu.com with LMTPS id 4K7dJJz9j2BHDQAAgWs5BA (envelope-from ) for ; Mon, 03 May 2021 15:41:48 +0200 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 MLmCIJz9j2DDIQAAB5/wlQ (envelope-from ) for ; Mon, 03 May 2021 13:41:48 +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 1B9ED1A72C for ; Mon, 3 May 2021 15:41:48 +0200 (CEST) Received: from localhost ([::1]:37148 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ldYpX-0006fD-6P for larch@yhetil.org; Mon, 03 May 2021 09:41:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45910) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldYoO-0006dK-G0 for emacs-orgmode@gnu.org; Mon, 03 May 2021 09:40:36 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:53071) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ldYoL-00078l-AP; Mon, 03 May 2021 09:40:35 -0400 Received: from [78.194.183.21] (port=51014 helo=guerry) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.82) (envelope-from ) id 1ldYoJ-0003x5-N8; Mon, 03 May 2021 09:40:32 -0400 Received: by guerry (Postfix, from userid 1000) id 5A2F01A60E77; Mon, 3 May 2021 15:40:29 +0200 (CEST) From: Bastien To: =?utf-8?Q?K=C3=A9vin?= Le Gouguec Subject: Re: [POLL] Setting `org-adapt-indentation' to nil by default? In-Reply-To: <871rao7zcq.fsf@gmail.com> (=?utf-8?Q?=22K=C3=A9vin?= Le Gouguec"'s message of "Mon, 03 May 2021 14:53:25 +0200") References: <878s4x3bwh.fsf@gnu.org> <87y2cwooh5.fsf@gmail.com> <87fsz4gtjs.fsf@gmail.com> <87a6pcfdh2.fsf@bzg.fr> <871rao7zcq.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Date: Mon, 03 May 2021 15:40:29 +0200 Message-ID: <87fsz4ue9e.fsf@bzg.fr> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" 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: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1620049308; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=6fcutKX/6HrqD3ipIk95H+NuYnFhLeurjiRwBpJClNA=; b=XtspaMo9+9oXS1vUyB1hjD8E6Nq1GlKR1dVii9Yvyo+g/exwul0AnKmh3KVU4/PtJZHQWT oMS9rz+yWKdpuE9ydlHfbMEaHKnVulCQt50bD9iiXsU1tiZ7C2Nhz33jNLh7xIaSDf9FC7 NwXnBZcg6JZQDajYnEjCDiB6wLvonlc/2qMYxEGNU30Q0qqYUsgdEeHRWzrLD+P64w4iw6 3r7mUEomgYTx2Eu2LVTVLDhxbmc6FY83bggwGmceYWV8KPR1AN3o3i/tzTcZaKf4Dx0tzY 07Gl6n+H8pQR+/lx760u3FHnQHMLGXVRAsaM/U6lW200z2sYRRh1ox/DYeI7FQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1620049308; a=rsa-sha256; cv=none; b=hUw8HMYoqUemYwzbXVDom+ohWozoH4brg/pExBv3/l3Ieprb54oW9CivFX6TyhPSIwrG3S JlEG++d3j+AZa/emeWZIhN3DzEaKsaphGR6014Vouht9vtIgGPHh34y4ea2dHSfD1T1Gk+ xxze2kWOm+h1c9XyxPJTGpLjhnnXImMmdUvblTfgbrrED44ab+5ZbmLcvVekxzh6LYHT5y oWEELj+tEYuyy2zjIcpgrljHQltBLbJF7pbSbCUA71P5KScYZ/eCF70WCH9dZVfz63xcTn ix0bNlpWn7swU6+8h+HXFWnZPyYSbF7mtT3vAxOlzUvAlMhPMgWFZnHQqwZ2PQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=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-Spam-Score: -1.96 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; 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: 1B9ED1A72C X-Spam-Score: -1.96 X-Migadu-Scanner: scn0.migadu.com X-TUID: Myl9V4V1gL8u --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Kevin, K=C3=A9vin Le Gouguec writes: > Great! One last snag that I can see: when inserting properties or > clocking in, the :LOGBOOK:, :PROPERTIES: and :END: lines are indented, > but the /first/ :property: or CLOCK: line remains at column 0. Er. Can you try this (hopefully last) patch and report any problem? Thanks for your patience in testing this! --=20 Bastien --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=fix-indent.patch diff --git a/lisp/org.el b/lisp/org.el index c0b5ee5ec..c20539a8a 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -18846,17 +18846,6 @@ ELEMENT." (t (goto-char start) (current-indentation)))) - ((and - (eq org-adapt-indentation 'headline-data) - (or (memq type '(planning clock node-property property-drawer drawer)) - ;; When storing a note in a LOGBOOK drawer, - ;; `org-store-log-note' needs to insert a new line before - ;; the newly inserted note, thus the `type' at point will - ;; return `paragraph' instead of the expected `drawer', so - ;; we need to manually detect the drawer. - (eq (org-element-type (car (org-element-lineage element))) 'drawer))) - (org--get-expected-indentation - (org-element-property :parent element) t)) ((memq type '(headline inlinetask nil)) (if (org-match-line "[ \t]*$") (org--get-expected-indentation element t) @@ -19000,11 +18989,12 @@ Also align node properties according to `org-property-format'." (interactive) (unless (or (org-at-heading-p) (and (eq org-adapt-indentation 'headline-data) + (not (org-at-clock-log-p)) (save-excursion (beginning-of-line 1) (skip-chars-backward "\n") (or (org-at-heading-p) - (org-at-drawer-p) + (looking-back ":END:.*") (org-at-planning-p))))) (let* ((element (save-excursion (beginning-of-line) (org-element-at-point))) (type (org-element-type element))) --=-=-=--