From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id EC7WLHGHpmEaWwAAgWs5BA (envelope-from ) for ; Tue, 30 Nov 2021 21:20:01 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 4OhoKHGHpmENSwAAB5/wlQ (envelope-from ) for ; Tue, 30 Nov 2021 20:20:01 +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 4FF5EFAF0 for ; Tue, 30 Nov 2021 21:20:01 +0100 (CET) Received: from localhost ([::1]:35504 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ms9ba-0005bV-Uk for larch@yhetil.org; Tue, 30 Nov 2021 15:19:58 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57646) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ms9an-0005b3-Un for emacs-orgmode@gnu.org; Tue, 30 Nov 2021 15:19:09 -0500 Received: from [2a00:1450:4864:20::42b] (port=41575 helo=mail-wr1-x42b.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ms9am-00043V-Ju for emacs-orgmode@gnu.org; Tue, 30 Nov 2021 15:19:09 -0500 Received: by mail-wr1-x42b.google.com with SMTP id a9so47065353wrr.8 for ; Tue, 30 Nov 2021 12:19:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:message-id:user-agent :mime-version; bh=/tjj/Y+fBIWwO9gmwXZ8qU+b2IUpiI2brVPKdeggqiM=; b=jPqLNM1XplDvz46ZtMerGFdfitWfQl73DkuF8PSaw/nJi4jj1KWPz1xIqd0yKIiPo9 Cu0lev/DqrJb8WDZ5wAzY2oiElY4pq8fec0+/qUHm+iWhVT+B4mW8JmWbjS1Fv1spGS3 Fozig9pKAj2mNWAhivpxLkYdLTlj3u8U9xfYmvAFkuwApNM0ZPeBbJKsXv8ZqeHCpEGZ WKwNV4whGV5PhdNpJuY4YgJmlDETSCY81lYtT3Bo+2GRbbVZgJzNb6QBqdWHT+izb5Vj LUfAu2Y2gT6DrQ4C3xN05K5Lr9yfeeitDtLy0ADUWtrkpEcw//17TZ3Sh94SWrDIxtEk EQoA== 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:message-id :user-agent:mime-version; bh=/tjj/Y+fBIWwO9gmwXZ8qU+b2IUpiI2brVPKdeggqiM=; b=LiySn03/G6wQ/KtraKy2F9N1R0z5aNw8H/GtDb2xA1WwA9+cUgnkoeN7rqvEuLDfNU BGDWq2nxmjXjZTfk4PO0OCEY7CyR5WcfyzcApfSsJN3itjt2XAtl9rgFxzlHVMBVmviP zvbHEUftbILiDDd+soLyEn+b8toZjMBhsE1H2OH+FCYR59Srcz8YDxTL/U+kgEAPJqiR vFJ4UxI8xoInU4/tqk54HPq9wzXsqalzBwmkvjaJ/K55PcPhPzox+cblM/deitLy1lIA K8SkXcU5U0ejFKt2hXvWqqKEDZBL/FEM4KldPxQ/bax2QFs/+VIZlS7Ep84DPnaebtb3 wUqw== X-Gm-Message-State: AOAM532uB/sosVPVmjaU/OSWznZvWJrNAVnDVLuSyBNhhZb14OiWW5Uy xza8jjbqmvKkKhfV6E/E81I= X-Google-Smtp-Source: ABdhPJzry7qvxfLOfkb0SXxgUTBFq6qTt9PCBHoR/TzTc+YYpskY2ZnvUOHTxUe8EE88lMc4WBlcdA== X-Received: by 2002:adf:f20f:: with SMTP id p15mr1296694wro.187.1638303539583; Tue, 30 Nov 2021 12:18:59 -0800 (PST) Received: from aspire-5942 (p200300d8672e460065cf37efde51a959.dip0.t-ipconnect.de. [2003:d8:672e:4600:65cf:37ef:de51:a959]) by smtp.gmail.com with ESMTPSA id m3sm17110300wrv.95.2021.11.30.12.18.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Nov 2021 12:18:59 -0800 (PST) From: Marco Wahl To: Richard Lawrence 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> Date: Tue, 30 Nov 2021 21:18:46 +0100 Message-ID: <87h7btpfbt.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::42b (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=marcowahlsoft@gmail.com; helo=mail-wr1-x42b.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: Tim Cross , 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=1638303601; 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:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=/tjj/Y+fBIWwO9gmwXZ8qU+b2IUpiI2brVPKdeggqiM=; b=EPsiPNFoVVlmZge7HWUjHQrfKW2t7Fop4f228RTWU6EBzvcN5iF2n1lpiBmbtieQEaYP3C wZ+hldNzZR19EPmxkEkNGq4dGaFmoTbZWGUKk9isiGWY2by94gRJM4VvKQcaR6iHQUVuZl AQBMVPsQNp7nxsc36mSPIgC6bXb2b2a75bHgGzCXO/msuTmsXXKbxdqSAib6IhV47JCbZm b/h1ai10zJ0rvV/26jhJQHNRcMVka3cYa9JVsGdmNX5CSv2h92aLNaSPVakKuIzeI7RU2j 9woBMzsa/MLh+iS7i01tqtHUBRUW4pZlhN2SfRUk57GDZ36Na/6PfV3r0wO1vg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1638303601; a=rsa-sha256; cv=none; b=BGnCbwCYncv5+ZyfZIS6VpSqQx/ZVwpWP2nPf3eY1Shzt5+BXyItX9hrNVCWV0IuLX2PIX HaKcjjHHFbgDeSJrbRiSvv3qNtKdkr9oJ+g5BBwZufBrlJrO63izuAFsmMi8Ne56q3lElw 5uiDnHH/0VY8Qymg2LTojNOGVww7KtFd2fMJwYEQn1MFrEA/ndFIyKBhOEo/q/WlnY8LIP iwPUxkLX2vywCl+UziBwd/na5Z5QPlsK66GSYrQpj88CCqDDm3gId5+/epV74iWjMoA040 fDOxLVN3sByCYUeCXh4TyL9AFBset5ZjxmS6fAWSu0D+cMLESFoiVAQMr3rkBQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=jPqLNM1X; 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: -4.11 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=jPqLNM1X; 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: 4FF5EFAF0 X-Spam-Score: -4.11 X-Migadu-Scanner: scn0.migadu.com X-TUID: 2HJcix5EWdQL Hi Richard and all, [...] > Just to be extra, super sure, I built Emacs this afternoon from a > checkout of the repo, and the error is *still* there, with the same > cause. In that build, with emacs -Q, I have: > > (org-version) > "9.5" > > (emacs-version) > "GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.5, cairo version 1.16.0) > of 2021-11-30" > > At this point I've replicated the bug on my machine in four different > builds of Emacs (version 26.1 from Debian, 27.2 and "emacs-next" from > Guix, and version 29.0.50 I built myself from source) with several > versions of Org (the built-in ones in these Emacsen and a recent build > of the bugfix branch). It is robustly reproducible for me, and the cause > is clear: default-indent-new-line calls org-comment-line-break-function, > which calls > > (insert-before-markers-and-inherit nil) > > which is a type error. I'm looking for help figuring out what the right > fix is. I attach a patch for the simplest fix I can think of; please let > me know if something else would be better. 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. Ciao, -- Marco