GNU bug report logs - #74785
27.1; Fill-paragraph in RST mode does not respect line blocks

Previous Next

Package: emacs;

Reported by: Richard Brooksby <rb <at> ravenbrook.com>

Date: Wed, 11 Dec 2024 10:38:01 UTC

Severity: wishlist

Tags: confirmed

Found in version 27.1

To reply to this bug, email your comments to 74785 AT debbugs.gnu.org.

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#74785; Package emacs. (Wed, 11 Dec 2024 10:38:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Richard Brooksby <rb <at> ravenbrook.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 11 Dec 2024 10:38:02 GMT) Full text and rfc822 format available.

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

From: Richard Brooksby <rb <at> ravenbrook.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.1; Fill-paragraph in RST mode does not respect line blocks
Date: Wed, 11 Dec 2024 10:37:01 +0000

Fill-paragraph (M-Q) in a reStructuredText document that is formatted
using "Line Blocks"
<https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#line-blocks>
such as:

  | In Xanadu did Kubla Khan
  | A stately pleasure-dome decree:
  | Where Alph, the sacred river, ran
  | Through caverns measureless to man
  | Down to a sunless sea.

results in this:

  | In Xanadu did Kubla Khan | A stately pleasure-dome decree: | Where
  Alph, the sacred river, ran | Through caverns measureless to man |
  Down to a sunless sea.

but in this case it should leave the line breaks intact.  The code
should probably treat the vertical bars something like list bullets,
since continuation lines are possible, e.g.

  | This is the all the first line
    of output even though it's two lines
    of input.
  | This is second line in the output.
  | And this is the third.

(I searched <https://debbugs.gnu.org/cgi/pkgreport.cgi?package=emacs>
for a similar report.  Apologies if I was not thorough enough.)

In GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll 
bars)
 of 2024-09-17, modified by Debian built on lcy02-amd64-079
Windowing system distributor 'The X.Org Foundation', version 11.0.12201001
System Description: Ubuntu 22.04.5 LTS

Recent messages:
uncompressing rst.el.gz...done
Note: file is write protected
Mark set [3 times]
Making completion list...
delete-backward-char: Text is read-only
Quit [2 times]
Type C-x 1 to remove help window.  Type "q" in help window to restore 
its previous buffer.
You can run the command ‘info-emacs-bug’ with M-x inf-b RET
Making completion list...

Configured using:
 'configure --build x86_64-linux-gnu --prefix=/usr
 --sharedstatedir=/var/lib --libexecdir=/usr/lib
 --localstatedir=/var/lib --infodir=/usr/share/info
 --mandir=/usr/share/man --enable-libsystemd --with-pop=yes
 --enable-locallisppath=/etc/emacs:/usr/local/share/emacs/27.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/27.1/site-lisp:/usr/share/emacs/site-lisp
 --with-sound=alsa --without-gconf --with-mailutils --build
 x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib
 --libexecdir=/usr/lib --localstatedir=/var/lib
 --infodir=/usr/share/info --mandir=/usr/share/man --enable-libsystemd
 --with-pop=yes
 --enable-locallisppath=/etc/emacs:/usr/local/share/emacs/27.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/27.1/site-lisp:/usr/share/emacs/site-lisp
 --with-sound=alsa --without-gconf --with-mailutils --with-x=yes
 --with-x-toolkit=lucid --with-toolkit-scroll-bars --without-gsettings
 'CFLAGS=-g -O2
 -ffile-prefix-map=/build/emacs-vPr175/emacs-27.1+1=. 
-fstack-protector-strong
 -Wformat -Werror=format-security -Wall' 'CPPFLAGS=-Wdate-time
 -D_FORTIFY_SOURCE=2' 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro''

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

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

Major mode: ReST

Minor modes in effect:
  shell-dirtrack-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-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
  line-number-mode: t
  auto-fill-function: do-auto-fill
  transient-mark-mode: t

