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 8OQqN9I1p2FpRgAAgWs5BA (envelope-from ) for ; Wed, 01 Dec 2021 09:44:02 +0100 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 iNzlMtI1p2FJSgAAB5/wlQ (envelope-from ) for ; Wed, 01 Dec 2021 08:44:02 +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 8990E37C4C for ; Wed, 1 Dec 2021 09:43:58 +0100 (CET) Received: from localhost ([::1]:48228 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1msLDZ-0005KA-Jl for larch@yhetil.org; Wed, 01 Dec 2021 03:43:57 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49618) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1msL6w-0003vi-QV for emacs-orgmode@gnu.org; Wed, 01 Dec 2021 03:37:06 -0500 Received: from [2a00:1450:4864:20::435] (port=44920 helo=mail-wr1-x435.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1msL6u-000279-J0 for emacs-orgmode@gnu.org; Wed, 01 Dec 2021 03:37:06 -0500 Received: by mail-wr1-x435.google.com with SMTP id l16so50380587wrp.11 for ; Wed, 01 Dec 2021 00:37:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=KSTrtI4LAX2DxVkbMGTMWimt8+DLuHEo6TCuu//M+o4=; b=k3PP2xV16LVKHXhbaZh3dX6JaUhpL1LLdX1auRiflusJi0sdq1zzHCA30uays7TeE+ eRq9pAdCKqfVC3HmAFdyT4biQZ226qjnWGetAl6XFy6z9P4F7NlQH9GSzfGR0baxZCcv IP9jWjR9zWYgZaJzL4f9Ye2eyEUimf8cQd2HDjvUQMapLmC4EPhzePVnJIywBWwjhlcZ XCjQ+szTQWV0kIT/3/0lt/79kMLYvXmOAB4XZg3iPz2BZIjGvHXHA8FhXthshzPqxNfU Vy5OZi1/gn5mHtyWcWciutAHRxYlOAxRS5wsOjwl6+x9wMPAMLbtR0ROj4NSFQvi/+Vx neCA== 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:references:date:in-reply-to :message-id:user-agent:mime-version; bh=KSTrtI4LAX2DxVkbMGTMWimt8+DLuHEo6TCuu//M+o4=; b=D7YJT+d2gDNSOmmhhJwn6YmKkFIN/233egbuEhJ+ybyXdpAL3f5ZieDsF/BtCGQmDf YzAQ/j9mQBwpCifqk8xESXH/ihjrAL/8N3xsGHzu3e5wrkVKwp85tOooTEw7OACwb0Rl HwSWwud/+6X2P47hfWSLlR1hIGPdLrU4BhfUJarMY0RxYg64zIb008iKvh2OHqHOZYH1 AY8Sxgr5aZMfDCTZH8o3DBKfYanlzgz/n0cXlbspoBIyKBQUf9E1e5c2FapvPLjB5vuo K4oBRFwaT+1Gi6G2nh2jKqT1S73PkMgHXfc3TlIdjXEV/t8xA3inW/69z24HTLfMA5Y3 or2g== X-Gm-Message-State: AOAM532F8nPwyQSh0vJbBgF00MhDMRFUB3CKZsXEckCzuVE1CVVIuMCY O0fIKcrrf5HMW3Zoxze9bm8= X-Google-Smtp-Source: ABdhPJxtbHYRlX0VypETI26aPEEPmh0AfugNkj19opM/zmGpR/LAsBdbfm4HzvZ6XhhZ7ZiEWSdXlA== X-Received: by 2002:adf:c446:: with SMTP id a6mr5030873wrg.456.1638347821995; Wed, 01 Dec 2021 00:37:01 -0800 (PST) Received: from aspire-5942 (p200300d8672ea80090f84ef40b251910.dip0.t-ipconnect.de. [2003:d8:672e:a800:90f8:4ef4:b25:1910]) by smtp.gmail.com with ESMTPSA id o9sm18739648wrs.4.2021.12.01.00.37.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Dec 2021 00:37:01 -0800 (PST) From: Marco Wahl To: Tim Cross Subject: Re: [PATCH] Fix org-comment-line-break-function References: <87lf18fue9.fsf@aquinas.i-did-not-set--mail-host-address--so-tickle-me> <87v90cpcdx.fsf@yandex.com> <87ilwcf31l.fsf@aquinas.i-did-not-set--mail-host-address--so-tickle-me> <87pmqjkai3.fsf@gmail.com> <87fsrffknl.fsf@aquinas.i-did-not-set--mail-host-address--so-tickle-me> <87czmijtrp.fsf@gmail.com> <87o861o9sh.fsf@aquinas.i-did-not-set--mail-host-address--so-tickle-me> <87h7btpfbt.fsf@gmail.com> <874k7tjml8.fsf@gmail.com> Date: Wed, 01 Dec 2021 09:36:47 +0100 In-Reply-To: <874k7tjml8.fsf@gmail.com> (Tim Cross's message of "Wed, 01 Dec 2021 09:06:56 +1100") Message-ID: <8735ncg1r4.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::435 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=marcowahlsoft@gmail.com; helo=mail-wr1-x435.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 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, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: , Cc: Richard Lawrence , Marco Wahl , emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1638348238; 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=KSTrtI4LAX2DxVkbMGTMWimt8+DLuHEo6TCuu//M+o4=; b=PPC/uERsXf127m+ZKWSITaxhis58eOlj9GNMVKhz3Iy32pNWaYA8FMFTCGTSTrquksE3t/ l9ImKFLptPwArQaPJ/tiAzxPqFGab9VstDNvTCEUWZwd+q1kWVaHCMTyJWX+q/uM6L2FAm 4NqV/pGcYv+WsOc2DstKVTf7nd8iQFptri2zU0anYWdVA1Ijx9LKcQf/TUw7l++dCnzPnm a+WU+1ZUzXLWpPTCfA+QQ3JQQ7VGBg5rUXntb7zfv6RNtg1fKmD7Q3QIO1Qa2b4dHV3ri9 hHSOpEcB1AcIobn7ZchS+a45T2z7hG3d6QxUyaTbvZ+0X57MCCh4xc54S35xkg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1638348238; a=rsa-sha256; cv=none; b=cLQUj8PKrzyZTJw2QVhKTWoFOI0RBhtFWV/TwQmMyUqnfdYXzBFIcoaHOgQ+xdtpvl+47k D3u4OkyKSgqDosCL0Dw50TrnhE8oc5BJ3xht777tJKSBw5jtPMdduZWKd1rUqqBACGl/Ie 4IpBVY+CiWneEu4Rpwrcdy5T68lVyXv0/tsUPlqHt4DG4lThMAXYXoEp7wb5h9vnfE+3Ov 5rVTvjUGSLFRV3tiNjQZLl4KBz+cvbDLin8qt3mwiPInv4qA2uY3WI3+jIwE0a/gG0fl4r ddFHpgF4tHQg+NXikDHca+DMvd5ioMpx4n/XLt1k8bwhUkWVlT18OEsSOAVrfQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=k3PP2xV1; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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: -1.81 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=k3PP2xV1; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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: 8990E37C4C X-Spam-Score: -1.81 X-Migadu-Scanner: scn0.migadu.com X-TUID: c9w7ceVX0Rjd Tim and all! >> diff --git a/lisp/org.el b/lisp/org.el >> index 1a1375461..fdeec0d67 100644 >> --- a/lisp/org.el >> +++ b/lisp/org.el >> @@ -19695,7 +19695,8 @@ non-nil." >> (save-excursion (forward-char -1) (delete-horizontal-space)) >> (delete-horizontal-space) >> (indent-to-left-margin) >> - (insert-before-markers-and-inherit fill-prefix)) >> + (when fill-prefix >> + (insert-before-markers-and-inherit fill-prefix))) >> >> I don't have anything better. I think this is a good patch. It makes >> M-j work again. >> >> Possible refinements and improvements can follow. >> >> +1 for applying of your patch. > > I was finally able to reproduce the error. It depends to some degree on > the text in the buffer and where the cursor is when you hit M-j. Adding > some additional text and moving the cursor to different locations > enabled me to reproduce the error and I now agree it is a bug in > org-comment-line-break-function. > > I don't know if your patch is the right fix or not because I don't > understand what the purpose of insert-before-marks-and-inherit is - in > fact, the doc string for that function doesn't even state what the @rest > args argument is for, so I don't understand why it is passing in > fill-prefix. For example, is it safe to assume > insert-before-merks-and-inherit does not need to be called if > fill-prefix is nil? Why is that function even called with the > fill-prefix as an argument? Thanks for staying critical! I can't answer your questions. I agree that we should deepen the understanding. Your questions are a start. Pragmatically I still vote for applying the patch immediately since it is a step in the right direction AFAICS. Ciao, -- Marco