From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id qPcnH9iDpWE2TgEAgWs5BA (envelope-from ) for ; Tue, 30 Nov 2021 02:52:24 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id eGrGGtiDpWEqSQAAbx9fmQ (envelope-from ) for ; Tue, 30 Nov 2021 01:52:24 +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 01A3814AAA for ; Tue, 30 Nov 2021 02:52:24 +0100 (CET) Received: from localhost ([::1]:51840 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mrsJj-0006NJ-43 for larch@yhetil.org; Mon, 29 Nov 2021 20:52:23 -0500 Received: from eggs.gnu.org ([209.51.188.92]:38566) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mrsJ2-0006N4-QF for emacs-orgmode@gnu.org; Mon, 29 Nov 2021 20:51:40 -0500 Received: from [2607:f8b0:4864:20::434] (port=42519 helo=mail-pf1-x434.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mrsIx-00060P-Fh for emacs-orgmode@gnu.org; Mon, 29 Nov 2021 20:51:40 -0500 Received: by mail-pf1-x434.google.com with SMTP id u80so18885775pfc.9 for ; Mon, 29 Nov 2021 17:51:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=references:user-agent:from:to:cc:subject:date:in-reply-to :message-id:mime-version:content-transfer-encoding; bh=hMyW8+/j2fDLUvr+60rxyxxN4Q6KorZ6AaMQ8emZMUU=; b=AgLjHVZD5iq3S3MJIXZjO1u/q2McukPShM0ji4b2rY77qcn8RD1EXsZ4bywPPps266 T6lQ/lLEDg8Qz49pYljRLYPuYLgwSxwdq5zpOQliE0psK3gKuUIpnfXYUMbAMx1r+98s 9skEDOH/TKrllIEnv8HFSMQu3M8+VE9+2+UhQNDZ1fkBw/sWYiFkUyx8Fdgfcz8/G/OU qNzx57GmP6aJLGI4dPOYmWYUnXEpypkS4fCeh+prK9/CzHPx9pGU8OSfJuqIN+NRmdId CkBNruGdetTLSUBu9QvkRBxtAvU513tjRiwNeVsSQ74ai8ZDjutYHJjHfuae16DwqpzT Z9ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:references:user-agent:from:to:cc:subject:date :in-reply-to:message-id:mime-version:content-transfer-encoding; bh=hMyW8+/j2fDLUvr+60rxyxxN4Q6KorZ6AaMQ8emZMUU=; b=NHMxy49HSVcDn0/nMmPTDrumoUg5H6VZvS3Qk+nRonxStn7wk4SUlOJBDDp2SslB/P PAmEd0uggvaVZxIBW2sb8GGXb1bBQM5Hpw3CRMZVmMmXZObrfaxHQitMKHgVbx3QDwzh qaOIg5ZoCZRaY3L2eXYcOhdFVNC3+Q1ujJX6oOJXiLY1m+MnGpjB70p49tNmMZZSUjEW 8VBaSOB+kEZgrkjNWokhmKU3XA9Wk6Og50smr3g11hlqq3OvoB+rf1A10GEOsEIqcqrY DG9Mau5lCmFoOVSx9DgEoaTCH01j8W3Q90vKFKYV3m0uSzsK1kLNJVQlz2mwLzCcunzN gdUw== X-Gm-Message-State: AOAM533RTFm3Lvdttw/+tx0b43q2OaVCi9rq7SUW6efDRqdjmP0PDCPk QFWlkiIinGvyguhbXNFO2BrG6yjZzeM= X-Google-Smtp-Source: ABdhPJwZRpfZXlyXRStr66ogtswkbW3ZFWLzZmsKmRiP7rvQBDDBSc1XEHMZjFFmddtZI8to9GLqVA== X-Received: by 2002:a63:91ca:: with SMTP id l193mr24519867pge.488.1638237079987; Mon, 29 Nov 2021 17:51:19 -0800 (PST) Received: from dingbat (2001-44b8-31f2-bb00-e8ca-8918-9bbb-dabb.static.ipv6.internode.on.net. [2001:44b8:31f2:bb00:e8ca:8918:9bbb:dabb]) by smtp.gmail.com with ESMTPSA id oj11sm548566pjb.46.2021.11.29.17.51.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Nov 2021 17:51:19 -0800 (PST) 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> User-agent: mu4e 1.7.5; emacs 28.0.60 From: Tim Cross To: Richard Lawrence Subject: Re: Is M-j broken for you in Org on Emacs 27 and 28? Date: Tue, 30 Nov 2021 12:10:22 +1100 In-reply-to: <87fsrffknl.fsf@aquinas.i-did-not-set--mail-host-address--so-tickle-me> Message-ID: <87czmijtrp.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::434 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::434; envelope-from=theophilusx@gmail.com; helo=mail-pf1-x434.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: 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=1638237144; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=hMyW8+/j2fDLUvr+60rxyxxN4Q6KorZ6AaMQ8emZMUU=; b=Ho4THU7MLYH0xoeWdmb4WDFyt/XVNNzLaBsUWHJg/KCsdaL6u/vULF6/M8Co5ueRzS3Fyb FwBWnlzPKpHib4q+/pzpiQtT7JrENJEfDEex90Ug1RdeZZMaC9dHDyP7FiGXWY0/ljsid1 T/LNu+IiOLrwaHhb+bE6j06xjPaTHZxKv2ow0687JoeAh+SaNWaM85oUsh6PJWduWAN868 ibygMoLJ1etePjAWX6/oBCZg845gEBVxK5k5kNyZMBM0qPePCZ4ZbIV9blknMErvb2RRO4 OafhxeIsBQiYtZYZp9s2ZaxscAdHx+6RW1veI7voJanLdEdYiwyzauUG37Bi4w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1638237144; a=rsa-sha256; cv=none; b=G5Wg71smz8V5RXqXpu4O44XAyQOIHh5Sewnw9jMGYysvLrjK6qtpGVeWNSGN7JlbKOGoDl vcmcMNrnZ0JU+aVYrcAQk1FRI/0hLFPeBlD+WLi5wDpnOv/ga+yyhUQW+M93u0f2amnOAu DXr6+UFo7pAyfy9LH8tmU/GFPF/ZDkE/MRyrVTy5WmttEigZt98ODtSs7Chk667+Tvdpok VN8GF/BQICz1bWkCEc8LkybGesCirnzRFeaN690CXWrHBzrMEklboh6mFOFq77iV7X2POy E6AiVcYavuIwCmulkoRcu/rXpgZK3/8hhyzpNYasrtcUaQEEDRwxbL0E+b9riw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=AgLjHVZD; 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: -3.11 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=AgLjHVZD; 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: 01A3814AAA X-Spam-Score: -3.11 X-Migadu-Scanner: scn0.migadu.com X-TUID: F8k+rJzoreAC Richard Lawrence writes: > Tim Cross writes: > >> I'm running Emacs 28 and cannot reproduce the issue you observe. > > Hmm, the plot thickens! > >> Running emacs -Q I find M-j is bound to >> >> M-j runs the command default-indent-new-line (found in global-map), >> which is an interactive compiled Lisp function in =E2=80=98simple.el=E2= =80=99. > > I definitely see the error in emacs -Q with > > GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, ca= iro version 1.16.0) o> > which only contains Org 9.3, in my installation. So the problem has been > around at least that long, but only surfaced for me because the binding > of M-j changed between Emacs 26 and 27. > >> This binding is the same inside and outside of org mode. > > Yes, but inside Org mode, default-indent-new-line calls > org-comment-line-break-function (because it is the value of > comment-line-break-function), which is where the error originates. > > The last line of org-comment-line-break-function is: > > (insert-before-markers-and-inherit fill-prefix) > > and fill-prefix is nil, at least in all the contexts where I've tried > this. > > Since you're not seeing the error, could you please check in an Org > buffer whether: > > - comment-line-break-function is 'org-comment-line-break-function > - org-comment-line-break-function contains the line above (it should; > it's still there in the master branch) > - fill-prefix is nil when you type M-j? >=20=20=20 I just checked this when running emacs -Q and get the following comment-line-break-function is a variable defined in =E2=80=98simple.el=E2= =80=99. Its value is =E2=80=98org-comment-line-break-function=E2=80=99 Local in buffer test.org; global value is=20 comment-indent-new-line Mode-specific function that line breaks and continues a comment. This function is called during auto-filling when a comment syntax is defined. The function should take a single optional argument, which is a flag indicating whether it should use soft newlines. This variable may be risky if used as a file-local variable. and fill-prefix is fill-prefix is a variable defined in =E2=80=98simple.el=E2=80=99. Its value is nil String for filling to insert at front of new line, or nil for none. Automatically becomes buffer-local when set. This variable is safe as a file local variable if its value satisfies the predicate =E2=80=98string-or-null-p=E2=80=99. You can customize this variable. Probably introduced at or before Emacs version 1.7. and I don't get any error with M-j and cannot reproduce the issue you are encountering. . Emacs is GNU Emacs 28.0.60 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.30, cairo version 1.16.0) of 2021-11-30 and org version is Org mode version 9.5.1 (release_9.5.1-11-g96d91b @ /usr/local/share/emacs/28.0.60/lisp/org/) Looking at the git log, I can only find these messages relating to default-indent-new-line commit b41f31d2b60269bd0e7addd1081f3738f91e76bc Author: Lars Ingebrigtsen Date: Wed Aug 4 10:03:12 2021 +0200 Make `M-j' work reliably if `comment-auto-fill-only-comments' is set =20=20=20=20 * lisp/simple.el (default-indent-new-line): Force breaking the line when called interactively (bug#49849). (Perhaps the interactive command should be rebound and call this function instead...) commit 8a11e430ec261c08cc928a7a5b05ee1027f50368 Author: Dmitry Gutov Date: Thu Jun 27 16:57:47 2019 +0200 Use `default-indent-new-line' instead of `indent-new-comment-line' =20=20=20=20 * lisp/simple.el (default-indent-new-line): Doc string fix. =20=20=20=20 * lisp/textmodes/refill.el (refill-post-command-function): Make default-indent-new-line work as indent-new-comment-line. =20=20=20=20 * lisp/textmodes/refill.el (refill-post-command-function): Bind `M-C-j' and `M-j' to default-indent-new-line instead of indent-new-comment-line to allow overriding via `comment-line-break-function' (bug#12413). commit 0b727f9d087d950c0d6614c9ec743a935d4e5fc7 Author: Richard M. Stallman Date: Tue Aug 7 03:04:23 2007 +0000 (default-indent-new-line): New function. It calls comment-line-break-function if there are comments. (do-auto-fill): Use that. which indicates the function was added in 2007 by RMS and made the default for M-j in 2019.=20 Based on your report of having org 9.3, my suspicion is that your org version is too old for the current Emacs versions (since the change in 2019 to use default-indent-new-line for C-M-j and M-j. I don't think this is a bug in current Org or Emacs. The other possibility is that you have a broken "mixed" installation of org. This can easily occur if org is upgraded when it has already been loaded into the Emacs instance when the upgrade is performed. It is critically important to ensure Org has not been loaded before attempting to do an upgrade. Unfortunately, it is very easy to not realise that something in your init file is loading org. One of the advantages of using use-package is that you can configure things so that org is not loaded until you actually open an org file, which makes it easier to start a new Emacs instance and perform the upgrade in a clean environment. Where people often come undone is when some other package they are using loads org because of an internal dependency.=20