Load-path shadows:
/home/rb/.emacs.d/elpa/magit-20210117.2011/magit-section hides 
/home/rb/.emacs.d/elpa/magit-section-20241122.1431/magit-section
/usr/share/emacs/site-lisp/llvm-14/emacs hides 
/usr/share/emacs/site-lisp/llvm-15/emacs
/usr/share/emacs/site-lisp/llvm-14/tablegen-mode hides 
/usr/share/emacs/site-lisp/llvm-15/tablegen-mode
/usr/share/emacs/site-lisp/llvm-14/llvm-mode hides 
/usr/share/emacs/site-lisp/llvm-15/llvm-mode
/home/rb/.emacs.d/elpa/map-3.3.1/map hides 
/usr/share/emacs/27.1/lisp/emacs-lisp/map
/home/rb/.emacs.d/elpa/seq-2.24/seq hides 
/usr/share/emacs/27.1/lisp/emacs-lisp/seq

Features:
(shadow sort mail-extr emacsbug sendmail magit-utils crm eieio-opt
speedbar sb-image ezimage dframe apropos man jka-compr find-func
misearch multi-isearch cl-extra help-fns radix-tree help-mode mule-util
log-edit message rmc puny rfc822 mml mml-sec epa derived epg epg-config
gnus-util rmail rmail-loaddefs text-property-search mm-decode mm-bodies
mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums
mail-prsvr mailabbrev mail-utils gmm-utils mailheader pcvs-util add-log
flyspell ispell rst compile vc-git diff-mode easy-mmode vc-bzr vc-src
vc-sccs vc-svn vc-cvs vc-rcs vc-dir ewoc vc vc-dispatcher dired-aux
iso-transl dired dired-loaddefs cc-mode cc-fonts cc-guess cc-menus
cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs cus-edit cus-start
cus-load wid-edit solarized-dark-theme solarized color dash lxd-tramp
tramp tramp-loaddefs trampver tramp-integration files-x tramp-compat
shell pcomplete comint ansi-color ring parse-time iso8601 time-date
ls-lisp format-spec todotxt-mode edmacro kmacro server finder-inf info
package easymenu browse-url url-handlers url-parse auth-source cl-seq
eieio eieio-core cl-macs eieio-loaddefs password-cache json subr-x map
url-vars seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib
tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type
mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode
lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch
timer select scroll-bar mouse jit-lock font-lock syntax facemenu
font-core term/tty-colors frame minibuffer cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote threads dbusbind
inotify lcms2 dynamic-setting font-render-setting x-toolkit x multi-tty
make-network-process emacs)

