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 MBOHCOemrV7FTgAA0tVLHw (envelope-from ) for ; Sat, 02 May 2020 16:59:19 +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 uEVyHPCmrV6aTgAAB5/wlQ (envelope-from ) for ; Sat, 02 May 2020 16:59:28 +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 AABD8940B36 for ; Sat, 2 May 2020 16:59:27 +0000 (UTC) Received: from localhost ([::1]:42476 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jUvU7-0006xT-VV for larch@yhetil.org; Sat, 02 May 2020 12:59:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57142) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jUvTi-0006uF-Ft for emacs-orgmode@gnu.org; Sat, 02 May 2020 12:59:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jUvTh-0006dL-CA for emacs-orgmode@gnu.org; Sat, 02 May 2020 12:59:02 -0400 Received: from mout02.posteo.de ([185.67.36.142]:54759) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jUvTg-0006YY-Sm for emacs-orgmode@gnu.org; Sat, 02 May 2020 12:59:01 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id CA2D82400FC for ; Sat, 2 May 2020 18:58:56 +0200 (CEST) Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 49DwLm1gKBz9rxk for ; Sat, 2 May 2020 18:58:55 +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: [O] error message at line break References: <87fvt3sf00.fsf@bye.fritz.box> Date: Sat, 02 May 2020 18:58:54 +0200 Message-ID: <871ro2w9wx.fsf@piccolo.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.67.36.142; envelope-from=etienne@depar.is; helo=mout02.posteo.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/02 12:58:57 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Received-From: 185.67.36.142 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.45 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.45 / 13.00]; HAS_REPLYTO(0.00)[etienne@depar.is]; GENERIC_REPUTATION(0.00)[-0.4951288225337]; RCVD_VIA_SMTP_AUTH(0.00)[]; DWL_DNSWL_BLOCKED(0.00)[2001:470:142::17:from]; 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)]; 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.56)[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)[]; FROM_NEQ_ENVFROM(0.00)[etienne@depar.is,emacs-orgmode-bounces@gnu.org]; FROM_HAS_DN(0.00)[]; URIBL_BLOCKED(0.00)[emacswiki.org:url]; 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)[]; RCVD_COUNT_SEVEN(0.00)[7]; FORGED_SENDER_MAILLIST(0.00)[] X-TUID: PC+Nla4na/Ll Hello, I allow myself to revive an old thread, as I encounter today the exact same problem: Emacs crash in org mode at line ending with the following backtrace: Debugger entered--Lisp error: (wrong-type-argument char-or-string-p nil) insert-before-markers-and-inherit(nil) org-comment-line-break-function(t) default-indent-new-line(t) do-auto-fill() internal-auto-fill() self-insert-command(1) org-self-insert-command(1) funcall-interactively(org-self-insert-command 1) call-interactively(org-self-insert-command nil nil) command-execute(org-self-insert-command) 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 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)) But I must admit I don't know all the implications of such a change. In my case, it does the job perfectly well, but maybe I miss something? I run make test and every thing goes fine too. I would like to suggest to fix the method `org-comment-line-break-function', in order to support user change of the variable auto-fill-function, as it seems to be a common thing. What do you think? Have a good week-end, =C3=89tienne >henry atting writes: > >> Nicolas Goaziou writes: >> >>> Hello, >>> >>> henry atting writes: >>> >>>> Okay, say I have an org file with two lines in it (fill-column is set = to >>>> 70). Here you go: >>>> >>>> >>>> Jemand mu=C3=9Fte Josef K. verleumdet haben, denn ohne da=C3=9F er etw= as Boeses >>>> getan haette, wurde er eines Morgens verhaftet. Die Koechin der Frau >>>> >>>> >>>> Then you go on with the text, which is: >>>> >>>> Grubach, seiner Zimmervermieterin, die ihm jeden Tag gegen acht Uhr fr= ueh >>>> das Fruehstueck brachte,... >>>> >>>> At each automatic line skip I get the mentioned error message. But if >>>> you indent these two lines one space everything works fine. >>> >>> Strange, I still cannot reproduce it. >>> >> Strange, in deed. I can reproduce it even this way: >> >> 1. Start emacs with `emacs -Q' >> 2. Add my org directory to the load path >> 3. Load org-mode >> 4. Then type the above quoted beginning of Kafka's Prozess >> > >Finally... the culprit was: > >(setq-default auto-fill-function 'do-auto-fill) > >A very old setting in my ~/.emacs. Now that I start auto-fill with the >appropriate hook everythings works fine. > >henry