emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: Ihor Radchenko <yantar92@gmail.com>
Cc: Javier Olaechea <pirata@gmail.com>,  emacs-orgmode@gnu.org
Subject: Re: Fix M-j with default fill-prefix value
Date: Mon, 24 Oct 2022 13:00:38 +0000	[thread overview]
Message-ID: <87bkq1v0jt.fsf@localhost> (raw)
In-Reply-To: <87a6cdu2df.fsf@localhost>

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	other threads:[~2022-10-24 13:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-20 17:49 Fix M-j with default fill-prefix value Javier Olaechea
2022-04-22  5:13 ` Ihor Radchenko
2022-10-24 13:00   ` Ihor Radchenko [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bkq1v0jt.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=emacs-orgmode@gnu.org \
    --cc=pirata@gmail.com \
    --cc=yantar92@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).