unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#72523: 28.1; rst.el: indentation from TAB key in rst mode (ReST) is wrong when directive as an option
@ 2024-08-08 12:53 jfbu
  2024-08-09  9:50 ` Stefan Kangas
  2024-08-10  8:06 ` Eli Zaretskii
  0 siblings, 2 replies; 6+ messages in thread
From: jfbu @ 2024-08-08 12:53 UTC (permalink / raw)
  To: 72523

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








^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#72523: 28.1; rst.el: indentation from TAB key in rst mode (ReST) is wrong when directive as an option
  2024-08-08 12:53 bug#72523: 28.1; rst.el: indentation from TAB key in rst mode (ReST) is wrong when directive as an option jfbu
@ 2024-08-09  9:50 ` Stefan Kangas
  2024-08-10  8:36   ` Stefan Merten
  2024-08-10  8:06 ` Eli Zaretskii
  1 sibling, 1 reply; 6+ messages in thread
From: Stefan Kangas @ 2024-08-09  9:50 UTC (permalink / raw)
  To: jfbu, 72523; +Cc: Stefan Merten

jfbu <jfbu@free.fr> 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 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

I'm copying in Stefan Merten, in case he has any comments or
suggestions.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#72523: 28.1; rst.el: indentation from TAB key in rst mode (ReST) is wrong when directive as an option
  2024-08-08 12:53 bug#72523: 28.1; rst.el: indentation from TAB key in rst mode (ReST) is wrong when directive as an option jfbu
  2024-08-09  9:50 ` Stefan Kangas
@ 2024-08-10  8:06 ` Eli Zaretskii
  1 sibling, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2024-08-10  8:06 UTC (permalink / raw)
  To: jfbu, Stefan Merten; +Cc: 72523

> From: jfbu <jfbu@free.fr>
> Date: Thu, 8 Aug 2024 14:53:13 +0200
> 
> 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.

Stefan, any comments or suggestions?





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#72523: 28.1; rst.el: indentation from TAB key in rst mode (ReST) is wrong when directive as an option
  2024-08-09  9:50 ` Stefan Kangas
@ 2024-08-10  8:36   ` Stefan Merten
  2024-08-10  9:41     ` jfbu
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Merten @ 2024-08-10  8:36 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: 72523, jfbu

Hi!

Yesterday Stefan Kangas wrote:
> jfbu <jfbu@free.fr> 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.


						Regards

						Stefan





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#72523: 28.1; rst.el: indentation from TAB key in rst mode (ReST) is wrong when directive as an option
  2024-08-10  8:36   ` Stefan Merten
@ 2024-08-10  9:41     ` jfbu
  2024-08-15  8:34       ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: jfbu @ 2024-08-10  9:41 UTC (permalink / raw)
  To: Stefan Merten; +Cc: 72523, Stefan Kangas

Hello all,

> Le 10 août 2024 à 10:36, Stefan Merten <stefan@merten-home.de> a écrit :
> 
> Hi!
> 
> Yesterday Stefan Kangas wrote:
>> jfbu <jfbu@free.fr> 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 ;-)

Best,

Jean-François

> 
> 						Regards
> 
> 						Stefan






^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#72523: 28.1; rst.el: indentation from TAB key in rst mode (ReST) is wrong when directive as an option
  2024-08-10  9:41     ` jfbu
@ 2024-08-15  8:34       ` Eli Zaretskii
  0 siblings, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2024-08-15  8:34 UTC (permalink / raw)
  To: jfbu; +Cc: stefan, 72523-done, stefankangas

> Cc: 72523@debbugs.gnu.org, Stefan Kangas <stefankangas@gmail.com>
> From: jfbu <jfbu@free.fr>
> Date: Sat, 10 Aug 2024 11:41:32 +0200
> 
> Hello all,
> 
> > Le 10 août 2024 à 10:36, Stefan Merten <stefan@merten-home.de> a écrit :
> > 
> > Hi!
> > 
> > Yesterday Stefan Kangas wrote:
> >> jfbu <jfbu@free.fr> 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.





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-08-15  8:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-08 12:53 bug#72523: 28.1; rst.el: indentation from TAB key in rst mode (ReST) is wrong when directive as an option jfbu
2024-08-09  9:50 ` Stefan Kangas
2024-08-10  8:36   ` Stefan Merten
2024-08-10  9:41     ` jfbu
2024-08-15  8:34       ` Eli Zaretskii
2024-08-10  8:06 ` Eli Zaretskii

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).