GNU bug report logs -
#62536
30.0.50; Can we add """ ... """ electric pair in elixir, just like python
Previous Next
Reported by: 牟 桐 <mou.tong <at> outlook.com>
Date: Thu, 30 Mar 2023 04:31:02 UTC
Severity: normal
Found in version 30.0.50
Done: Eli Zaretskii <eliz <at> gnu.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 62536 in the body.
You can then email your comments to 62536 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#62536
; Package
emacs
.
(Thu, 30 Mar 2023 04:31:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
牟 桐 <mou.tong <at> outlook.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Thu, 30 Mar 2023 04:31:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi!
In elixir, the docs in src are like this:
``` elixir-ts-mode
defmodule Foo do
@moduledoc """
Foo-related functions.
## Examples
iex> Foo.sum(1, 2)
3
"""
@doc """
Calculate the sum of two numbers.
"""
def sum(a, b), do: a + b
end
```
In python-mode, input the continious triple quotes, it will insert the
left quotes when electric-pair-mode is on.
python-mode did it here:
https://github.com/emacs-mirror/emacs/blob/bfa3500c3c6e4df58978e84753718cd5358c06fb/lisp/progmodes/python.el#L6599-L6607
https://github.com/emacs-mirror/emacs/blob/bfa3500c3c6e4df58978e84753718cd5358c06fb/lisp/progmodes/python.el#L6637-L6639
This behavior is also very common in elixir, so can we add this to
elixir-ts-mode? thx
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#62536
; Package
emacs
.
(Thu, 30 Mar 2023 05:45:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 62536 <at> debbugs.gnu.org (full text, mbox):
> From: 牟 桐 <mou.tong <at> outlook.com>
> Date: Thu, 30 Mar 2023 04:25:07 +0000
>
> In elixir, the docs in src are like this:
>
> ``` elixir-ts-mode
> defmodule Foo do
> @moduledoc """
> Foo-related functions.
>
> ## Examples
>
> iex> Foo.sum(1, 2)
> 3
> """
>
> @doc """
> Calculate the sum of two numbers.
> """
> def sum(a, b), do: a + b
> end
> ```
>
> In python-mode, input the continious triple quotes, it will insert the
> left quotes when electric-pair-mode is on.
>
> python-mode did it here:
>
> https://github.com/emacs-mirror/emacs/blob/bfa3500c3c6e4df58978e84753718cd5358c06fb/lisp/progmodes/python.el#L6599-L6607
>
>
> https://github.com/emacs-mirror/emacs/blob/bfa3500c3c6e4df58978e84753718cd5358c06fb/lisp/progmodes/python.el#L6637-L6639
>
>
> This behavior is also very common in elixir, so can we add this to
> elixir-ts-mode? thx
Wilhelm, WDYT?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#62536
; Package
emacs
.
(Thu, 30 Mar 2023 06:32:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 62536 <at> debbugs.gnu.org (full text, mbox):
>> From: 牟 桐 <mou.tong <at> outlook.com>
>> Date: Thu, 30 Mar 2023 04:25:07 +0000
>>
>> In elixir, the docs in src are like this:
>>
>> ``` elixir-ts-mode
>> defmodule Foo do
>> @moduledoc """
>> Foo-related functions.
>>
>> ## Examples
>>
>> iex> Foo.sum(1, 2)
>> 3
>> """
>>
>> @doc """
>> Calculate the sum of two numbers.
>> """
>> def sum(a, b), do: a + b
>> end
>> ```
>>
>> In python-mode, input the continious triple quotes, it will
>> insert the
>> left quotes when electric-pair-mode is on.
>>
>> python-mode did it here:
>>
>> https://github.com/emacs-mirror/emacs/blob/bfa3500c3c6e4df58978e84753718cd5358c06fb/lisp/progmodes/python.el#L6599-L6607
>>
>>
>> https://github.com/emacs-mirror/emacs/blob/bfa3500c3c6e4df58978e84753718cd5358c06fb/lisp/progmodes/python.el#L6637-L6639
>>
>>
>> This behavior is also very common in elixir, so can we add this
>> to
>> elixir-ts-mode? thx
>
> Wilhelm, WDYT?
Yes, I think we should add some version of this. I am currently
testing a
syntax-propertize-function addition to solve an issue related to
electric-pair-mode and will have a look at this straight after.
There was another request to automatically insert `end` when `do`
is
entered, which might be a good addition as well.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#62536
; Package
emacs
.
(Thu, 30 Mar 2023 08:26:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 62536 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
> automatically insert `end` when `do` is entered, which might be a good
> addition as well.
Eglot can handle this and it works pretty good for now:
Open a ex file, enable `eglot`, insert `do` and press `tab`, eglot will
help you insert `end` automatically.
I think it's better to let user trigger `do`'s completion. Because when
someone want to write a one line function, the `end` is not needed:
```elixir-ts
def foo(a), do: a
```
Anyway, hope to see the new feature ;)
________________________________
发件人: Wilhelm Kirschbaum <wkirschbaum <at> gmail.com>
发送时间: 2023年3月30日 14:19
收件人: Eli Zaretskii <eliz <at> gnu.org>
抄送: 牟 桐 <mou.tong <at> outlook.com>; 62536 <at> debbugs.gnu.org <62536 <at> debbugs.gnu.org>
主题: Re: bug#62536: 30.0.50; Can we add """ ... """ electric pair in elixir, just like python
>> From: 牟 桐 <mou.tong <at> outlook.com>
>> Date: Thu, 30 Mar 2023 04:25:07 +0000
>>
>> In elixir, the docs in src are like this:
>>
>> ``` elixir-ts-mode
>> defmodule Foo do
>> @moduledoc """
>> Foo-related functions.
>>
>> ## Examples
>>
>> iex> Foo.sum(1, 2)
>> 3
>> """
>>
>> @doc """
>> Calculate the sum of two numbers.
>> """
>> def sum(a, b), do: a + b
>> end
>> ```
>>
>> In python-mode, input the continious triple quotes, it will
>> insert the
>> left quotes when electric-pair-mode is on.
>>
>> python-mode did it here:
>>
>> https://github.com/emacs-mirror/emacs/blob/bfa3500c3c6e4df58978e84753718cd5358c06fb/lisp/progmodes/python.el#L6599-L6607
>>
>>
>> https://github.com/emacs-mirror/emacs/blob/bfa3500c3c6e4df58978e84753718cd5358c06fb/lisp/progmodes/python.el#L6637-L6639
>>
>>
>> This behavior is also very common in elixir, so can we add this
>> to
>> elixir-ts-mode? thx
>
> Wilhelm, WDYT?
Yes, I think we should add some version of this. I am currently
testing a
syntax-propertize-function addition to solve an issue related to
electric-pair-mode and will have a look at this straight after.
There was another request to automatically insert `end` when `do`
is
entered, which might be a good addition as well.
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#62536
; Package
emacs
.
(Sun, 02 Apr 2023 08:47:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 62536 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Wilhelm Kirschbaum <wkirschbaum <at> gmail.com> writes:
>>> From: 牟 桐 <mou.tong <at> outlook.com>
>>> Date: Thu, 30 Mar 2023 04:25:07 +0000
>>> In elixir, the docs in src are like this:
>>> ``` elixir-ts-mode
>>> defmodule Foo do
>>> @moduledoc """
>>> Foo-related functions.
>>> ## Examples
>>> iex> Foo.sum(1, 2)
>>> 3
>>> """
>>> @doc """
>>> Calculate the sum of two numbers.
>>> """
>>> def sum(a, b), do: a + b
>>> end
>>> ```
>>> In python-mode, input the continious triple quotes, it will
>>> insert
>>> the
>>> left quotes when electric-pair-mode is on.
>>> python-mode did it here:
>>> https://github.com/emacs-mirror/emacs/blob/bfa3500c3c6e4df58978e84753718cd5358c06fb/lisp/progmodes/python.el#L6599-L6607
>>> https://github.com/emacs-mirror/emacs/blob/bfa3500c3c6e4df58978e84753718cd5358c06fb/lisp/progmodes/python.el#L6637-L6639
>>> This behavior is also very common in elixir, so can we add
>>> this to
>>> elixir-ts-mode? thx
Will it make sense to also add a newline when closing a multiline
comment/heredoc? It feels smoother to me rather than having to
press
enter and then C-o ( open-line ) to position the cursor correctly?
Instead of this:
(save-excursion
(insert (make-string 2 last-command-event)))
perhaps this:
(save-excursion
(newline)
(insert (make-string 2 last-command-event)))
(newline)
Then the when you type
@moduledoc """
it will jump to
@moduledoc """
|
"""
instead of
@moduledoc """|"""
I am adding two patches, one for the electric pair and another to
fix
the issue where the point jumps to the end of a multi-line comment
when
type `"` within the multi-line comment.
[0001-Propertize-heredocs-in-elixir-ts-mode.patch (text/x-patch, attachment)]
[0002-Handle-electric-heredocs-pairs-in-elixir-ts-mode.patch (text/x-patch, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#62536
; Package
emacs
.
(Sun, 02 Apr 2023 16:39:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 62536 <at> debbugs.gnu.org (full text, mbox):
> Will it make sense to also add a newline when closing a multiline
> comment/heredoc? It feels smoother to me rather than having to press
> enter and then C-o ( open-line ) to position the cursor correctly?
I agree with you, but I think it might be better to imitate what
`c-mode` did:
```c
int main () {|}
```
When `electric-pair-mode` is on, input the left `{`, Emacs helps you
complete the right `}`. After press enter, your cursor will move to the
next line and auto-indented according to your offset config:
```c
int main () {
|
}
```
So how about making it work like this?
```elixir-ts
@doc """|"""
# after press enter
@doc """
|
"""
```
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#62536
; Package
emacs
.
(Sun, 02 Apr 2023 17:28:01 GMT)
Full text and
rfc822 format available.
Message #23 received at 62536 <at> debbugs.gnu.org (full text, mbox):
Mou Tong <mou.tong <at> outlook.com> writes:
>> Will it make sense to also add a newline when closing a
>> multiline
>> comment/heredoc? It feels smoother to me rather than having to
>> press
>> enter and then C-o ( open-line ) to position the cursor
>> correctly?
>
> I agree with you, but I think it might be better to imitate what
> `c-mode` did:
>
> ```c
> int main () {|}
> ```
>
> When `electric-pair-mode` is on, input the left `{`, Emacs helps
> you
> complete the right `}`. After press enter, your cursor will move
> to the
> next line and auto-indented according to your offset config:
>
> ```c
> int main () {
> |
> }
> ```
>
> So how about making it work like this?
>
> ```elixir-ts
> @doc """|"""
>
> # after press enter
> @doc """
> |
> """
> ```
Yes, I think that is better, let me have a go at it. I was
concerned
of doing unsolicited movement with my suggestion of inserting
newlines.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#62536
; Package
emacs
.
(Sun, 02 Apr 2023 19:39:02 GMT)
Full text and
rfc822 format available.
Message #26 received at 62536 <at> debbugs.gnu.org (full text, mbox):
> Mou Tong <mou.tong <at> outlook.com> writes:
>
>>> Will it make sense to also add a newline when closing a
>>> multiline
>>> comment/heredoc? It feels smoother to me rather than having to
>>> press
>>> enter and then C-o ( open-line ) to position the cursor
>>> correctly?
>>
>> I agree with you, but I think it might be better to imitate
>> what
>> `c-mode` did:
>>
>> ```c
>> int main () {|}
>> ```
>>
>> When `electric-pair-mode` is on, input the left `{`, Emacs
>> helps you
>> complete the right `}`. After press enter, your cursor will
>> move to
>> the
>> next line and auto-indented according to your offset config:
>>
>> ```c
>> int main () {
>> |
>> }
>> ```
>>
>> So how about making it work like this?
>>
>> ```elixir-ts
>> @doc """|"""
>>
>> # after press enter
>> @doc """
>> |
>> """
>> ```
>
> Yes, I think that is better, let me have a go at it. I was
> concerned
> of doing unsolicited movement with my suggestion of inserting
> newlines.
Playing around with it I think we should add a newline, I changed
my mind.
Unlike the c example above, the following syntax is not valid
elixir: `""""""` and it requires a
newline to make it valid. Part of the appeal of making the
heredoc electric is to keep
the syntax valid. There should never be a reason for the heredoc
to be
on a single line and also makes the tree-sitter grammar invalid,
which
causes the blinking issue.
This will mean:
```
@doc ""|
```
when typing `"` it will insert `\n"""` and thus have the minimal
valid elixir
syntax without doing extra movement.
```
@doc """|
"""
```
This will be the change ( looking at the electric.el code ).
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#62536
; Package
emacs
.
(Mon, 03 Apr 2023 02:42:02 GMT)
Full text and
rfc822 format available.
Message #29 received at 62536 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
> There should never be a reason for the heredoc to be on a single line
> and also makes the tree-sitter grammar invalid, which causes the
> blinking issue.
You are right, I didn't consider that.
> ```
> @doc """|
> """
> ```
>
> This will be the change ( looking at the electric.el code ).
Cool, hoping to see the new feature soon (so sorry I don't know much
about elisp and may not be able to help you much with it.)
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#62536
; Package
emacs
.
(Mon, 03 Apr 2023 08:30:02 GMT)
Full text and
rfc822 format available.
Message #32 received at 62536 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Mou Tong <mou.tong <at> outlook.com> writes:
>> There should never be a reason for the heredoc to be on a
>> single line
>> and also makes the tree-sitter grammar invalid, which causes
>> the
>> blinking issue.
>
> You are right, I didn't consider that.
>
>> ```
>> @doc """|
>> """
>> ```
>>
>> This will be the change ( looking at the electric.el code ).
>
> Cool, hoping to see the new feature soon (so sorry I don't know
> much
> about elisp and may not be able to help you much with it.)
These two patches should then be sufficient to better handle
heredocs
for electric-pair-mode:
[0001-Propertize-heredocs-in-elixir-ts-mode.patch (text/x-patch, attachment)]
[0002-Handle-electric-heredocs-pairs-in-elixir-ts-mode.patch (text/x-patch, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#62536
; Package
emacs
.
(Mon, 03 Apr 2023 09:43:02 GMT)
Full text and
rfc822 format available.
Message #35 received at 62536 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
I tested your new patches and it worked perfectly for me. When can we
merge it so I can remove the hack I added in my configuration? 😄
ps:
We can add `elixir-ts-mode` to `auto-mode-alist` by:
```elisp
(add-to-list 'auto-mode-alist
'("\\(\\.elixir\\|\\.exs?\\|mix\\.lock\\)\\'"
. elixir-ts-mode))
```
It might be redundant to write `add-to-list` 4 times, and other
major-modes are added to `auto-mode-alist` by writing `add-to-list`
just once.
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#62536
; Package
emacs
.
(Mon, 03 Apr 2023 10:40:02 GMT)
Full text and
rfc822 format available.
Message #38 received at submit <at> debbugs.gnu.org (full text, mbox):
> I tested your new patches and it worked perfectly for me. When
> can we
> merge it so I can remove the hack I added in my configuration? 😄
>
Great, happy that worked. Now we wait for Eli or someone to apply
the path on master if all is in order :).
> ps:
>
> We can add `elixir-ts-mode` to `auto-mode-alist` by:
>
> ```elisp
> (add-to-list 'auto-mode-alist
> '("\\(\\.elixir\\|\\.exs?\\|mix\\.lock\\)\\'"
> . elixir-ts-mode))
> ```
>
> It might be redundant to write `add-to-list` 4 times, and other
> major-modes are added to `auto-mode-alist` by writing
> `add-to-list`
> just once.
It makes sense, but don't want to just change this for the sake of
changing if it is working as is.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#62536
; Package
emacs
.
(Mon, 03 Apr 2023 10:40:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#62536
; Package
emacs
.
(Mon, 03 Apr 2023 12:03:02 GMT)
Full text and
rfc822 format available.
Message #44 received at 62536 <at> debbugs.gnu.org (full text, mbox):
As the author of most of elec-pair.el, I wanted to
chime in to say that it can be worth checking if this
newline-inserting, indent-inserting functionality isn't
already covered by one of
electric-pair-open-newline-between-pairs
electric-indent-mode
electric-layout-mode and its electric-layout-rules
which would be generally preferable to adding custom psif's
to post-self-insert-hook.
CCint the expert Stefan here.
João
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#62536
; Package
emacs
.
(Mon, 03 Apr 2023 12:19:02 GMT)
Full text and
rfc822 format available.
Message #47 received at 62536 <at> debbugs.gnu.org (full text, mbox):
João Távora <joaotavora <at> gmail.com> writes:
> As the author of most of elec-pair.el, I wanted to
> chime in to say that it can be worth checking if this
> newline-inserting, indent-inserting functionality isn't
> already covered by one of
>
> electric-pair-open-newline-between-pairs
> electric-indent-mode
> electric-layout-mode and its electric-layout-rules
>
> which would be generally preferable to adding custom psif's
> to post-self-insert-hook.
Hi, thanks for chiming in. I will have a closer look to see if
there is a more elegant solution and hopefully we can avoid adding
a
custom psif.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#62536
; Package
emacs
.
(Mon, 03 Apr 2023 14:03:02 GMT)
Full text and
rfc822 format available.
Message #50 received at 62536 <at> debbugs.gnu.org (full text, mbox):
> Cc: "62536 <at> debbugs.gnu.org" <62536 <at> debbugs.gnu.org>
> From: Wilhelm Kirschbaum <wkirschbaum <at> gmail.com>
> Date: Mon, 03 Apr 2023 10:26:59 +0200
>
> These two patches should then be sufficient to better handle
> heredocs for electric-pair-mode:
Do these replace the two previous ones you posted? Or are they in
addition to them?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#62536
; Package
emacs
.
(Mon, 03 Apr 2023 14:19:01 GMT)
Full text and
rfc822 format available.
Message #53 received at 62536 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Mon, 3 Apr 2023, 16:02 Eli Zaretskii, <eliz <at> gnu.org> wrote:
> > Cc: "62536 <at> debbugs.gnu.org" <62536 <at> debbugs.gnu.org>
> > From: Wilhelm Kirschbaum <wkirschbaum <at> gmail.com>
> > Date: Mon, 03 Apr 2023 10:26:59 +0200
> >
> > These two patches should then be sufficient to better handle
> > heredocs for electric-pair-mode:
>
> Do these replace the two previous ones you posted? Or are they in
> addition to them?
>
Sorry, they replace the previous two.
>
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#62536
; Package
emacs
.
(Mon, 03 Apr 2023 14:39:01 GMT)
Full text and
rfc822 format available.
Message #56 received at 62536 <at> debbugs.gnu.org (full text, mbox):
> From: Wilhelm Kirschbaum <wkirschbaum <at> gmail.com>
> Date: Mon, 3 Apr 2023 16:17:51 +0200
> Cc: 牟 桐 <mou.tong <at> outlook.com>, 62536 <at> debbugs.gnu.org
>
> On Mon, 3 Apr 2023, 16:02 Eli Zaretskii, <eliz <at> gnu.org> wrote:
>
> > Cc: "62536 <at> debbugs.gnu.org" <62536 <at> debbugs.gnu.org>
> > From: Wilhelm Kirschbaum <wkirschbaum <at> gmail.com>
> > Date: Mon, 03 Apr 2023 10:26:59 +0200
> >
> > These two patches should then be sufficient to better handle
> > heredocs for electric-pair-mode:
>
> Do these replace the two previous ones you posted? Or are they in
> addition to them?
>
> Sorry, they replace the previous two.
OK, but I understand you are still considering a better way to solve
this? So I should not yet install the last patches?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#62536
; Package
emacs
.
(Tue, 04 Apr 2023 05:43:01 GMT)
Full text and
rfc822 format available.
Message #59 received at 62536 <at> debbugs.gnu.org (full text, mbox):
>> From: Wilhelm Kirschbaum <wkirschbaum <at> gmail.com>
>> Date: Mon, 3 Apr 2023 16:17:51 +0200
>> Cc: 牟 桐 <mou.tong <at> outlook.com>, 62536 <at> debbugs.gnu.org
>>
>> On Mon, 3 Apr 2023, 16:02 Eli Zaretskii, <eliz <at> gnu.org> wrote:
>>
>> > Cc: "62536 <at> debbugs.gnu.org" <62536 <at> debbugs.gnu.org>
>> > From: Wilhelm Kirschbaum <wkirschbaum <at> gmail.com>
>> > Date: Mon, 03 Apr 2023 10:26:59 +0200
>> >
>> > These two patches should then be sufficient to better handle
>> > heredocs for electric-pair-mode:
>>
>> Do these replace the two previous ones you posted? Or are
>> they in
>> addition to them?
>>
>> Sorry, they replace the previous two.
>
> OK, but I understand you are still considering a better way to
> solve
> this? So I should not yet install the last patches?
I had a look and don't see how without changing elec-pair.el that
there
is a more elegant way to do this. I am happy with the current
patches
to be installed and then perhaps if there is a better way we can
apply
it to both python-mode and elixir-ts-mode later.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#62536
; Package
emacs
.
(Tue, 04 Apr 2023 09:09:01 GMT)
Full text and
rfc822 format available.
Message #62 received at 62536 <at> debbugs.gnu.org (full text, mbox):
On Tue, Apr 4, 2023 at 6:43 AM Wilhelm Kirschbaum <wkirschbaum <at> gmail.com> wrote:
>
> >> From: Wilhelm Kirschbaum <wkirschbaum <at> gmail.com>
> >> Date: Mon, 3 Apr 2023 16:17:51 +0200
> >> Cc: 牟 桐 <mou.tong <at> outlook.com>, 62536 <at> debbugs.gnu.org
> >>
> >> On Mon, 3 Apr 2023, 16:02 Eli Zaretskii, <eliz <at> gnu.org> wrote:
> >>
> >> > Cc: "62536 <at> debbugs.gnu.org" <62536 <at> debbugs.gnu.org>
> >> > From: Wilhelm Kirschbaum <wkirschbaum <at> gmail.com>
> >> > Date: Mon, 03 Apr 2023 10:26:59 +0200
> >> >
> >> > These two patches should then be sufficient to better handle
> >> > heredocs for electric-pair-mode:
> >>
> >> Do these replace the two previous ones you posted? Or are
> >> they in
> >> addition to them?
> >>
> >> Sorry, they replace the previous two.
> >
> > OK, but I understand you are still considering a better way to
> > solve
> > this? So I should not yet install the last patches?
>
> I had a look and don't see how without changing elec-pair.el that
> there
> is a more elegant way to do this. I am happy with the current
> patches
> to be installed and then perhaps if there is a better way we can
> apply
> it to both python-mode and elixir-ts-mode later.
It seems what you are trying to do is actually a functionality
of electric-layout-mode, right? It's creating newlines between
two sets of '"""' so that if the user types one newline between
them, then one extra newline is inserted after and the line is
indented one level deeper than the '"""'.
If so, it would seem like 'electric-layout-rules' would be a good
match. The behaviour would happen _only_ if the user has
electric-layout-mode, which is the standard Emacs mode for
controlling this kind of electricity. The last paragraph
of the docstring of 'electric-layout-rules' seems to describe
a powerful enough mechanism to do achieve what the custom
psif does.
João
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#62536
; Package
emacs
.
(Tue, 04 Apr 2023 18:13:01 GMT)
Full text and
rfc822 format available.
Message #65 received at 62536 <at> debbugs.gnu.org (full text, mbox):
Hi João,
>>
>> I had a look and don't see how without changing elec-pair.el
>> that
>> there
>> is a more elegant way to do this. I am happy with the current
>> patches
>> to be installed and then perhaps if there is a better way we
>> can
>> apply
>> it to both python-mode and elixir-ts-mode later.
>
> It seems what you are trying to do is actually a functionality
> of electric-layout-mode, right? It's creating newlines between
> two sets of '"""' so that if the user types one newline between
> them, then one extra newline is inserted after and the line is
> indented one level deeper than the '"""'.
>
> If so, it would seem like 'electric-layout-rules' would be a
> good
> match. The behaviour would happen _only_ if the user has
> electric-layout-mode, which is the standard Emacs mode for
> controlling this kind of electricity. The last paragraph
> of the docstring of 'electric-layout-rules' seems to describe
> a powerful enough mechanism to do achieve what the custom
> psif does.
>
> João
The custom psif is not for the newline, but for pairing up the
triple
quotes `"""` with another set of tripe quotes when
electric-pair-mode is
enabled. The newline is for keeping the syntax valid in elixir,
otherwise the font and navigation breaks because `""""""` is not
valid
Elixir syntax and the tree-sitter grammar really does not like it.
Unless electric-indent-chars can identify the triple quotes, we
need a
custom psif regardless of other functionality, but I don't see
this
option. Maybe I am wrong and you can point me to this feature?
If it does not make sense to add the newline as this might not be
expected behaviour when electric-layout-mode is not enabled, we
can add
a check before inserting the newline? I don't know if many people
using
elixir-ts-mode will know about the electric layout mode and might
get annoyed with
electric-pair-mode for heredocs ( tripple quote pairs ).
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#62536
; Package
emacs
.
(Tue, 04 Apr 2023 18:40:02 GMT)
Full text and
rfc822 format available.
Message #68 received at 62536 <at> debbugs.gnu.org (full text, mbox):
On Tue, Apr 4, 2023 at 7:12 PM Wilhelm Kirschbaum <wkirschbaum <at> gmail.com> wrote:
> The custom psif is not for the newline, but for pairing up the
> triple
> quotes `"""` with another set of tripe quotes when
> electric-pair-mode is
> enabled. The newline is for keeping the syntax valid in elixir,
> otherwise the font and navigation breaks because `""""""` is not
> valid
> Elixir syntax and the tree-sitter grammar really does not like it.
I see. My apologies for not having noticed this in the preceding
emails. If you want some kind of electricity so that typing the
third `"` results in two `"` and a newline getting added, then
that is completely new and probably does require a custom psif.
If that's _not_ what is meant, read on. Else skip to last
paragraph.
> Unless electric-indent-chars can identify the triple quotes, we
> need a
> custom psif regardless of other functionality, but I don't see
> this
> option. Maybe I am wrong and you can point me to this feature?
Here, you'd not want electric-indent-chars, right? If you're
dealing with the necessity of electrically adding a newline
to maintain syntax correctness, you're looking for
electric-layout-mode and electric-layout-rules, not
electric-indent.
And in electric-layout-rules you _can_, I think, identify
triple quotes using a function as described in the last
paragraph of its docstring.
> If it does not make sense to add the newline as this might not be
> expected behaviour when electric-layout-mode is not enabled, we
> can add
> a check before inserting the newline?
Sure, but I'd say just use electric-layout-rules in that case.
> I don't know if many people
> using
> elixir-ts-mode will know about the electric layout mode and might
> get annoyed with
> electric-pair-mode for heredocs ( tripple quote pairs ).
But your suggestion to check for electric-layout-mode in the
custom psif leads to same situation, right?
You can choose to turn on electric-layout-mode by default
locally in elixir-ts-mode if you want to give your users this sane
behaviour by default.
Like other electric-* modes, it's a mode that helps maintain
the buffer valid (for some meaning of "valid"). Just like without
electric-pair-mode you type a '{' and the buffer is syntactically
invalid until you fix it. The "annoyance" can be solved by
turning it on, unless it's on already.
Anyway, I just wanted to call attention to these existing
facilities in Emacs that were designed to help out major-mode
authors so that ad-hoc solutions aren't replicated again
and again, making maintenance difficult. But, then again,
I understand that the facilities might not be as powerful
as I and Stefan (mostly Stefan, really) intended. Here, my
naive understanding of the matter tells me they are, but
if I'm wrong and using the custom psif gets the job done,
then don't take my suggestion as a blocker, especially if all
your patches are ready and good to go. We can always come
back to this later.
João
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#62536
; Package
emacs
.
(Tue, 04 Apr 2023 19:36:03 GMT)
Full text and
rfc822 format available.
Message #71 received at 62536 <at> debbugs.gnu.org (full text, mbox):
> On Tue, Apr 4, 2023 at 7:12 PM Wilhelm Kirschbaum
> <wkirschbaum <at> gmail.com> wrote:
>
>> The custom psif is not for the newline, but for pairing up the
>> triple
>> quotes `"""` with another set of tripe quotes when
>> electric-pair-mode is
>> enabled. The newline is for keeping the syntax valid in
>> elixir,
>> otherwise the font and navigation breaks because `""""""` is
>> not
>> valid
>> Elixir syntax and the tree-sitter grammar really does not like
>> it.
>
> I see. My apologies for not having noticed this in the
> preceding
> emails. If you want some kind of electricity so that typing the
> third `"` results in two `"` and a newline getting added, then
> that is completely new and probably does require a custom psif.
>
> If that's _not_ what is meant, read on. Else skip to last
> paragraph.
>
>> Unless electric-indent-chars can identify the triple quotes, we
>> need a
>> custom psif regardless of other functionality, but I don't see
>> this
>> option. Maybe I am wrong and you can point me to this feature?
>
> Here, you'd not want electric-indent-chars, right? If you're
> dealing with the necessity of electrically adding a newline
> to maintain syntax correctness, you're looking for
> electric-layout-mode and electric-layout-rules, not
> electric-indent.
>
Right, makes sense.
> And in electric-layout-rules you _can_, I think, identify
> triple quotes using a function as described in the last
> paragraph of its docstring.
>
Yes, I tested this earlier and it does work.
>> If it does not make sense to add the newline as this might not
>> be
>> expected behaviour when electric-layout-mode is not enabled, we
>> can add
>> a check before inserting the newline?
>
> Sure, but I'd say just use electric-layout-rules in that case.
>
You convinced me :)
> You can choose to turn on electric-layout-mode by default
> locally in elixir-ts-mode if you want to give your users this
> sane
> behaviour by default.
>
Is that a good idea? I have not used electric-pair-mode or
electric-layout-mode enough to know how this impacts the workflow.
> Like other electric-* modes, it's a mode that helps maintain
> the buffer valid (for some meaning of "valid"). Just like
> without
> electric-pair-mode you type a '{' and the buffer is
> syntactically
> invalid until you fix it. The "annoyance" can be solved by
> turning it on, unless it's on already.
>
> Anyway, I just wanted to call attention to these existing
> facilities in Emacs that were designed to help out major-mode
> authors so that ad-hoc solutions aren't replicated again
> and again, making maintenance difficult. But, then again,
> I understand that the facilities might not be as powerful
> as I and Stefan (mostly Stefan, really) intended. Here, my
> naive understanding of the matter tells me they are, but
> if I'm wrong and using the custom psif gets the job done,
> then don't take my suggestion as a blocker, especially if all
> your patches are ready and good to go. We can always come
> back to this later.
>
> João
Thanks for doing so, I am relatively new to hacking on Emacs, so
appreciate the feedback.
Is there perhaps a way we can allow a similar function for
electric-pair
as with electric-layout to identify more than just the last typed
char?
This will mean that we can entirely get rid of custom psifs and
think it
will be useful in at least 1 more mode.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#62536
; Package
emacs
.
(Tue, 04 Apr 2023 19:57:02 GMT)
Full text and
rfc822 format available.
Message #74 received at 62536 <at> debbugs.gnu.org (full text, mbox):
>> On Tue, Apr 4, 2023 at 7:12 PM Wilhelm Kirschbaum
>> <wkirschbaum <at> gmail.com> wrote:
>>
>>> The custom psif is not for the newline, but for pairing up the
>>> triple
>>> quotes `"""` with another set of tripe quotes when
>>> electric-pair-mode is
>>> enabled. The newline is for keeping the syntax valid in
>>> elixir,
>>> otherwise the font and navigation breaks because `""""""` is
>>> not
>>> valid
>>> Elixir syntax and the tree-sitter grammar really does not like
>>> it.
>>
>> I see. My apologies for not having noticed this in the
>> preceding
>> emails. If you want some kind of electricity so that typing
>> the
>> third `"` results in two `"` and a newline getting added, then
>> that is completely new and probably does require a custom psif.
>>
Just to clarify on the desired behaviour:
With `|` is (point):
When typing the first quote `"|` it pairs to be `"|"` as single
quote
strings are valid in Elixir. Then when typing the second `"` it
skips
the second quote `""|`, now when typing the third quote `""|"` it
pairs
the heredoc: `"""|"""` and with electric-layout it will now insert
the
newlines: `"""\n|\n"""`.
This means, as the original report, the user can type
`@doc """|` and will correctly jump into the heredoc and
tree-sitter
grammar will stay valid.
@doc """
|
"""
There is no scenario in Elixir I can thin of where this is not the
desired behaviour.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#62536
; Package
emacs
.
(Tue, 04 Apr 2023 20:35:02 GMT)
Full text and
rfc822 format available.
Message #77 received at 62536 <at> debbugs.gnu.org (full text, mbox):
>> And in electric-layout-rules you _can_, I think, identify
>> triple quotes using a function as described in the last
>> paragraph of its docstring.
>>
> Yes, I tested this earlier and it does work.
>
Even though it works, it does not play nice with the custom psif,
because the layout rules seems to trigger before the hook.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#62536
; Package
emacs
.
(Wed, 05 Apr 2023 13:08:01 GMT)
Full text and
rfc822 format available.
Message #80 received at 62536 <at> debbugs.gnu.org (full text, mbox):
On Tue, Apr 4, 2023 at 9:34 PM Wilhelm Kirschbaum <wkirschbaum <at> gmail.com> wrote:
>
>
> >> And in electric-layout-rules you _can_, I think, identify
> >> triple quotes using a function as described in the last
> >> paragraph of its docstring.
> >>
> > Yes, I tested this earlier and it does work.
> >
>
> Even though it works, it does not play nice with the custom psif,
> because the layout rules seems to trigger before the hook.
You should be able to adjust the order of the functions
in post-self-insert-hook. The core psifs of electric-pair-mode,
electric-indent-mode and electric-layout-mode coordinate their
action in this way, as it's very common to reach situations
as you describe. Use a numeric third argument to add-hook
to coordinate. Assume that the numbers you see in elec-pair.el
and electric.el for the core psifs will be relatively unchanged.
If you have the latest code you're testing, I can help you test,
as I've just installed the tree-sitter grammar for elixir-ts-mode
and it seems to be working.
João
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#62536
; Package
emacs
.
(Wed, 05 Apr 2023 14:32:02 GMT)
Full text and
rfc822 format available.
Message #83 received at 62536 <at> debbugs.gnu.org (full text, mbox):
Wilhelm Kirschbaum <wkirschbaum <at> gmail.com> writes:
>>> And in electric-layout-rules you _can_, I think, identify
>>> triple quotes using a function as described in the last
>>> paragraph of its docstring.
>>>
>> Yes, I tested this earlier and it does work.
>>
>
> Even though it works, it does not play nice with the custom psif,
> because the layout rules seems to trigger before the hook.
There could yet be a snag here, which I didn't anticipate, which is that
rules in electric-layout-rules do not trigger if inside strings or
comments, and that is hardcoded.
Let's assume we got rid of the snag or had some mechanism to override
it:
diff --git a/lisp/electric.el b/lisp/electric.el
index bac3f5a2b3c..cef5326852c 100644
--- a/lisp/electric.el
+++ b/lisp/electric.el
@@ -409,9 +409,7 @@ electric-layout-post-self-insert-function-1
(goto-char pos)
(funcall probe last-command-event))))
(when res (throw 'done res))))))))))
- (when (and rule
- ;; Not in a string or comment.
- (not (nth 8 (save-excursion (syntax-ppss pos)))))
+ (when rule
(goto-char pos)
(when (functionp rule) (setq rule (funcall rule)))
(dolist (sym (if (symbolp rule) (list rule) rule))
Then, the following simple patch seems to have good results in my tests.
(defun joaot/looking-back-at-exactly-three-quotes-p ()
(looking-back "\\(\\`\\|[^\"]\\)\"\"\"" (- (point) 4)))
(defun joaot/triple-quotes ()
(when (and (eq ?\" last-command-event)
(joaot/looking-back-at-exactly-three-quotes-p))
(save-excursion (insert "\"\"\"" ))))
(defun joaot/layout-after-triple-quotes (inserted)
(when (and (eq inserted ?\") (joaot/looking-back-at-exactly-three-quotes-p))
'(after-stay after)))
(defun joaot/setup-elixir-electricity ()
(electric-layout-local-mode 1)
(electric-pair-local-mode 1)
(electric-indent-local-mode 1)
(add-hook 'post-self-insert-hook 'joaot/super-quotes-and-newlines -05 t)
(setq-local electric-layout-rules
(list #'joaot/layout-after-triple-quotes)))
(add-hook 'elixir-ts-mode-hook 'joaot/setup-elixir-electricity)
João
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#62536
; Package
emacs
.
(Wed, 05 Apr 2023 17:39:02 GMT)
Full text and
rfc822 format available.
Message #86 received at 62536 <at> debbugs.gnu.org (full text, mbox):
> Wilhelm Kirschbaum <wkirschbaum <at> gmail.com> writes:
>
>>>> And in electric-layout-rules you _can_, I think, identify
>>>> triple quotes using a function as described in the last
>>>> paragraph of its docstring.
>>>>
>>> Yes, I tested this earlier and it does work.
>>>
>>
>> Even though it works, it does not play nice with the custom
>> psif,
>> because the layout rules seems to trigger before the hook.
>
> There could yet be a snag here, which I didn't anticipate, which
> is that
> rules in electric-layout-rules do not trigger if inside strings
> or
> comments, and that is hardcoded.
>
> Let's assume we got rid of the snag or had some mechanism to
> override
> it:
>
> diff --git a/lisp/electric.el b/lisp/electric.el
> index bac3f5a2b3c..cef5326852c 100644
> --- a/lisp/electric.el
> +++ b/lisp/electric.el
> @@ -409,9 +409,7 @@
> electric-layout-post-self-insert-function-1
> (goto-char pos)
> (funcall probe
> last-command-event))))
> (when res (throw 'done
> res))))))))))
> - (when (and rule
> - ;; Not in a string or comment.
> - (not (nth 8 (save-excursion (syntax-ppss
> pos)))))
> + (when rule
> (goto-char pos)
> (when (functionp rule) (setq rule (funcall rule)))
> (dolist (sym (if (symbolp rule) (list rule) rule))
>
>
> Then, the following simple patch seems to have good results in
> my tests.
>
> (defun joaot/looking-back-at-exactly-three-quotes-p ()
> (looking-back "\\(\\`\\|[^\"]\\)\"\"\"" (- (point) 4)))
>
> (defun joaot/triple-quotes ()
> (when (and (eq ?\" last-command-event)
> (joaot/looking-back-at-exactly-three-quotes-p))
> (save-excursion (insert "\"\"\"" ))))
>
> (defun joaot/layout-after-triple-quotes (inserted)
> (when (and (eq inserted ?\")
> (joaot/looking-back-at-exactly-three-quotes-p))
> '(after-stay after)))
>
> (defun joaot/setup-elixir-electricity ()
> (electric-layout-local-mode 1)
> (electric-pair-local-mode 1)
> (electric-indent-local-mode 1)
> (add-hook 'post-self-insert-hook
> 'joaot/super-quotes-and-newlines -05 t)
> (setq-local electric-layout-rules
> (list #'joaot/layout-after-triple-quotes)))
>
> (add-hook 'elixir-ts-mode-hook
> 'joaot/setup-elixir-electricity)
>
> João
Thanks, yes. I think this brings us closer. For some more fun,
and the
other part of the issue I have not mentioned is this scenario:
```elixir
def foo() do
~H"""
<foo class=
"""
end
```
then completing `class=""` jumps into the end of the template ,
which is
pretty annoying, more so that the current issue at hand.
The other patch in this thread will porpertize the `"""` as
`$` for a lack of a better syntax class, which then breaks it
again and
produces:
```
"""
|"
"""
```
the highlight the propertize function change:
@ -550,6 +552,22 @@ elixir-ts--defun-name
(_ nil))))
(_ nil)))
+(defvar elixir-ts--syntax-propertize-query
+ (when (treesit-available-p)
+ (treesit-query-compile
+ 'elixir
+ '(((["\"\"\""] @quoted-text))))))
+
+(defun elixir-ts--syntax-propertize (start end)
+ "Apply syntax text properties between START and END for
`elixir-ts-mode'."
+ (let ((captures
+ (treesit-query-capture 'elixir
elixir-ts--syntax-propertize-query start end)))
+ (pcase-dolist (`(,name . ,node) captures)
+ (pcase-exhaustive name
+ ('quoted-text
+ (put-text-property (1- (treesit-node-end node))
(treesit-node-end node)
+ 'syntax-table (string-to-syntax
"$")))))))
+
;;;###autoload
(define-derived-mode elixir-ts-mode prog-mode "Elixir"
"Major mode for editing Elixir, powered by tree-sitter."
@@ -630,7 +648,8 @@ elixir-ts-mode
( elixir-sigil elixir-string-escape
elixir-string-interpolation ))))
- (treesit-major-mode-setup)))
+ (treesit-major-mode-setup)
+ (setq-local syntax-propertize-function
#'elixir-ts--syntax-propertize)))
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#62536
; Package
emacs
.
(Thu, 06 Apr 2023 00:16:02 GMT)
Full text and
rfc822 format available.
Message #89 received at 62536 <at> debbugs.gnu.org (full text, mbox):
Wilhelm Kirschbaum <wkirschbaum <at> gmail.com> writes:
> Thanks, yes. I think this brings us closer.
Yes, though keep in mind that needs that patch to lisp/electric.el, or
some other mechanism that allows electric-layout-mode to happen in
strings or coments. If this mechanism is needed, I don't think it is a
lot of work to implement it.
But who knows if the text inside the '""" """' should _not_ be
considered a string or comment class at all?
> For some more fun, and the other part of the issue I have not
> mentioned is this scenario:
>
> ```elixir
> def foo() do
> ~H"""
> <foo class=
> """
> end
> ```
>
> then completing `class=""` jumps into the end of the template , which
> is
> pretty annoying, more so that the current issue at hand.
Ah, I think you want to look at elec-pair's
electric-pair-skip-whitespace (which is a user variable, but you
major-mode could set it to nil) and the function
electric-pair-skip-whitespace-function controlling how whitespace is
skipped.
>
> The other patch in this thread will porpertize the `"""` as
> `$` for a lack of a better syntax class, which then breaks it again
> and
> produces:
>
> ```
> """
> |"
> """
> ```
Maybe that means that the text inside the """ """ no longer is "string
or comment". Can you evaluate `(syntax-ppss)` inside that block
> (define-derived-mode elixir-ts-mode prog-mode "Elixir"
> "Major mode for editing Elixir, powered by tree-sitter."
> @@ -630,7 +648,8 @@ elixir-ts-mode
> ( elixir-sigil elixir-string-escape
> elixir-string-interpolation ))))
>
> - (treesit-major-mode-setup)))
> + (treesit-major-mode-setup)
> + (setq-local syntax-propertize-function
> #'elixir-ts--syntax-propertize)))
I think at this point it would be a good idea for you to push whatever
is the "best" version of your code up to this point to a branch in a Git
repository somewhere, so that I can grab it, test it and try to suggest
simplification based on that. Alternatively, attach patches (but at
least I sometimes get confused when there are multiple patchsets in a
thread).
João
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#62536
; Package
emacs
.
(Thu, 06 Apr 2023 06:00:02 GMT)
Full text and
rfc822 format available.
Message #92 received at 62536 <at> debbugs.gnu.org (full text, mbox):
> Wilhelm Kirschbaum <wkirschbaum <at> gmail.com> writes:
>
>> Thanks, yes. I think this brings us closer.
>
> Yes, though keep in mind that needs that patch to
> lisp/electric.el, or
> some other mechanism that allows electric-layout-mode to happen
> in
> strings or coments. If this mechanism is needed, I don't think
> it is a
> lot of work to implement it.
>
> But who knows if the text inside the '""" """' should _not_ be
> considered a string or comment class at all?
>
I will spend some time in the next couple of days to familiar
myself a
bit more with he electric modes and can hopefully weigh in as
well.
If we can patch electric.el and make this change simpler it is
still
preferable imo.
>> For some more fun, and the other part of the issue I have not
>> mentioned is this scenario:
>>
>> ```elixir
>> def foo() do
>> ~H"""
>> <foo class=
>> """
>> end
>> ```
>>
>> then completing `class=""` jumps into the end of the template ,
>> which
>> is
>> pretty annoying, more so that the current issue at hand.
>
> Ah, I think you want to look at elec-pair's
> electric-pair-skip-whitespace (which is a user variable, but you
> major-mode could set it to nil) and the function
> electric-pair-skip-whitespace-function controlling how
> whitespace is
> skipped.
>
Will try that, thanks.
>>
>> The other patch in this thread will porpertize the `"""` as
>> `$` for a lack of a better syntax class, which then breaks it
>> again
>> and
>> produces:
>>
>> ```
>> """
>> |"
>> """
>> ```
>
> Maybe that means that the text inside the """ """ no longer is
> "string
> or comment". Can you evaluate `(syntax-ppss)` inside that block
>
(syntax-ppss) here is: (0 nil 1 nil nil nil 0 nil nil nil nil)
"""
|
"""
So does not see it as inside a string.
The triple quotes can either be a heredoc or a embedded template
if
prefixed with ~H.
>
> I think at this point it would be a good idea for you to push
> whatever
> is the "best" version of your code up to this point to a branch
> in a Git
> repository somewhere, so that I can grab it, test it and try to
> suggest
> simplification based on that. Alternatively, attach patches
> (but at
> least I sometimes get confused when there are multiple patchsets
> in a
> thread).
>
> João
My current "working" version is here:
https://git.sr.ht/~whk/emacs.
I rebase on there quite often though.
Reply sent
to
Eli Zaretskii <eliz <at> gnu.org>
:
You have taken responsibility.
(Thu, 06 Apr 2023 10:08:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
牟 桐 <mou.tong <at> outlook.com>
:
bug acknowledged by developer.
(Thu, 06 Apr 2023 10:08:01 GMT)
Full text and
rfc822 format available.
Message #97 received at 62536-done <at> debbugs.gnu.org (full text, mbox):
> From: Wilhelm Kirschbaum <wkirschbaum <at> gmail.com>
> Cc: mou.tong <at> outlook.com, 62536 <at> debbugs.gnu.org
> Date: Tue, 04 Apr 2023 07:39:24 +0200
>
> > OK, but I understand you are still considering a better way to
> > solve this? So I should not yet install the last patches?
>
> I had a look and don't see how without changing elec-pair.el that
> there is a more elegant way to do this. I am happy with the current
> patches to be installed and then perhaps if there is a better way we
> can apply it to both python-mode and elixir-ts-mode later.
OK, installed on master, and closing the bug.
Thanks.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 04 May 2023 11:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 years and 48 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.