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 ms11 with LMTPS id tIZXHojnrl6dLgAA0tVLHw (envelope-from ) for ; Sun, 03 May 2020 15:47:20 +0000 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 0DbFC5Lnrl7HNwAAB5/wlQ (envelope-from ) for ; Sun, 03 May 2020 15:47:30 +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 3BC6F941D0D for ; Sun, 3 May 2020 15:47:29 +0000 (UTC) Received: from localhost ([::1]:39386 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVGpz-00034r-V1 for larch@yhetil.org; Sun, 03 May 2020 11:47:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60648) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVGpd-00034h-JV for emacs-orgmode@gnu.org; Sun, 03 May 2020 11:47:05 -0400 Received: from mout01.posteo.de ([185.67.36.141]:52837) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVGpc-0003IP-BX for emacs-orgmode@gnu.org; Sun, 03 May 2020 11:47:05 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 0951D160062 for ; Sun, 3 May 2020 17:47:00 +0200 (CEST) Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 49FVjH6w16z6tmB for ; Sun, 3 May 2020 17:46:59 +0200 (CEST) User-agent: mu4e 1.4.3; emacs 26.3 X-Mailer: mu4e 1.4.3; emacs 26.3 From: =?utf-8?Q?=C3=89tienne?= Deparis To: emacs-orgmode@gnu.org 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> <87lfma5jj4.fsf@nicolasgoaziou.fr> In-reply-to: <87lfma5jj4.fsf@nicolasgoaziou.fr> Date: Sun, 03 May 2020 17:47:12 +0200 Message-ID: <87a72powan.fsf@depar.is> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.67.36.141; envelope-from=etienne@depar.is; helo=mout01.posteo.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/03 11:47:01 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: , Reply-To: etienne@depar.is Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 X-Spam-Score: -0.39 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 [-0.39 / 13.00]; HAS_REPLYTO(0.00)[etienne@depar.is]; RCVD_VIA_SMTP_AUTH(0.00)[]; GENERIC_REPUTATION(0.00)[-0.49376644788707]; DWL_DNSWL_FAIL(0.00)[2001:470:142::17:server fail]; R_SPF_ALLOW(-0.20)[+ip6:2001:470:142::/48:c]; IP_REPUTATION_HAM(0.00)[asn: 22989(0.14), country: US(-0.00), ip: 2001:470:142::17(-0.49)]; REPLYTO_ADDR_EQ_FROM(0.00)[]; TO_DN_NONE(0.00)[]; MX_GOOD(-0.50)[cached: eggs.gnu.org]; MAILLIST(-0.20)[mailman]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; RCVD_IN_DNSWL_FAIL(0.00)[2001:470:142::17:server fail]; MIME_TRACE(0.00)[0:+]; R_MIXED_CHARSET(0.63)[subject]; ASN(0.00)[asn:22989, ipnet:2001:470:142::/48, country:US]; R_DKIM_NA(0.00)[]; TAGGED_FROM(0.00)[larch=yhetil.org]; ARC_NA(0.00)[]; RCVD_COUNT_FIVE(0.00)[6]; FROM_NEQ_ENVFROM(0.00)[etienne@depar.is,emacs-orgmode-bounces@gnu.org]; FROM_HAS_DN(0.00)[]; URIBL_BLOCKED(0.00)[nicolasgoaziou.fr:email,depar.is:email,emacswiki.org:url]; MID_RHS_MATCH_FROM(0.00)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[emacs-orgmode@gnu.org]; DMARC_NA(0.00)[depar.is]; HAS_LIST_UNSUB(-0.01)[]; RCPT_COUNT_ONE(0.00)[1]; RCVD_TLS_LAST(0.00)[]; FORGED_SENDER_MAILLIST(0.00)[] X-TUID: yTcumF2AHT6w Hello, sam. 02 mai 2020 =C3=A0 19:33, mail@nicolasgoaziou.fr a =C3=A9crit=C2=A0: > [...] > >> 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 explanati= on >> of: =C2=AB If you would like to enable auto fill for all major modes, yo= u can >> add this single line to your configuration =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? I must admit I have absolutely no reason to do so. I don't even remember when this line appear in my config file. At the time, I think I wished to have auto-fill-mode in all buffer and blindly copy-paste this code without thinking about it. > > 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))) Yes, I agree you, with my today's Emacs knowledge it makes more sense. I'll switch to that, or maybe completely remove it and see, mode per mode, when I really need it. > > 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'. With your explanations, I agree this fix proposal doesn't make sense, and I understand and I agree the error expectation Thank you Nicolas and Tim for your clarification. In the next day I'll see to amend the EmacsWiki to note that this tip is outdated or dangerous. Enjoy your evening, =C3=89tienne > > WDYT? > > Regards, -- =C3=89tienne Deparis https://etienne.depar.is/ xmpp: etienne@depar.is