Subject: bug#62536: closed (Re: bug#62536: 30.0.50; Can we add """ ... """ electric pair in elixir, just like python)

From: [email-masked] (GNU bug Tracking System)
Date: Thu, 06 Apr 2023 10:08:01 +0000

Your bug report

#62536: 30.0.50; Can we add """ ... """ electric pair in elixir, just like python

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

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

Subject: Re: bug#62536: 30.0.50; Can we add """ ... """ electric pair in elixir, just like python
From: Eli Zaretskii <[email-masked]>
To: Wilhelm Kirschbaum <[email-masked]>
Cc: [email-masked], [email-masked]
Date: Thu, 06 Apr 2023 13:07:34 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

> From: Wilhelm Kirschbaum <[email-masked]>
> Cc: [email-masked], [email-masked]
> 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.

Subject: 30.0.50; Can we add """ ... """ electric pair in elixir, just like python
From: 牟 桐 <[email-masked]>
To: "[email-masked]" <[email-masked]>
Date: Thu, 30 Mar 2023 04:25:07 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

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