From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Newsgroups: gmane.emacs.bugs Subject: bug#62536: 30.0.50; Can we add """ ... """ electric pair in elixir, just like python Date: Wed, 5 Apr 2023 14:09:34 +0100 Message-ID: References: <83sfdm6bet.fsf@gnu.org> <87edp6oim6.fsf@gmail.com> <87lejay8n3.fsf@gmail.com> <06DAF2C4-C224-4C30-AAAE-96D1A84ED145@outlook.com> <87bkk642k0.fsf@gmail.com> <87edp2vzvg.fsf@gmail.com> <87h6tx74i4.fsf@gmail.com> <83y1n9ukqb.fsf@gnu.org> <83o7o5uj2c.fsf@gnu.org> <871ql06w59.fsf@gmail.com> <87zg7nfrex.fsf@gmail.com> <87v8ibfnke.fsf@gmail.com> <87mt3nfktw.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17730"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , 62536@debbugs.gnu.org, mou.tong@outlook.com To: Wilhelm Kirschbaum Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Apr 05 15:08:15 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pk2s2-0004OS-3S for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 05 Apr 2023 15:08:14 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pk2rs-0004rS-Az; Wed, 05 Apr 2023 09:08:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pk2rq-0004r9-OP for bug-gnu-emacs@gnu.org; Wed, 05 Apr 2023 09:08:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pk2rq-00030W-G2 for bug-gnu-emacs@gnu.org; Wed, 05 Apr 2023 09:08:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pk2rp-0002qI-RV for bug-gnu-emacs@gnu.org; Wed, 05 Apr 2023 09:08:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 05 Apr 2023 13:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62536 X-GNU-PR-Package: emacs Original-Received: via spool by 62536-submit@debbugs.gnu.org id=B62536.168070006910906 (code B ref 62536); Wed, 05 Apr 2023 13:08:01 +0000 Original-Received: (at 62536) by debbugs.gnu.org; 5 Apr 2023 13:07:49 +0000 Original-Received: from localhost ([127.0.0.1]:51718 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pk2rd-0002po-Bg for submit@debbugs.gnu.org; Wed, 05 Apr 2023 09:07:49 -0400 Original-Received: from mail-oa1-f41.google.com ([209.85.160.41]:36413) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pk2rb-0002pZ-IR for 62536@debbugs.gnu.org; Wed, 05 Apr 2023 09:07:47 -0400 Original-Received: by mail-oa1-f41.google.com with SMTP id 586e51a60fabf-17ebba88c60so38334679fac.3 for <62536@debbugs.gnu.org>; Wed, 05 Apr 2023 06:07:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680700062; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=d/MqdF/oRUahI6uCOdwgZ0P49HpGs1ch/DwFLHphCVg=; b=G9iLA1vDWFtEzGojdQ18zauXHNyfK/bJDs3GzcoRFtKdDdJgt23TfsH7YGXukH62uC 2azFE2WDdXwx3DZmOnRYyGwxayFFfLeNy9F/STWKyieIsBFKug5gAzrPzpXoOK2YKzRg ATePCdwuEib04PMWjkCz0g7wiWxaBD2IcAFi7oaVaJQ3j9vl6a8cgn4AiQRGGA+RkqdA K6EaJdwfXb4LkDC4PhOfJ90dIU5o0twxR0pHxFBkYaZck08um6tTZGAwyLCCwTDFHuUf goGX1xmtql6sL77QT+TCo8qdOJrEEUpqamOIOajgdRWdnrcFY43Ra+XZpW9IPKZ7KWUE 8oLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680700062; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=d/MqdF/oRUahI6uCOdwgZ0P49HpGs1ch/DwFLHphCVg=; b=LkVUeGjvzaz9KGlo0M6k+AUxQf2jjrQRy/DbJbspOsg8fDXx4MRGfA6k43Mpd92D+4 bd9L6eWPyKHJgta3F9KKLrVRSppdpX0Sx+YDwFTC6NeMXjZ4kbY/5/GEXQGTJ8ncj4+j RcJYT7Mpp/fK88cLPwjg9WmRtKEaO1sTiQ5ZFgPwPK8q2fej1vrurtdNBBRoSnqXSIwv 1xaYjuWWrxfjYdlCKkeDtxPzbpKXoDMDr/yuZqcBETIZDpbU0V9ZKv1zBjPtNn/0RkLV XE70xI9RgIjC2WT1TRcBXqV3O+9xkkVD/Riio4jz4TsDI0MSN/KQVnHf6BRxVOpCfI9l iiMg== X-Gm-Message-State: AAQBX9fSgqJKlBrF0MARQ38fHrZDOvUaSz/Csf5q2sLyariIZCKfsT7A dca7sZJrCEtaPh7JO5FQ4IudSlV+C/gnjl1ekbY= X-Google-Smtp-Source: AKy350ZFe/sQTzixLT/jaoVnAG6rcu2jD8qjqHOHkkDqnhlfGNlTiOnXDIHm0VnJ0+vihYwlHb/Y5fSahIOBRgdo7Wo= X-Received: by 2002:a05:6871:789:b0:17f:2918:2f46 with SMTP id o9-20020a056871078900b0017f29182f46mr2917650oap.5.1680700061924; Wed, 05 Apr 2023 06:07:41 -0700 (PDT) In-Reply-To: <87mt3nfktw.fsf@gmail.com> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:259265 Archived-At: On Tue, Apr 4, 2023 at 9:34=E2=80=AFPM Wilhelm Kirschbaum 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=C3=A3o