emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fix M-j with default fill-prefix value


From: Ihor Radchenko
Subject: Re: Fix M-j with default fill-prefix value
Date: Mon, 24 Oct 2022 13:00:38 +0000

Ihor Radchenko <yantar92@gmail.com> writes:

> Javier Olaechea <pirata@gmail.com> writes:
>
>> org-comment-line-break-function does not handle fill-prefix being set to
>> nil, which is the default value for fill-prefix. This means that pressing
>> M-j inside an org-mode buffer in a vanilla installation of Emacs results in
>> an error. From looking at other callers of
>> insert-before-markers-and-inherit it is clear that a guard against
>> fill-prefix being nil is missing.
>
> I guess this is fine to fix the immediate error, but I do not see much
> point in the whole org-comment-line-break function. AFAIU, it does not
> even recognise whether we are inside comment or not. I just tried to use
> the default comment-indent-new-line and it correctly indents paragraphs
> and also comments. On the other hand, it does not indent item lists and
> src-blocks.
>
> Rather than applying this patch I would remove
> org-comment-line-break-function alltogether. It will already be better
> than the current state. Alternatively, it should be rewritten to take
> into account current element context, similar to org-insert-comment.

My guess was not correct.
The issue had to be fixed by modifying org-comment-line-break-function
at the end.
Now, fixed on main.
See https://list.orgmode.org/877d1m9343.fsf@localhost/

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]