* bug#46304: 28.0.50; rst-mode fill-paragraph broken in bullet-lists
@ 2021-02-04 20:09 Thomas Hisch
2022-06-16 13:02 ` Lars Ingebrigtsen
0 siblings, 1 reply; 4+ messages in thread
From: Thomas Hisch @ 2021-02-04 20:09 UTC (permalink / raw)
To: 46304
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@ims.co.at; DVR-Nr: 0374369; www.ims.co.at
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#46304: 28.0.50; rst-mode fill-paragraph broken in bullet-lists
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
2022-06-25 14:44 ` Stefan Merten
0 siblings, 1 reply; 4+ messages in thread
From: Lars Ingebrigtsen @ 2022-06-16 13:02 UTC (permalink / raw)
To: Thomas Hisch; +Cc: Stefan Merten, 46304
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#46304: 28.0.50; rst-mode fill-paragraph broken in bullet-lists
2022-06-16 13:02 ` Lars Ingebrigtsen
@ 2022-06-25 14:44 ` Stefan Merten
2022-06-26 16:25 ` Lars Ingebrigtsen
0 siblings, 1 reply; 4+ messages in thread
From: Stefan Merten @ 2022-06-25 14:44 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: Thomas Hisch, 46304
Hi Lars, Thomas!
Last week (9 days ago) Lars Ingebrigtsen wrote:
> Thomas Hisch <thomas.hisch@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
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#46304: 28.0.50; rst-mode fill-paragraph broken in bullet-lists
2022-06-25 14:44 ` Stefan Merten
@ 2022-06-26 16:25 ` Lars Ingebrigtsen
0 siblings, 0 replies; 4+ messages in thread
From: Lars Ingebrigtsen @ 2022-06-26 16:25 UTC (permalink / raw)
To: Stefan Merten; +Cc: Thomas Hisch, 46304
Stefan Merten <stefan@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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-06-26 16:25 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2022-06-25 14:44 ` Stefan Merten
2022-06-26 16:25 ` Lars Ingebrigtsen
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).