[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Fix org-comment-line-break-function
From: |
Tim Cross |
Subject: |
Re: [PATCH] Fix org-comment-line-break-function |
Date: |
Wed, 01 Dec 2021 17:17:09 +1100 |
User-agent: |
mu4e 1.7.5; emacs 28.0.60 |
Kaushal Modi <kaushal.modi@gmail.com> writes:
> On Tue, Nov 30, 2021 at 6:29 PM Tim Cross <theophilusx@gmail.com> wrote:
>
> It would be good to get Nicholas' input here as I think he wrote the
> original function back in 2012.
>
> Just to see what happens, I tried this:
>
> M-: (setq-local comment-line-break-function #'comment-indent-new-line)
>
> .. and then M-j started working perfectly! It worked fine both: in Org
> comment lines and out of comment lines.
>
> I see that comment-indent-new-line was added to emacs in newcomment.el back
> in 2000. So I don't know why
> org-comment-line-break-function was added. May be Nicolas can comment more on
> that.
>
> So would this patch work?
>
Well, that is the big question - why was org-comment-line-break-function
added instead of just using the default comment-indent-new-line? My
only thoughts are there must be some subtle difference in org which the
default function was not sophisticated enough to work with. Problem is,
not knowing what that might be makes it hard to test and verify the real
impact of making the change.
Until this is determined, I think the only 'safe' approach would be to
just advise those who are impacted by the M-j issue to set
comment-line-break-function to comment-indent-new-line and then wait to
see if someone who has more historical context to comment. If nothing or
nobody says anything after a couple of months, then maybe apply your
patch.
- Re: [PATCH] Fix org-comment-line-break-function,
Tim Cross <=