From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id eBs6N96PVmPoIQEAbAwnHQ (envelope-from ) for ; Mon, 24 Oct 2022 15:15:10 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id D7EwN96PVmNDTwAAauVa8A (envelope-from ) for ; Mon, 24 Oct 2022 15:15:10 +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 8AD76D1B7 for ; Mon, 24 Oct 2022 15:15:10 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1omx44-0006ti-Iq; Mon, 24 Oct 2022 09:00:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1omx3l-0006kk-Q6 for emacs-orgmode@gnu.org; Mon, 24 Oct 2022 09:00:09 -0400 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1omx3f-0006qZ-KY for emacs-orgmode@gnu.org; Mon, 24 Oct 2022 09:00:03 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 147C8240104 for ; Mon, 24 Oct 2022 14:59:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1666616397; bh=k/NtGlBrm53iLnFgsQTXDf7qePjnFRPVVBqkEG7cJ+o=; h=From:To:Cc:Subject:Date:From; b=IBCTtET+gozoRCynHEmuIghPjtsx+p0+5PF3fh3EpeuODILUDbcrCLWCiecuO6YG9 jJVmSL6j8ZNRPT7djdTmi6xNpZgornDFMyNLLHSUvO62WSyBoLhmlYlx8vGxK3++jv bnggrfaRD7aQSWyExkUEvzHhho6VqF3wbpa8H0Qp+70iGW/PQD3N2F91MO+9Fn45p8 XnOwORZsrgl1Bnr1x+avOwWgz1ZsGS+6yfWxHQVrzKq+3ESOmZGwtWXl50quyKde7x ANAwHO5pJqP8TU/Y4X6nlRnUwmFKo3HeDnjcjscsGchNooT5A4lIbEuKdd/dat/xAf 1cuaoYPOdXqEg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MwwCH5lkDz6tnM; Mon, 24 Oct 2022 14:59:55 +0200 (CEST) From: Ihor Radchenko To: Ihor Radchenko Cc: Javier Olaechea , emacs-orgmode@gnu.org Subject: Re: Fix M-j with default fill-prefix value In-Reply-To: <87a6cdu2df.fsf@localhost> References: <87a6cdu2df.fsf@localhost> Date: Mon, 24 Oct 2022 13:00:38 +0000 Message-ID: <87bkq1v0jt.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, 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.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Emacs-orgmode" Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org 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=1666617310; 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=rDUG3Aay57nEweNXAZEKVR3wi5THPEJ+Cd7Janx6oPY=; b=g4vKJ3Gu1iBEz/y9RlDR0ZIxSErA+3dCme6R19ketjxFNvAvLHUB0/RUOf3dmGuz2oQBCO UdfpxM64PsOM7BH5In0O5DOXKBcZzDSYmMC6FqS0OOq1+d7kPmP38kzPitZwkNassRrp1D v4tMGZf2vjFgF7cVJKhSlAB5OSITw0X2TiDmd1eldOEjy+4HoEgRdR+xH5T1w2LxAx7iX3 Uajdl64F/Sy6DjtcnO7RQoCt42PHb+J32IwEAauZS2aL9/KkzxGyjJUH+aVjjP8eRlmPzG lKqQV0ZzPkpV7geNgWpF6xu34qvZkpXKWLYsW1rethIewRlDouUY3FHkusf4kQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1666617310; a=rsa-sha256; cv=none; b=OlUDv0SCkcECEAkeK8HSave4aua5IircBmZzEAl4KQbYjJQPEcDUQaLlkGanLTlFPxtEU8 bZ2Jts1uRWVvQ7fWm5ffOxtI6kiSmrjfy1ZgcTVNI09XqOIKuXDUq0PeaQjlmzpBiJVEUh uAtdApDxguduKvcXo7w+TbJQjmRihmhXIWuU8PZCISwQCXKWIGTbaoLvcyGMgzUPt3D68b nXyrnBqe86sLjdPgcUGI4CV3i9LJmLSuKFNX0WNQ1FyEVwFGFxbhQ1JCIiTlsMNP4qe9AQ 6DyXnoseUegcspYuwPz6keZ+jbF9oZAHLGOQTfQ4b698bg5qAO8SsJtbHfeyEA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=IBCTtET+; dmarc=pass (policy=none) header.from=posteo.net; 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: -3.70 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=IBCTtET+; dmarc=pass (policy=none) header.from=posteo.net; 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: 8AD76D1B7 X-Spam-Score: -3.70 X-Migadu-Scanner: scn0.migadu.com X-TUID: mRRSbFJkOG2E Ihor Radchenko writes: > Javier Olaechea writes: > >> org-comment-line-break-function does not handle fill-prefix being set to >> nil, which is the default value for fill-prefix. This means that pressing >> M-j inside an org-mode buffer in a vanilla installation of Emacs results in >> an error. From looking at other callers of >> insert-before-markers-and-inherit it is clear that a guard against >> fill-prefix being nil is missing. > > I guess this is fine to fix the immediate error, but I do not see much > point in the whole org-comment-line-break function. AFAIU, it does not > even recognise whether we are inside comment or not. I just tried to use > the default comment-indent-new-line and it correctly indents paragraphs > and also comments. On the other hand, it does not indent item lists and > src-blocks. > > Rather than applying this patch I would remove > org-comment-line-break-function alltogether. It will already be better > than the current state. Alternatively, it should be rewritten to take > into account current element context, similar to org-insert-comment. My guess was not correct. The issue had to be fixed by modifying org-comment-line-break-function at the end. Now, fixed on main. See https://list.orgmode.org/877d1m9343.fsf@localhost/ -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at