GNU bug report logs - #46304
28.0.50; rst-mode fill-paragraph broken in bullet-lists

Previous Next

Package: emacs;

Reported by: Thomas Hisch <thomas.hisch <at> ims.co.at>

Date: Thu, 4 Feb 2021 20:11:01 UTC

Severity: normal

Tags: wontfix

Found in version 28.0.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 46304 in the body.
You can then email your comments to 46304 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#46304; Package emacs. (Thu, 04 Feb 2021 20:11:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Thomas Hisch <thomas.hisch <at> ims.co.at>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 04 Feb 2021 20:11:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Thomas Hisch <thomas.hisch <at> ims.co.at>
To: <bug-gnu-emacs <at> gnu.org>
Subject: 28.0.50; rst-mode fill-paragraph broken in bullet-lists
Date: Thu, 4 Feb 2021 21:09:49 +0100
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.

* asdfasf dafd sfkdkfaslfksdflk mdfa sdfsdf kldf a kdasfd asf asdfasf
  dafd sfkdkfaslfksdflk mdfa sdfsdf kldf a kdasfd asf asdfasf dafd
  sfkdkfaslfksdflk mdfa sdfsdf kldf a kdasfd asf asdfasf dafd
  sfkdkfaslfksdflk mdfa sdfsdf kldf a kdasfd asf dakkkkkkkkkkkkkkkk
  :math:`\kappa` dfaskdflsdf dasfdfas df.


In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo version 1.16.0, Xaw3d scroll bars)
 of 2021-02-03 built on NBPF1PQX4B
Repository revision: b81516c7fb558c9b4bc44e6e69f6729a5f2f9894
Repository branch: master
Windowing system distributor 'Fedora Project', version 11.0.12010000
System Description: Fedora 33 (Workstation Edition)

Configured using:
 'configure 'CFLAGS=-march=native -O3' --prefix=/opt/emacs
 --with-x-toolkit=lucid --with-xpm --without-jpeg --without-gif
 --without-tiff --with-modules --with-json'

Configured features:
ACL CAIRO DBUS FREETYPE GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JSON
LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY INOTIFY
PDUMPER PNG RSVG SOUND THREADS TOOLKIT_SCROLL_BARS X11 XAW3D XDBE XIM
XPM LUCID ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: ReST

Minor modes in effect:
  counsel-projectile-mode: t
  counsel-mode: t
  ivy-rich-mode: t
  ivy-mode: t
  global-ethan-wspace-mode: t
  save-place-mode: t
  show-paren-mode: t
  delete-selection-mode: t
  savehist-mode: t
  global-hi-lock-mode: t
  hi-lock-mode: t
  winner-mode: t
  window-numbering-mode: t
  global-undo-tree-mode: t
  undo-tree-mode: t
  thi::spell-fu-mode: t
  spell-fu-mode: t
  async-bytecomp-package-mode: t
  recentf-mode: t
  global-git-commit-mode: t
  magit-auto-revert-mode: t
  global-flycheck-mode: t
  flycheck-mode: t
  flx-ido-mode: t
  shell-dirtrack-mode: t
  evil-mode: t
  evil-local-mode: t
  projectile-mode: t
  override-global-mode: t
  url-handler-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  global-prettify-symbols-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  size-indication-mode: t
  column-number-mode: t
  line-number-mode: t
  auto-fill-function: yas--auto-fill
  transient-mark-mode: t

Load-path shadows:
/home/thomas.hisch/.emacs.d/elpa/magit-20210203.1158/magit-section hides /home/thomas.hisch/.emacs.d/elpa/magit-section-20210124.1824/magit-section
/home/thomas.hisch/.emacs.d/user-lisp/custom hides /opt/emacs/share/emacs/28.0.50/lisp/custom

Features:
(shadow sort mail-extr emacsbug sendmail reporter shortdoc rst
git-rebase pcmpl-unix mc-hide-unmatched-lines-mode mc-mark-more ...)

Memory information:
((conses 16 1369556 1178269)
 (symbols 48 92372 85)
 (strings 32 433122 105720)
 (string-bytes 1 12547904)
 (vectors 16 139013)
 (vector-slots 8 3290135 820691)
 (floats 8 1055 1564)
 (intervals 56 75226 43134)
 (buffers 984 119))
Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet.

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly prohibited.

IMS Nanofabrication GmbH FN: 208021 p, FB-Gericht: Wien; Sitz: Schreygasse 3, 1020, Vienna (Austria),Tel. +43 1 214 48 94; E-Mail: imsoffice <at> ims.co.at; DVR-Nr: 0374369; www.ims.co.at




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#46304; Package emacs. (Thu, 16 Jun 2022 13:03:01 GMT) Full text and rfc822 format available.

Message #8 received at 46304 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Thomas Hisch <thomas.hisch <at> ims.co.at>
Cc: Stefan Merten <stefan <at> merten-home.de>, 46304 <at> debbugs.gnu.org
Subject: Re: bug#46304: 28.0.50; rst-mode fill-paragraph broken in bullet-lists
Date: Thu, 16 Jun 2022 15:02:04 +0200
Thomas Hisch <thomas.hisch <at> 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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#46304; Package emacs. (Sat, 25 Jun 2022 14:46:01 GMT) Full text and rfc822 format available.

Message #11 received at 46304 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Merten <stefan <at> merten-home.de>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Thomas Hisch <thomas.hisch <at> ims.co.at>, 46304 <at> debbugs.gnu.org
Subject: Re: bug#46304: 28.0.50; rst-mode fill-paragraph broken in bullet-lists
Date: Sat, 25 Jun 2022 16:44:54 +0200
Hi Lars, Thomas!

Last week (9 days ago) Lars Ingebrigtsen wrote:
> Thomas Hisch <thomas.hisch <at> ims.co.at> writes:
>
>> * 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.)

Thanks, I never saw that.

> I can reproduce this in Emacs 29, too -- it seems to be because :math:
> is matched by:
> 
>     (fld-tag ":" fldnam-tag ":") ; A field marker.

That is - on this level of syntax analysis - really an ambiguity in
the syntax of reStructuredText. See
https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#field-lists

See the example. The line starting with ":Indentation:" is the same
case and the example indents it correctly.

I think you could resolve the ambiguity by suffixing the ":math:"
instead: "`\kappa`:math:" should work.

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

Thanks a lot.

This is really a corner case. I'd say: Won't fix.


						Regards

						Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#46304; Package emacs. (Sun, 26 Jun 2022 16:27:01 GMT) Full text and rfc822 format available.

Message #14 received at 46304 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Stefan Merten <stefan <at> merten-home.de>
Cc: Thomas Hisch <thomas.hisch <at> ims.co.at>, 46304 <at> debbugs.gnu.org
Subject: Re: bug#46304: 28.0.50; rst-mode fill-paragraph broken in bullet-lists
Date: Sun, 26 Jun 2022 18:25:56 +0200
Stefan Merten <stefan <at> merten-home.de> writes:

> This is really a corner case. I'd say: Won't fix.

OK; closing this bug report, then.

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




Added tag(s) wontfix. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 26 Jun 2022 16:27:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 46304 <at> debbugs.gnu.org and Thomas Hisch <thomas.hisch <at> ims.co.at> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 26 Jun 2022 16:27:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 25 Jul 2022 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 276 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.