From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id +K59JgKvrV4hOwAA0tVLHw (envelope-from ) for ; Sat, 02 May 2020 17:33:54 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id uKDwAQ2vrV4ZeQAAbx9fmQ (envelope-from ) for ; Sat, 02 May 2020 17:34:05 +0000 Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:470:142::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 49C8C94230E for ; Sat, 2 May 2020 17:34:01 +0000 (UTC) Received: from localhost ([::1]:47378 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jUw1X-0003BU-Pb for larch@yhetil.org; Sat, 02 May 2020 13:33:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41536) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jUw16-00039b-De for emacs-orgmode@gnu.org; Sat, 02 May 2020 13:33:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jUw15-0001Hp-0G for emacs-orgmode@gnu.org; Sat, 02 May 2020 13:33:31 -0400 Received: from relay7-d.mail.gandi.net ([217.70.183.200]:45553) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jUw14-0001Em-Bk for emacs-orgmode@gnu.org; Sat, 02 May 2020 13:33:30 -0400 X-Originating-IP: 185.131.40.67 Received: from localhost (40-67.ipv4.commingeshautdebit.fr [185.131.40.67]) (Authenticated sender: admin@nicolasgoaziou.fr) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id 9533720008; Sat, 2 May 2020 17:33:21 +0000 (UTC) From: Nicolas Goaziou To: =?utf-8?Q?=C3=89tienne?= Deparis Subject: Re: error message at line break References: <87fvt3sf00.fsf@bye.fritz.box> <871ro2w9wx.fsf@piccolo.i-did-not-set--mail-host-address--so-tickle-me> Mail-Followup-To: =?utf-8?Q?=C3=89tienne?= Deparis , emacs-orgmode@gnu.org Date: Sat, 02 May 2020 19:33:19 +0200 In-Reply-To: <871ro2w9wx.fsf@piccolo.i-did-not-set--mail-host-address--so-tickle-me> (=?utf-8?Q?=22=C3=89tienne?= Deparis"'s message of "Sat, 02 May 2020 18:58:54 +0200") Message-ID: <87lfma5jj4.fsf@nicolasgoaziou.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=217.70.183.200; envelope-from=mail@nicolasgoaziou.fr; helo=relay7-d.mail.gandi.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/02 13:33:26 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Received-From: 217.70.183.200 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-Scanner: scn0 X-Spam-Score: -1.01 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 2001:470:142::17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Scan-Result: default: False [-1.01 / 13.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; GENERIC_REPUTATION(0.00)[-0.49514091894592]; HAS_XOIP(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2001:470:142::/48:c]; IP_REPUTATION_HAM(0.00)[asn: 22989(0.15), country: US(-0.00), ip: 2001:470:142::17(-0.50)]; DWL_DNSWL_BLOCKED(0.00)[2001:470:142::17:from]; MX_GOOD(-0.50)[cached: eggs.gnu.org]; RCPT_COUNT_TWO(0.00)[2]; MAILLIST(-0.20)[mailman]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; RCVD_IN_DNSWL_FAIL(0.00)[2001:470:142::17:server fail]; RCVD_TLS_LAST(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:22989, ipnet:2001:470:142::/48, country:US]; MID_RHS_MATCH_FROM(0.00)[]; TAGGED_FROM(0.00)[larch=yhetil.org]; ARC_NA(0.00)[]; RCVD_COUNT_FIVE(0.00)[6]; FROM_NEQ_ENVFROM(0.00)[mail@nicolasgoaziou.fr,emacs-orgmode-bounces@gnu.org]; FROM_HAS_DN(0.00)[]; URIBL_BLOCKED(0.00)[depar.is:email,emacswiki.org:url]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; DMARC_NA(0.00)[nicolasgoaziou.fr]; HAS_LIST_UNSUB(-0.01)[]; FORGED_SENDER_MAILLIST(0.00)[] X-TUID: bzBzwpDYnf7x Hello, =C3=89tienne Deparis writes: > Debugger entered--Lisp error: (wrong-type-argument char-or-string-p nil) > insert-before-markers-and-inherit(nil) > org-comment-line-break-function(t) [...] > I confirm that I've the same variable set in my Emacs config file: > > (setq-default auto-fill-function 'do-auto-fill) > > Which I take from the Emacs Wiki AutoFill page=C2=B9, with the explanation > of: =C2=AB=C2=A0If you would like to enable auto fill for all major modes= , you can > add this single line to your configuration=C2=A0=C2=BB. > > =C2=B9 https://www.emacswiki.org/emacs/AutoFillMode This is a very bad (outdated ?) advice! With this, you force `do-auto-fill' function in every major mode, even if that function doesn't have a clue about what the major mode is about. Also this prevents the major mode from setting its own filling. Do you have any reason to do this? A correct way to activate auto fill in all text-based modes (including Org), is, for example, (add-hook 'text-mode-hook (lambda () (auto-fill-mode 1))) See (info "(emacs)Auto Fill") for more information. > To fix this, I simply replace the last line of > `org-comment-line-break-function' (in ./lisp/org.el, line 19723) from: > > (insert-before-markers-and-inherit fill-prefix) > > To > > (when fill-prefix > (insert-before-markers-and-inherit fill-prefix)) Well, the fix is cheap, sure, but, OTOH, the error is to be expected, since you force Org to use a function which is not adequate. I'm not sure we should paper over this kind of misuse of `auto-fill-function'. WDYT? Regards, --=20 Nicolas Goaziou