Memory information:
((conses 16 445178 33251)
 (symbols 48 25380 2)
 (strings 32 133208 16553)
 (string-bytes 1 3430629)
 (vectors 16 36796)
 (vector-slots 8 838518 57172)
 (floats 8 299 280)
 (intervals 56 8211 530)
 (buffers 1000 36))





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74785; Package emacs. (Sat, 14 Dec 2024 10:24:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Richard Brooksby <rb <at> ravenbrook.com>,
 Stefan Merten <stefan <at> merten-home.de>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 74785 <at> debbugs.gnu.org
Subject: Re: bug#74785: 27.1;
 Fill-paragraph in RST mode does not respect line blocks
Date: Sat, 14 Dec 2024 12:22:46 +0200
> Date: Wed, 11 Dec 2024 10:37:01 +0000
> From: Richard Brooksby <rb <at> ravenbrook.com>
> 
> 
> 
> Fill-paragraph (M-Q) in a reStructuredText document that is formatted
> using "Line Blocks"
> <https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#line-blocks>
> such as:
> 
>    | In Xanadu did Kubla Khan
>    | A stately pleasure-dome decree:
>    | Where Alph, the sacred river, ran
>    | Through caverns measureless to man
>    | Down to a sunless sea.
> 
> results in this:
> 
>    | In Xanadu did Kubla Khan | A stately pleasure-dome decree: | Where
>    Alph, the sacred river, ran | Through caverns measureless to man |
>    Down to a sunless sea.
> 
> but in this case it should leave the line breaks intact.  The code
> should probably treat the vertical bars something like list bullets,
> since continuation lines are possible, e.g.
> 
>    | This is the all the first line
>      of output even though it's two lines
>      of input.
>    | This is second line in the output.
>    | And this is the third.
> 
> (I searched <https://debbugs.gnu.org/cgi/pkgreport.cgi?package=emacs>
> for a similar report.  Apologies if I was not thorough enough.)

Stefan and Stefan, any ideas or suggestions?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74785; Package emacs. (Mon, 16 Dec 2024 22:06:02 GMT) Full text and rfc822 format available.

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

From: Stefan Merten <stefan <at> merten-home.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Stefan Monnier <monnier <at> iro.umontreal.ca>, 74785 <at> debbugs.gnu.org,
 Richard Brooksby <rb <at> ravenbrook.com>
Subject: Re: bug#74785: 27.1;
 Fill-paragraph in RST mode does not respect line blocks
Date: Mon, 16 Dec 2024 23:05:11 +0100
Hi Eli!

2 days ago Eli Zaretskii wrote:
>> Date: Wed, 11 Dec 2024 10:37:01 +0000
>> From: Richard Brooksby <rb <at> ravenbrook.com>
>> 
>> 
>> 
>> Fill-paragraph (M-Q) in a reStructuredText document that is formatted
>> using "Line Blocks"
>> <https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#line-blocks>
>> such as:
>> 
>>    | In Xanadu did Kubla Khan
>>    | A stately pleasure-dome decree:
>>    | Where Alph, the sacred river, ran
>>    | Through caverns measureless to man
>>    | Down to a sunless sea.
>> 
>> results in this:
>> 
>>    | In Xanadu did Kubla Khan | A stately pleasure-dome decree: | Where
>>    Alph, the sacred river, ran | Through caverns measureless to man |
>>    Down to a sunless sea.
>> 
>> but in this case it should leave the line breaks intact.  The code
>> should probably treat the vertical bars something like list bullets,
>> since continuation lines are possible, e.g.
>> 
>>    | This is the all the first line
>>      of output even though it's two lines
>>      of input.
>>    | This is second line in the output.
>>    | And this is the third.
>> 
>> (I searched <https://debbugs.gnu.org/cgi/pkgreport.cgi?package=emacs>
>> for a similar report.  Apologies if I was not thorough enough.)
> 
> Stefan and Stefan, any ideas or suggestions?

Richard is right: Filling should consider line blocks. OTOH line
blocks are really a rarely used feature I guess, so it doesn't hurt
much.

I'll look deeper into the code. But don't hold your breath ;-) .


						Regards

						Stefan




