unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Thomas Hisch <thomas.hisch@ims.co.at>
Cc: Stefan Merten <stefan@merten-home.de>, 46304@debbugs.gnu.org
Subject: bug#46304: 28.0.50; rst-mode fill-paragraph broken in bullet-lists
Date: Thu, 16 Jun 2022 15:02:04 +0200	[thread overview]
Message-ID: <87r13odann.fsf@gnus.org> (raw)
In-Reply-To: <yed1rdv388i.fsf@ims.co.at> (Thomas Hisch's message of "Thu, 4 Feb 2021 21:09:49 +0100")

Thomas Hisch <thomas.hisch@ims.co.at> writes:

> The indentation in a text block in a bullet-point entry is removed if it
> the 2nd lines starts with a RST directive, e.g. :math:. If you run
> `fill-paragraph` when `point` is somewhere on the first paragraph, the
> indentation before the 2nd line is lost. This is neither the case for
> the 2nd nor the 3rd bullet-point entry in this next example
>
> * asdfasf dafd sfkdkfaslfksdflk mdfa sdfsdf kldf a kdasfd asf
>   :math:`\kappa` dfaskdflsdf dasfdfas df.
>
> * asdfasf dafd sfkdkfaslfksdflk mdfa sdfsdf kldf a kdasfd asf kksadfo
>   mmommmmmasd :math:`\kappa` dfaskdflsdf dasfdfas df.

(I'm going through old bug reports that unfortunately weren't resolved
at the time.)

I can reproduce this in Emacs 29, too -- it seems to be because :math:
is matched by:

    (fld-tag ":" fldnam-tag ":") ; A field marker.

which is part of 

    ;; Paragraphs (`par')
    (par-tag- (:alt itmany-tag fld-tag opt-tag fncdef-tag-2 dir-tag-3 exm-tag)
	      ) ; Tag at the beginning of a paragraph; there may be groups in
		; certain cases.

which is in

  (setq-local adaptive-fill-regexp (rst-re 'hws-tag 'par-tag- "?" 'hws-tag))

I've added Stefan to the CCs; perhaps he has some comments.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





  reply	other threads:[~2022-06-16 13:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-04 20:09 bug#46304: 28.0.50; rst-mode fill-paragraph broken in bullet-lists Thomas Hisch
2022-06-16 13:02 ` Lars Ingebrigtsen [this message]
2022-06-25 14:44   ` Stefan Merten
2022-06-26 16:25     ` Lars Ingebrigtsen

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.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87r13odann.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=46304@debbugs.gnu.org \
    --cc=stefan@merten-home.de \
    --cc=thomas.hisch@ims.co.at \
    /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.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).