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: Tue, 4 Apr 2023 10:08:27 +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> 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="20700"; 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 Tue Apr 04 11:09:24 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 1pjcfL-0005C7-70 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 04 Apr 2023 11:09:23 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pjcf2-0006dO-Sr; Tue, 04 Apr 2023 05:09: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 1pjcf1-0006cv-2r for bug-gnu-emacs@gnu.org; Tue, 04 Apr 2023 05:09:03 -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 1pjcf0-0002zC-4U for bug-gnu-emacs@gnu.org; Tue, 04 Apr 2023 05:09:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pjcez-0001Rw-KF for bug-gnu-emacs@gnu.org; Tue, 04 Apr 2023 05:09: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: Tue, 04 Apr 2023 09:09: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.16805993265548 (code B ref 62536); Tue, 04 Apr 2023 09:09:01 +0000 Original-Received: (at 62536) by debbugs.gnu.org; 4 Apr 2023 09:08:46 +0000 Original-Received: from localhost ([127.0.0.1]:46594 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pjcej-0001RQ-KB for submit@debbugs.gnu.org; Tue, 04 Apr 2023 05:08:45 -0400 Original-Received: from mail-oi1-f175.google.com ([209.85.167.175]:37594) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pjcei-0001RD-5B for 62536@debbugs.gnu.org; Tue, 04 Apr 2023 05:08:44 -0400 Original-Received: by mail-oi1-f175.google.com with SMTP id bm2so23756332oib.4 for <62536@debbugs.gnu.org>; Tue, 04 Apr 2023 02:08:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680599318; 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=aHLBRVEv0ZnZlioOluywNMjdHApWBWGEGnjZshSYUYA=; b=I6/h2WfDRotBbL7zoWw50zvvQ/VrpWrYEw9T6KPa4m6VTq2r2TaPos29nrV0GCF7Bh QxEkixqKv+s8FOOYrOEF9QV9ebP9WiiCfIcugQF0YCdLDTncFOUmHByusnPSy0uRRybY kvudSQwSTbzmrgnRfeK9jtilFLBDWCouv97c01TUQJ3GaK0CZBV+KxRJ13XOu5GNE7qx rwRzczIi9vsknxkGorPUwaKsi/tjCuh2zh7tCWjBimKk3jvXOzplFGe2KU1xiK3zv1Tu 1g0VOm95RSU9E8Ds78Negx/Uv809M8fN1yB4hqWEiVGNs4f/o4dC8zlIu9Xw0P1TYwMs 8dCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680599318; 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=aHLBRVEv0ZnZlioOluywNMjdHApWBWGEGnjZshSYUYA=; b=lQ+jJwk+bqqLvxwP8iHFZPrE7TO9wpVy2nRCTyxif+IvLB+9QSUNLRpRXnFZPCoaiz //8hdMhRO+MtxCJtNfNfpJu6e0+G+iGMD/BwzOorCJP6CW2YEAVwEOaexD77ZphYWDIl Xk1dSFRzk/37ByDwCwAGBQXO4OEzQozr8NTDCg1SNQuDighC1lsvR1p4CyO2OL0tFix2 uVaXQxMY4/Khei1Z7aWuQ57EZwlf1LHQr8KGGbVavqyomied3XrCZDBA9qa/VI4SEFac LJzDuDlr1iMvgnp6zKu243uJ+rS3dsJcQIpCZ04PXUoSZ7j3Uk4bIWQQNal/Jhfmdd7R HlfQ== X-Gm-Message-State: AAQBX9fcRsjlad72hLQ0W4eFtb16UQ9hj0OT2ckGAnBMkXvUc+1y8GiL wkCg1v/FHGyvn7BvlNhHx8Hs5I6JyEDonpYm+q0= X-Google-Smtp-Source: AKy350YJEx1ICMD3iHxGW03e7VVbpjAfjoIBuTHgbyselwLs7Jvyy3kpHz9twJwm0gbq3hDNiHIUIj3gmkGfKhXw5rI= X-Received: by 2002:a05:6808:229e:b0:36e:f6f7:bb1a with SMTP id bo30-20020a056808229e00b0036ef6f7bb1amr690768oib.5.1680599318203; Tue, 04 Apr 2023 02:08:38 -0700 (PDT) In-Reply-To: <871ql06w59.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:259223 Archived-At: On Tue, Apr 4, 2023 at 6:43=E2=80=AFAM Wilhelm Kirschbaum wrote: > > >> From: Wilhelm Kirschbaum > >> Date: Mon, 3 Apr 2023 16:17:51 +0200 > >> Cc: =E7=89=9F =E6=A1=90 , 62536@debbugs.gnu.org > >> > >> On Mon, 3 Apr 2023, 16:02 Eli Zaretskii, wrote: > >> > >> > Cc: "62536@debbugs.gnu.org" <62536@debbugs.gnu.org> > >> > From: Wilhelm Kirschbaum > >> > 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=C3=A3o