Added tag(s) confirmed. Request was from Stefan Kangas <stefankangas <at> gmail.com> to control <at> debbugs.gnu.org. (Mon, 16 Dec 2024 23:51:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74785; Package emacs. (Tue, 17 Dec 2024 02:54:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Stefan Merten <stefan <at> merten-home.de>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 74785 <at> debbugs.gnu.org,
 Richard Brooksby <rb <at> ravenbrook.com>
Subject: Re: bug#74785: 27.1; Fill-paragraph in RST mode does not respect
 line blocks
Date: Mon, 16 Dec 2024 21:53:31 -0500
>>>    | This is the all the first line
>>>      of output even though it's two lines
>>>      of input.
>>>    | This is second line in the output.
>>>    | And this is the third.
[...]
>> Stefan and Stefan, any ideas or suggestions?

[ With all those Stefans around I feel like nothing can stop us.  ]

I think we "just" need to:

- set `paragraph-start` to match a line with a leading `|`.
- set `adaptive-fill-regexp` to match this leading `|`.

If the `paragraph-start` setting makes paragraph navigation inconvenient
(too fine-grained), we could try and set
`fill-forward-paragraph-function` to a function which let-binds
`paragraph-start` around a call to `forward-paragraph`.


        Stefan





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74785; Package emacs. (Tue, 17 Dec 2024 06:06:02 GMT) Full text and rfc822 format available.

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

From: James Cloos <cloos <at> jhcloos.com>
To: Stefan Merten <stefan <at> merten-home.de>
Cc: Eli Zaretskii <eliz <at> gnu.org>, Stefan Monnier <monnier <at> iro.umontreal.ca>,
 74785 <at> debbugs.gnu.org, Richard Brooksby <rb <at> ravenbrook.com>
Subject: Re: bug#74785: 27.1; Fill-paragraph in RST mode does not respect
 line blocks
Date: Tue, 17 Dec 2024 01:05:23 -0500
>>>>> Bug reports for GNU Emacs, the Swiss army knife of text editors <Stefan> writes:

this sort of wrapping used to work (at least in message buffers) for
many years.

you should be able to find my bug report about it breaking and the
resuting refusal even to accept that it is a bug.

-JimC
-- 
James Cloos <cloos <at> jhcloos.com>
            OpenPGP: https://jhcloos.com/0x997A9F17ED7DAEA6.asc




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74785; Package emacs. (Tue, 17 Dec 2024 12:26:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: stefan <at> merten-home.de, 74785 <at> debbugs.gnu.org, rb <at> ravenbrook.com
Subject: Re: bug#74785: 27.1; Fill-paragraph in RST mode does not respect
 line blocks
Date: Tue, 17 Dec 2024 14:25:04 +0200
> From: Stefan Monnier <monnier <at> iro.umontreal.ca>
> Cc: Eli Zaretskii <eliz <at> gnu.org>,  Richard Brooksby <rb <at> ravenbrook.com>,
>   74785 <at> debbugs.gnu.org
> Date: Mon, 16 Dec 2024 21:53:31 -0500
> 
> - set `adaptive-fill-regexp` to match this leading `|`.

Doesn't it already?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74785; Package emacs. (Tue, 17 Dec 2024 12:53:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: James Cloos <cloos <at> jhcloos.com>
Cc: stefan <at> merten-home.de, monnier <at> iro.umontreal.ca, 74785 <at> debbugs.gnu.org,
 rb <at> ravenbrook.com
Subject: Re: bug#74785: 27.1; Fill-paragraph in RST mode does not respect
 line blocks
Date: Tue, 17 Dec 2024 14:51:45 +0200
> From: James Cloos <cloos <at> jhcloos.com>
> Cc: Stefan Monnier <monnier <at> iro.umontreal.ca>,  Eli Zaretskii
>  <eliz <at> gnu.org>,  74785 <at> debbugs.gnu.org,  Richard Brooksby
>  <rb <at> ravenbrook.com>
> Copyright: Copyright 2015 James Cloos
> Date: Tue, 17 Dec 2024 01:05:23 -0500
> 
> >>>>> Bug reports for GNU Emacs, the Swiss army knife of text editors <Stefan> writes:
> 
> this sort of wrapping used to work (at least in message buffers) for
> many years.
> 
> you should be able to find my bug report about it breaking and the
> resuting refusal even to accept that it is a bug.

If that's bug#24081, then I don't see any rejection there, only a
request for clarification (which you gave).  Then the bug was for some
reason closed several months later, with no rationale.

We could reopen the bug, of course (assuming it still relevant to
current versions of Emacs 30 and 31).  But that bug is about
message-mode, not about rst-mode, so I'm not sure it is the same
problem.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74785; Package emacs. (Tue, 17 Dec 2024 14:50:01 GMT) Full text and rfc822 format available.

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

From: James Cloos <cloos <at> jhcloos.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: stefan <at> merten-home.de, monnier <at> iro.umontreal.ca, 74785 <at> debbugs.gnu.org,
 rb <at> ravenbrook.com
Subject: Re: bug#74785: 27.1; Fill-paragraph in RST mode does not respect
 line blocks
Date: Tue, 17 Dec 2024 09:49:03 -0500
>>>>> "EZ" == Eli Zaretskii <eliz <at> gnu.org> writes:

EZ> If that's bug#24081, then I don't see any rejection there, only a
EZ> request for clarification (which you gave).  Then the bug was for some
EZ> reason closed several months later, with no rationale.

that is the bug number.  i also received an email reply, which i see is
not in debbugs, claiming that it were not a bug and overtly refusing any
acceptance of ot work on a fix.  i don't know why that reply is elided.

-JimC
-- 
James Cloos <cloos <at> jhcloos.com>
            OpenPGP: https://jhcloos.com/0x997A9F17ED7DAEA6.asc




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74785; Package emacs. (Tue, 17 Dec 2024 15:13:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: James Cloos <cloos <at> jhcloos.com>
Cc: stefan <at> merten-home.de, monnier <at> iro.umontreal.ca, 74785 <at> debbugs.gnu.org,
 rb <at> ravenbrook.com
Subject: Re: bug#74785: 27.1; Fill-paragraph in RST mode does not respect
 line blocks
Date: Tue, 17 Dec 2024 17:11:55 +0200
> From: James Cloos <cloos <at> jhcloos.com>
> Cc: stefan <at> merten-home.de,  monnier <at> iro.umontreal.ca,
>   74785 <at> debbugs.gnu.org,  rb <at> ravenbrook.com
> Copyright: Copyright 2015 James Cloos
> Date: Tue, 17 Dec 2024 09:49:03 -0500
> 
> >>>>> "EZ" == Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> EZ> If that's bug#24081, then I don't see any rejection there, only a
> EZ> request for clarification (which you gave).  Then the bug was for some
> EZ> reason closed several months later, with no rationale.
> 
> that is the bug number.  i also received an email reply, which i see is
> not in debbugs, claiming that it were not a bug and overtly refusing any
> acceptance of ot work on a fix.  i don't know why that reply is elided.

Neither do I.  Did that email CC the bug number, or was it sent only
to you?  And who sent it, if I may ask?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74785; Package emacs. (Tue, 17 Dec 2024 15:35:01 GMT) Full text and rfc822 format available.

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

From: Richard Brooksby <rb <at> ravenbrook.com>
To: Eli Zaretskii <eliz <at> gnu.org>, James Cloos <cloos <at> jhcloos.com>
Cc: stefan <at> merten-home.de, monnier <at> iro.umontreal.ca, 74785 <at> debbugs.gnu.org
Subject: Re: bug#74785: 27.1; Fill-paragraph in RST mode does not respect line
 blocks
Date: Tue, 17 Dec 2024 15:34:31 +0000
On 2024-12-17 15:11, Eli Zaretskii wrote:
>> From: James Cloos <cloos <at> jhcloos.com>
>> Cc: stefan <at> merten-home.de,  monnier <at> iro.umontreal.ca,
>>    74785 <at> debbugs.gnu.org,  rb <at> ravenbrook.com
>> Copyright: Copyright 2015 James Cloos
>> Date: Tue, 17 Dec 2024 09:49:03 -0500
>>
>>>>>>> "EZ" == Eli Zaretskii <eliz <at> gnu.org> writes:
>>
>> EZ> If that's bug#24081, then I don't see any rejection there, only a
>> EZ> request for clarification (which you gave).  Then the bug was for some
>> EZ> reason closed several months later, with no rationale.
>>
>> that is the bug number.  i also received an email reply, which i see is
>> not in debbugs, claiming that it were not a bug and overtly refusing any
>> acceptance of ot work on a fix.  i don't know why that reply is elided.
> 
> Neither do I.  Did that email CC the bug number, or was it sent only
> to you?  And who sent it, if I may ask?

Excuse me for not being familiar with the bug system, but is it possible 
to discuss that bug in that bug's thread, rather than having a 
discussion about bug management in this thread about RST verse handling?

Thanks.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74785; Package emacs. (Tue, 17 Dec 2024 15:42:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Richard Brooksby <rb <at> ravenbrook.com>
Cc: stefan <at> merten-home.de, 74785 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca,
 cloos <at> jhcloos.com
Subject: Re: bug#74785: 27.1; Fill-paragraph in RST mode does not respect line
 blocks
Date: Tue, 17 Dec 2024 17:41:28 +0200
> Date: Tue, 17 Dec 2024 15:34:31 +0000
> Cc: stefan <at> merten-home.de, monnier <at> iro.umontreal.ca, 74785 <at> debbugs.gnu.org
> From: Richard Brooksby <rb <at> ravenbrook.com>
> 
> On 2024-12-17 15:11, Eli Zaretskii wrote:
> >> From: James Cloos <cloos <at> jhcloos.com>
> >> Cc: stefan <at> merten-home.de,  monnier <at> iro.umontreal.ca,
> >>    74785 <at> debbugs.gnu.org,  rb <at> ravenbrook.com
> >> Copyright: Copyright 2015 James Cloos
> >> Date: Tue, 17 Dec 2024 09:49:03 -0500
> >>
> >>>>>>> "EZ" == Eli Zaretskii <eliz <at> gnu.org> writes:
> >>
> >> EZ> If that's bug#24081, then I don't see any rejection there, only a
> >> EZ> request for clarification (which you gave).  Then the bug was for some
> >> EZ> reason closed several months later, with no rationale.
> >>
> >> that is the bug number.  i also received an email reply, which i see is
> >> not in debbugs, claiming that it were not a bug and overtly refusing any
> >> acceptance of ot work on a fix.  i don't know why that reply is elided.
> > 
> > Neither do I.  Did that email CC the bug number, or was it sent only
> > to you?  And who sent it, if I may ask?
> 
> Excuse me for not being familiar with the bug system, but is it possible 
> to discuss that bug in that bug's thread, rather than having a 
> discussion about bug management in this thread about RST verse handling?

That bug is archived, so we cannot discuss anything unless we
unarchive it.

But we can stop discussing that here, since it's a separate issue.
Thanks for pointing that out.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74785; Package emacs. (Tue, 17 Dec 2024 17:08:01 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: stefan <at> merten-home.de, 74785 <at> debbugs.gnu.org,
 James Cloos <cloos <at> jhcloos.com>, rb <at> ravenbrook.com
Subject: Re: bug#74785: 27.1; Fill-paragraph in RST mode does not respect
 line blocks
Date: Tue, 17 Dec 2024 12:07:08 -0500
> But that bug is about message-mode, not about rst-mode, so I'm not
> sure it is the same problem.

It's not (that bug was about a prefix shared by lines of a paragraph,
whereas this bug is about a prefix which starts a new paragraph).


        Stefan





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74785; Package emacs. (Tue, 17 Dec 2024 17:13:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: stefan <at> merten-home.de, 74785 <at> debbugs.gnu.org, rb <at> ravenbrook.com
Subject: Re: bug#74785: 27.1; Fill-paragraph in RST mode does not respect
 line blocks
Date: Tue, 17 Dec 2024 12:12:27 -0500
>> - set `adaptive-fill-regexp` to match this leading `|`.
> Doesn't it already?

Not in my test, no.  With a paragraph like:

    | bblblbl
    | asdfasdf
    | asdasdf

M-: (and (looking-at adaptive-fill-regexp) (match-string 0)) RET
returns a string that contains only the leading spaces.

`paragraph-start` doesn't match those lines either.


        Stefan





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74785; Package emacs. (Wed, 18 Dec 2024 04:58:02 GMT) Full text and rfc822 format available.

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

From: Richard Brooksby <rb <at> ravenbrook.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>, Eli Zaretskii <eliz <at> gnu.org>
Cc: stefan <at> merten-home.de, 74785 <at> debbugs.gnu.org
Subject: Re: bug#74785: 27.1; Fill-paragraph in RST mode does not respect line
 blocks
Date: Wed, 18 Dec 2024 04:56:45 +0000
[Message part 1 (text/plain, inline)]
On 2024-12-17 17:12, Stefan Monnier wrote:
>>> - set `adaptive-fill-regexp` to match this leading `|`.
>> Doesn't it already?
> 
> Not in my test, no.  With a paragraph like:
> 
>      | bblblbl
>      | asdfasdf
>      | asdasdf

Please find attached a self-documenting test document that you may find 
useful.

Thank you!
[verse-test.rst (text/x-rst, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74785; Package emacs. (Mon, 23 Dec 2024 16:52:02 GMT) Full text and rfc822 format available.

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

From: Stefan Merten <stefan <at> merten-home.de>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 74785 <at> debbugs.gnu.org,
 James Cloos <cloos <at> jhcloos.com>, rb <at> ravenbrook.com
Subject: Re: bug#74785: 27.1;
 Fill-paragraph in RST mode does not respect line blocks
Date: Mon, 23 Dec 2024 17:50:48 +0100
Hi guys!

6 days ago Stefan Monnier wrote:
>> But that bug is about message-mode, not about rst-mode, so I'm not
>> sure it is the same problem.
> 
> It's not (that bug was about a prefix shared by lines of a paragraph,
> whereas this bug is about a prefix which starts a new paragraph).

Sorry, but it's not that simple. The syntax of reStructuredText is
pretty tricky and it needs lots of good ideas to handle it. But it's
nice to write and read - and that's is why it IMHO is still a
worthwhile alternative.

If it would be as simple as you suggest, I would have built it in from
the start. There is a reason for not doing it. Indeed line blocks were
at the end of my list of supported reST features because I think they
are used rarely.

The function `rst-line-tabs' has a FIXME comment:

  ;; FIXME: Must consider other tabs:
  ;;        * Line blocks
  ;;        * Definition lists
  ;;        * Option lists

I guess the real problem is in that second line, that line blocks are
not yet supported.

I'll look into this.


						Grüße

						Stefan





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74785; Package emacs. (Sat, 04 Jan 2025 11:51:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stefan Merten <stefan <at> merten-home.de>
Cc: 74785 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca, cloos <at> jhcloos.com,
 rb <at> ravenbrook.com
Subject: Re: bug#74785: 27.1;
 Fill-paragraph in RST mode does not respect line blocks
Date: Sat, 04 Jan 2025 13:50:39 +0200
Ping! Stefan Merten, did you have time to have another look?

> From: Stefan Merten <stefan <at> merten-home.de>
> cc: Eli Zaretskii <eliz <at> gnu.org>, James Cloos <cloos <at> jhcloos.com>,
>     74785 <at> debbugs.gnu.org, rb <at> ravenbrook.com
> Comments: In-reply-to Stefan Monnier <monnier <at> iro.umontreal.ca>
>    message dated "Tue, 17 Dec 2024 12:07:08 -0500."
> Date: Mon, 23 Dec 2024 17:50:48 +0100
> 
> Hi guys!
> 
> 6 days ago Stefan Monnier wrote:
> >> But that bug is about message-mode, not about rst-mode, so I'm not
> >> sure it is the same problem.
> > 
> > It's not (that bug was about a prefix shared by lines of a paragraph,
> > whereas this bug is about a prefix which starts a new paragraph).
> 
> Sorry, but it's not that simple. The syntax of reStructuredText is
> pretty tricky and it needs lots of good ideas to handle it. But it's
> nice to write and read - and that's is why it IMHO is still a
> worthwhile alternative.
> 
> If it would be as simple as you suggest, I would have built it in from
> the start. There is a reason for not doing it. Indeed line blocks were
> at the end of my list of supported reST features because I think they
> are used rarely.
> 
> The function `rst-line-tabs' has a FIXME comment:
> 
>   ;; FIXME: Must consider other tabs:
>   ;;        * Line blocks
>   ;;        * Definition lists
>   ;;        * Option lists
> 
> I guess the real problem is in that second line, that line blocks are
> not yet supported.
> 
> I'll look into this.
> 
> 
> 						Grüße
> 
> 						Stefan
> 
> 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74785; Package emacs. (Sun, 05 Jan 2025 12:28:02 GMT) Full text and rfc822 format available.

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

From: Stefan Merten <stefan <at> merten-home.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 74785 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca, cloos <at> jhcloos.com
Subject: Re: bug#74785: 27.1;
 Fill-paragraph in RST mode does not respect line blocks
Date: Sun, 05 Jan 2025 13:26:46 +0100
Hi Eli,

Yesterday Eli Zaretskii wrote:
> Ping! Stefan Merten, did you have time to have another look?

yes I had. As I expected things are a bit more complicated. After all
I added a unit test already for this feature.

Indeed I have a big test suite for the mode. It found a bug introduced
by a change in the Emacs core components. This bug I fixed already :-) .


BTW: I'd consider this topic here not a bug. Indeed there are a couple
of features in reStructuredText which are not yet supported - for
instance support for tables. If you consider this a bug, then rst.el
is full of bugs. However, I think reStructuredText features like
tables are more or less impossible to support in an Emacs mode.

Thus I'd consider this a feature request. Frankly I can't see the
rationale in implementing *this* feature just because someone is
yelling...


						Grüße

						Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74785; Package emacs. (Sat, 18 Jan 2025 09:34:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stefan Merten <stefan <at> merten-home.de>
Cc: 74785 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca, cloos <at> jhcloos.com
Subject: Re: bug#74785: 27.1;
 Fill-paragraph in RST mode does not respect line blocks
Date: Sat, 18 Jan 2025 11:32:40 +0200
severity 74785 wishlist
thanks

> From: Stefan Merten <stefan <at> merten-home.de>
> cc: monnier <at> iro.umontreal.ca, cloos <at> jhcloos.com, 74785 <at> debbugs.gnu.org
> Comments: In-reply-to Eli Zaretskii <eliz <at> gnu.org>
>    message dated "Sat, 04 Jan 2025 13:50:39 +0200."
> Date: Sun, 05 Jan 2025 13:26:46 +0100
> 
> Hi Eli,
> 
> Yesterday Eli Zaretskii wrote:
> > Ping! Stefan Merten, did you have time to have another look?
> 
> yes I had. As I expected things are a bit more complicated. After all
> I added a unit test already for this feature.
> 
> Indeed I have a big test suite for the mode. It found a bug introduced
> by a change in the Emacs core components. This bug I fixed already :-) .
> 
> 
> BTW: I'd consider this topic here not a bug. Indeed there are a couple
> of features in reStructuredText which are not yet supported - for
> instance support for tables. If you consider this a bug, then rst.el
> is full of bugs. However, I think reStructuredText features like
> tables are more or less impossible to support in an Emacs mode.
> 
> Thus I'd consider this a feature request. Frankly I can't see the
> rationale in implementing *this* feature just because someone is
> yelling...

OK, I've now made this a feature request.




Severity set to 'wishlist' from 'normal' Request was from Eli Zaretskii <eliz <at> gnu.org> to control <at> debbugs.gnu.org. (Sat, 18 Jan 2025 09:34:03 GMT) Full text and rfc822 format available.

This bug report was last modified 151 days ago.

Previous Next


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