From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Wilhelm Kirschbaum Newsgroups: gmane.emacs.bugs Subject: bug#62536: 30.0.50; Can we add """ ... """ electric pair in elixir, just like python Date: Tue, 04 Apr 2023 21:46:47 +0200 Message-ID: <87r0szfmke.fsf@gmail.com> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8479"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.9.3; emacs 30.0.50 Cc: Eli Zaretskii , 62536@debbugs.gnu.org, mou.tong@outlook.com To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Apr 04 21:57:25 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 1pjmmS-00021q-F4 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 04 Apr 2023 21:57:24 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pjmmA-0007ng-1Z; Tue, 04 Apr 2023 15:57:06 -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 1pjmm8-0007nW-BP for bug-gnu-emacs@gnu.org; Tue, 04 Apr 2023 15:57:04 -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 1pjmm6-0000M7-TZ for bug-gnu-emacs@gnu.org; Tue, 04 Apr 2023 15:57:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pjmm6-0006Oe-8L for bug-gnu-emacs@gnu.org; Tue, 04 Apr 2023 15:57:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Wilhelm Kirschbaum Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 04 Apr 2023 19:57:02 +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.168063822024580 (code B ref 62536); Tue, 04 Apr 2023 19:57:02 +0000 Original-Received: (at 62536) by debbugs.gnu.org; 4 Apr 2023 19:57:00 +0000 Original-Received: from localhost ([127.0.0.1]:50267 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pjmm4-0006OO-Gk for submit@debbugs.gnu.org; Tue, 04 Apr 2023 15:57:00 -0400 Original-Received: from mail-wm1-f43.google.com ([209.85.128.43]:33727) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pjmm2-0006O7-Md for 62536@debbugs.gnu.org; Tue, 04 Apr 2023 15:56:59 -0400 Original-Received: by mail-wm1-f43.google.com with SMTP id v20-20020a05600c471400b003ed8826253aso1341075wmo.0 for <62536@debbugs.gnu.org>; Tue, 04 Apr 2023 12:56:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680638213; h=content-transfer-encoding:mime-version:message-id:in-reply-to:date :subject:cc:to:from:user-agent:references:from:to:cc:subject:date :message-id:reply-to; bh=2jEKgoR+2G3IJrXbSup+CPFP0itrnTdhOQocvYeMZ8s=; b=L9sjl3qSeFu1aWJ3jiUEQJYoGzmlt5Y7ueY5TKUFWI3vDdX9z0e/hgJsG29r0jlIyl AbHc/VDT33LFUca7BC3EAAaEDBMY4TAx6nOvNcm+O+G7fENMS96VLZHghupcFQ5S0lj9 EOd4PpVrjziundwyvHHer111ZBp4Vz4KYXk5GW0iKf8pY8hc65X8vK77j3Y+RTJ/YFfZ d3QsnWqQi2d968DYoxGIP/5rVHsQ/rSpE+oW6tVw3iHuXSQF+iBgPKNpq4/VS+sgD67m 77mXyHV1LXJ9p7wiDPS9uPMZ+msCVVAzikgaVBFZ08oewUv3UveQQMNdLa0Dd9P6brjI Qndw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680638213; h=content-transfer-encoding:mime-version:message-id:in-reply-to:date :subject:cc:to:from:user-agent:references:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=2jEKgoR+2G3IJrXbSup+CPFP0itrnTdhOQocvYeMZ8s=; b=Lu0NiLECWy8RWAQGueNEcbEtOWU6UaebqQRyCZJ2nrvdMKbKgX5ltDjbS4Ww4MKI6u qPHPszumiWHqVZdGTQmmp1aKL6NjTvggLdpyW7RNO90WKWf7J319Yggs3auH0QHHooV1 JN8Hi8jWxEQodbZpWcMDAYdV/KqLBaGjBbyjmi2D0a7MOeZk8vRdxSLYaoeie6W3CM7o kOiVR/jImlltmi4NgEMxQGQQc8nMtPQ7P87Jd//k9Ss45c4hLa3ayfdphnDECfevjGzO vVMH7/keWeIt4/0THmNEvzynhjZtwdLcwdVaF5N6xM3EJSOfATRVJ7p7YCo2MAK/KaVF ZKQQ== X-Gm-Message-State: AAQBX9fpT19Jb/sPLois83JGWjqCkv110674OJkRLcyJK+IPwbl0gfpI sX0+V245fvnBnEpWMH0ts7w= X-Google-Smtp-Source: AKy350YDfgWoF3o1fVbl7RhnNyAjA+dRI8nfjvaGDK3Sig3MV5YZM/fUNDtCjLBFe8o3KBxLutqAaA== X-Received: by 2002:a05:600c:2243:b0:3ee:4dc0:d4f6 with SMTP id a3-20020a05600c224300b003ee4dc0d4f6mr3024907wmm.17.1680638212737; Tue, 04 Apr 2023 12:56:52 -0700 (PDT) Original-Received: from melissa.local (ec2-13-245-80-249.af-south-1.compute.amazonaws.com. [13.245.80.249]) by smtp.gmail.com with ESMTPSA id g4-20020adffc84000000b002d8566128e5sm12974558wrr.25.2023.04.04.12.56.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Apr 2023 12:56:52 -0700 (PDT) In-reply-to: <87v8ibfnke.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:259239 Archived-At: >> On Tue, Apr 4, 2023 at 7:12=E2=80=AFPM Wilhelm Kirschbaum >> 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=20 >>> elixir, >>> otherwise the font and navigation breaks because `""""""` is=20 >>> not >>> valid >>> Elixir syntax and the tree-sitter grammar really does not like=20 >>> it. >> >> I see. My apologies for not having noticed this in the=20 >> preceding >> emails. If you want some kind of electricity so that typing=20 >> 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=20 quote strings are valid in Elixir. Then when typing the second `"` it=20 skips the second quote `""|`, now when typing the third quote `""|"` it=20 pairs the heredoc: `"""|"""` and with electric-layout it will now insert=20 the newlines: `"""\n|\n"""`. This means, as the original report, the user can type `@doc """|` and will correctly jump into the heredoc and=20 tree-sitter grammar will stay valid. @doc """ | """ There is no scenario in Elixir I can thin of where this is not the desired behaviour.