Subject: bug#72523: closed (Re: bug#72523: 28.1; rst.el: indentation from TAB key in rst mode (ReST) is wrong when directive as an option)

From: [email-masked] (GNU bug Tracking System)
Date: Thu, 15 Aug 2024 08:36:02 +0000

Your bug report

#72523: 28.1; rst.el: indentation from TAB key in rst mode (ReST) is wrong when directive as an option

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
72523: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=72523
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#72523: 28.1; rst.el: indentation from TAB key in rst mode (ReST) is wrong when directive as an option
From: Eli Zaretskii <[email-masked]>
To: jfbu <[email-masked]>
Cc: [email-masked], [email-masked], [email-masked]
Date: Thu, 15 Aug 2024 11:34:46 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

> Cc: [email-masked], Stefan Kangas <[email-masked]>
> From: jfbu <[email-masked]>
> Date: Sat, 10 Aug 2024 11:41:32 +0200
> 
> Hello all,
> 
> > Le 10 août 2024 à 10:36, Stefan Merten <[email-masked]> a écrit :
> > 
> > Hi!
> > 
> > Yesterday Stefan Kangas wrote:
> >> jfbu <[email-masked]> writes:
> >> 
> >>> Hi,
> >>> 
> >>> I could not find a bug tracker restricted to rst.el (reStructured Text mode). I was told rst.el is now maintained as part of Emacs, not at [Docutils](https://sourceforge.net/projects/docutils/).
> >>> 
> >>> Here is my report:
> >>> 
> >>> Consider editing in Emacs a file `test.rst` and having typed so far
> >>> 
> >>> ~~~rest
> >>> .. note::
> >>>   :name: test
> >>> ~~~
> >>> 
> >>> then insert a blank line and hit the TAB key on next one.  The cursor will align with `test`,  not with `:name:`.
> > 
> > This is not a bug, it's a feature.
> > 
> > You may hit TAB again to jump to the previous alignment point. You may
> > repeat this to cycle through all alignment points.
> > 
> 
> I did completely overlook that feature! Sorry about that...
> 
> ~~~rest
> .. note::
>    :class: w
> ~~~ 
> 
> First TAB aligns with w, second one aligns with the "a"
> of class and "e" of note and third one is the one a priori
> most expected. Fourth one goes back to start of line.
> 
> If the alignment points were cycled in reverse order from now,
> that would solve my use case ;-)

Thanks, so I'm now closing this bug.

Subject: 28.1; rst.el: indentation from TAB key in rst mode (ReST) is wrong when directive as an option
From: jfbu <[email-masked]>
To: [email-masked]
Date: Thu, 8 Aug 2024 14:53:13 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi,

I could not find a bug tracker restricted to rst.el (reStructured Text mode). I was told rst.el is now maintained as part of Emacs, not at [Docutils](https://sourceforge.net/projects/docutils/).

Here is my report:

Consider editing in Emacs a file `test.rst` and having typed so far

~~~rest
.. note::
   :name: test
~~~

then insert a blank line and hit the TAB key on next one.  The cursor will align with `test`,  not with `:name:`.

This produces extra space in output when processed either by rst2html or integrated into a Sphinx projet.  For context see [this Sphinx comment](https://github.com/sphinx-doc/sphinx/issues/12742#issuecomment-2275622334).

I am using a file rst.el.gz integrated to my Emacs 28.1 which contains
~~~lisp
;; Maintained by the release process.
(defconst rst-official-version
  (rst-extract-version "%" "OfficialVersion: " "[0-9]+\\(?:\\.[0-9]+\\)+" " "
		       "%OfficialVersion: 1.5.2 %")
  "Official version of the package.")
(defconst rst-official-cvs-rev
  (rst-extract-version "[%$]" "Revision: " "[0-9]+\\(?:\\.[0-9]+\\)+" " "
		       "$Revision: 1.1058.2.9 $")
  "CVS revision of this file in the official version.")
~~~

I tried with electric-indent-mode both on and off.  No change.
Regards,
jfbu