From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id cDfcEi6y4GJ/OwEAbAwnHQ (envelope-from ) for ; Wed, 27 Jul 2022 05:34:06 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id mDfNEi6y4GLsRwAA9RJhRA (envelope-from ) for ; Wed, 27 Jul 2022 05:34:06 +0200 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 D35576FAE for ; Wed, 27 Jul 2022 05:34:05 +0200 (CEST) Received: from localhost ([::1]:48344 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oGXoC-0003L0-VU for larch@yhetil.org; Tue, 26 Jul 2022 23:34:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41472) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oGXls-0001TB-Kc for emacs-orgmode@gnu.org; Tue, 26 Jul 2022 23:31:40 -0400 Received: from mail-pj1-x1031.google.com ([2607:f8b0:4864:20::1031]:37462) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oGXlq-0004WN-V4 for emacs-orgmode@gnu.org; Tue, 26 Jul 2022 23:31:40 -0400 Received: by mail-pj1-x1031.google.com with SMTP id v16-20020a17090abb9000b001f25244c65dso870306pjr.2 for ; Tue, 26 Jul 2022 20:31:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=MX4cciqQvXWrw9n0AEDoFxelO5QX7qG7ozTJk+tdPx4=; b=YBfnzmIizkf9xT2NosY/ng54nQ/BcwsL+NGXowAETKyBsBKXQkkolUaeJI8y7/7cjI bLcaZE2/jlVsB0ZTshW2BSz1exoGEG2B9br0BywuEuDi35+sDRvO4DCkaAVvonjGVDPC qub6cu4d9mgcYc/WmNpTs/I6FO/SQfft7s9O9w6DMo1/953sT57rZSLV4/E09EECnB2j AgHjVYfJTF9lCIJQbRa9xpaW+6Odh2zk+T9TgB+LyJUKvogN9tKQ6PvyGBqO1PFVL3wd YU9hQTUh2yVJ7ZWsr4jdfwANu9K0vG7YuSoO8orP+uk7h55AcAon7eukT5MOq9Kp3dLT w0GQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=MX4cciqQvXWrw9n0AEDoFxelO5QX7qG7ozTJk+tdPx4=; b=Wdg0KCLLXWVI2kDsnLB9BmN5kQpUhR22CNofc+Ap76ntEqrVXC4QSohGnBxd/1kKG9 jUbR62Husr8TfpTdSWNR77q33RWOhWNFWjwPRW1CwEAG8iRwVz+ef0lo67ovS43Qz6NI qkJGS7AMrITKvJ7iqzeskmTWMighV9LTt2tOBZSqVJQ1eZ+HilXnXQNpDnDx2S+RHStw CUEGmsZV3MmggVYqPZhi4pFDOnOpjSS5kvgZwBwjQ0MGhs5liQXbnO1dqEke+b1uimkO Aet3zIe/ytAYdaW4zhPgGLi2i9A+M/HJ7CGrOKNJU9oRL94WnT6fOloxsuKOD4FkbEks XOfA== X-Gm-Message-State: AJIora/EjgOntYhpq1hdO1SJ7F5+YVsbRDjFFUTVHUp+lJm1OsUumAxG ilbP78nl2mjuYsqzQ5hlr2EzTlsOv98= X-Google-Smtp-Source: AGRyM1tgw2jfIvSAGtX46cBpu8aKlCdNwJ/aIRNXjNZ5oaNNWh9rmgV2mPrgGvclIidDmBNgoglxZw== X-Received: by 2002:a17:90a:4a04:b0:1f2:583c:3de5 with SMTP id e4-20020a17090a4a0400b001f2583c3de5mr2304793pjh.67.1658892697692; Tue, 26 Jul 2022 20:31:37 -0700 (PDT) Received: from localhost ([115.154.175.57]) by smtp.gmail.com with ESMTPSA id k18-20020a628412000000b0052ba5ebfe30sm12757087pfd.99.2022.07.26.20.31.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Jul 2022 20:31:36 -0700 (PDT) From: Ihor Radchenko To: Tor Kringeland Cc: "emacs-orgmode@gnu.org" Subject: [PATCH] * lisp/org.el (org-store-log-note): Do not indent empty lines In-Reply-To: References: Date: Wed, 27 Jul 2022 11:32:41 +0800 Message-ID: <87czdrb57q.fsf@localhost> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2607:f8b0:4864:20::1031; envelope-from=yantar92@gmail.com; helo=mail-pj1-x1031.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, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1658892845; 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:dkim-signature; bh=MX4cciqQvXWrw9n0AEDoFxelO5QX7qG7ozTJk+tdPx4=; b=FKjXoVITpaMHfRl4PdO7bmOlCmzYaja9W8igOhSR/9kvUgDx5m4BMflSK5bn5x+P4urauu Ey9egcJ3pFJLY2/afgywga9vHXNuYwK4Gt0C7DhfdsOzPYnnMoPatBnDmXyLBG0NWOk+Rp GHDUkFU3KzavHiJEYo4NXIlDgIMTYRnisKvrAFs6Upd3Cea++wELE0pDoy57N4anes8IH5 Tq3PvhPCn516Vvcdz4hfY1Cr2yji3ma5fMGRslCy2iz8510Z4Ug83DUZGxX5EFRMneWEvS DR3xGaI9yJLxDbptAE0i4ngeACQEIYCyo4Hv/P05LBgjZff+qyEzNMGmsNAVIg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1658892845; a=rsa-sha256; cv=none; b=jZypji0KmKfh2fEgcxZRe4FUzus7fb8TgGbNzli0HDHdIdhqh3Hq9GmjZYTZEhA2lCXFr8 8+BwJyRkVmrJyBwPOmjJLD9MhJNu8PKVJWbxNMUyU0pKV0vl7uhi5gCym4uO0z7BntL410 Ufo4WJu9JsxU2C9Or1BO6iP3MyFhz661OUoYog8GY3r9anmuleMy9JpgW/IF3QBh1oj3fX eShW0VeRZrW7hwzLZRdTDmb/2cwhWL5grDC6GPeJmr3BFwnf6R7QxHhOHfAredwDIJ/fse V/mkvHS+npWIyt8REXS9KiUQukO9NNs/nKZz9GL4E2gwvwufwjRO0EZanLmCuw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=YBfnzmIi; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -6.93 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=YBfnzmIi; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: D35576FAE X-Spam-Score: -6.93 X-Migadu-Scanner: scn0.migadu.com X-TUID: mupqFK0Oi+fY --=-=-= Content-Type: text/plain Tor Kringeland writes: > Currently if you insert a note on a heading that has double newlines in > it, the empty newlines will be padded with spaces. For example > > #+begin_example > * heading > - Note taken on [2022-07-26 Tue 16:00] \\ > note with > > newlines it in > #+end_example > > It would be nice to (if this is not considered a bug) to have an option > which would not insert these unecessary spaces when adding notes See the attached patch. Best, Ihor --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-lisp-org.el-org-store-log-note-Do-not-indent-empty-l.patch >From 49b1092d7f82354390304dcc40e72cea73618956 Mon Sep 17 00:00:00 2001 Message-Id: <49b1092d7f82354390304dcc40e72cea73618956.1658892670.git.yantar92@gmail.com> From: Ihor Radchenko Date: Wed, 27 Jul 2022 11:30:19 +0800 Subject: [PATCH] * lisp/org.el (org-store-log-note): Do not indent empty lines in notes See https://orgmode.org/list/m235eo9d8b.fsf@ntnu.no --- lisp/org.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index ca0b12550..6817e44c1 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -10397,8 +10397,9 @@ (defun org-store-log-note () (let ((ind (org-list-item-body-column (line-beginning-position)))) (dolist (line lines) (insert-and-inherit "\n") - (indent-line-to ind) - (insert-and-inherit line))) + (unless (string-empty-p line) + (indent-line-to ind) + (insert-and-inherit line)))) (message "Note stored") (org-back-to-heading t)))))) ;; Don't add undo information when called from `org-agenda-todo'. -- 2.35.1 --=-=-=--