From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.devel Subject: [ELPA] Proposing to add express to ELPA Date: Mon, 31 Jul 2023 11:38:27 -0700 Message-ID: <0C0218D1-6C00-4E5A-9E6E-6282F170126A@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.600.7\)) Content-Type: multipart/mixed; boundary="Apple-Mail=_20525690-C959-41E4-BB9D-7A19AF8669CA" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29703"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Jul 31 20:39:27 2023 Return-path: Envelope-to: ged-emacs-devel@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 1qQXnj-0007Zg-C1 for ged-emacs-devel@m.gmane-mx.org; Mon, 31 Jul 2023 20:39:27 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qQXn3-0005Ss-Vp; Mon, 31 Jul 2023 14:38:46 -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 1qQXn2-0005Sd-8k for emacs-devel@gnu.org; Mon, 31 Jul 2023 14:38:44 -0400 Original-Received: from mail-pf1-x430.google.com ([2607:f8b0:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qQXn0-0000K8-LG for emacs-devel@gnu.org; Mon, 31 Jul 2023 14:38:44 -0400 Original-Received: by mail-pf1-x430.google.com with SMTP id d2e1a72fcca58-686f090316dso3171166b3a.2 for ; Mon, 31 Jul 2023 11:38:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690828720; x=1691433520; h=to:date:message-id:subject:mime-version:from:from:to:cc:subject :date:message-id:reply-to; bh=o/pkEXhPio+swVgtshnHjkOkZZquNzJnMbxwtWXqoJE=; b=IZYW/dA3Y1MMR0tCr5GDE7wNoLzscApNeTItsuCRlWZTkQmHgqKTQkfnk5EltK5SyN hh5JWVjJAzsh/JnC0k1BKUdw30+t2U1Wgbkz3vfUhgZfGB04M8gioIbFfbB6SgRI/Rzh /cfwhDy92y1LMfCJiXII1WnrBINIV8khN5Y/2zX6EnnpIRevbLVb37o5Y2WKkx9zzHf5 90jRKDUSLil5kTjSv9+zMaDKUcVGEQo43fXE+JgkphzZg7mDxUzZq9auTdmunLysYsAA kcodN4iGv1QjKQSq5GT0GD1Um7PD4Op2uEI90REOrYObP5L9QpwtVddVGQ620YgvmRlc mN0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690828720; x=1691433520; h=to:date:message-id:subject:mime-version:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=o/pkEXhPio+swVgtshnHjkOkZZquNzJnMbxwtWXqoJE=; b=mHS19NmBddy8QlNQg1v79mI5UBnIY6yUop0qE3FXEVrbXN8f4fdrDxqP6A6S7wnpaJ RAnWcQAUKKFQrvrGIjXilGN4m+sNr3wvJipKe8MnIMnz1oWuGo1nL+lhU2A8GJDHC3IX n9ajsFZiHf4ppMyHA411cMUQtTlmvvf/lXYnCIpnzBEWSHwqtbXgCScZuI0M43F5yAr4 91a7w30wwAofyXAKXKU5uYKIBD2VleHDarZlzV9VpROxRKnq1kcN5zM6JFcUaDcLo3bK z6CrOdfFZw1sECCCaB5twdw0ilWiOxnxGQyIYfFiNvpcNJ55K/oLtfK/LFIKJ5DGhmCN eP9g== X-Gm-Message-State: ABy/qLbbCCNjSxCSYrQehIR34hZItzf0OlqmVYQc857HOBpwJ/mKMMQk w8d/QTGR4KRpjfZ4oVULi5lbVRwfhWg= X-Google-Smtp-Source: APBJJlEngrGIAT2j83j17gj9yUPjn+8afQOC4RlRYxukt1rw5oXhqNPuXDvSN1LW2Ry6/qWC88x4lQ== X-Received: by 2002:a05:6a20:2447:b0:134:2b44:decf with SMTP id t7-20020a056a20244700b001342b44decfmr10684375pzc.21.1690828720341; Mon, 31 Jul 2023 11:38:40 -0700 (PDT) Original-Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id q16-20020a170902dad000b001adf6b21c77sm8892665plx.107.2023.07.31.11.38.39 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 31 Jul 2023 11:38:39 -0700 (PDT) X-Mailer: Apple Mail (2.3731.600.7) Received-SPF: pass client-ip=2607:f8b0:4864:20::430; envelope-from=casouri@gmail.com; helo=mail-pf1-x430.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:308228 Archived-At: --Apple-Mail=_20525690-C959-41E4-BB9D-7A19AF8669CA Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hi all, Since Emacs 29 is now released, I=E2=80=99d like to propose adding = expreg to ELPA. Expreg can be considered a lite version of = expand-region. The notable difference is its use of tree-sitter for = language-specific expansions. I also took the liberty to do things = differently than expand-region, eg, expreg uses a smaller number of = expanders [1]; it is easier to debug when the expansion isn=E2=80=99t = what you expected; and it only provides two functions for expansion and = contraction, and one variable for adding/removing expanders=E2=80=94no = transient maps and other =E2=80=9Csmart=E2=80=9D features, nor different = variables to set for each major mode. The obvious downsides is that, of course, it=E2=80=99s pretty useless on = anything other than lisp if you don=E2=80=99t have tree-sitter grammars = and major mode installed. You can use it in a non-tree-sitter major = mode, as long the tree-sitter grammar exists. You only need to create a = parser and expreg will automatically use the parser [2]. I=E2=80=99ve been using it for months and ironed out all sorts of = edge-cases, and can recommend it for daily usage. You can find the repository here: https://github.com/casouri/expreg And I attached a patch for ELPA. It=E2=80=99s been awhile since I last = made a patch for ELPA, I hope I did it right. [1] Default expanders include: expreg--subword expreg--word expreg--list = expreg--string expreg--treesit expreg--comment expreg--paragraph [2] Something like (add-hook 'xxx-mode-hook (lambda () = (treesit-parser-create 'xxx))) PS. I find it amusing that, among the total 632 LOC, only 17 are = responsible for the tree-sitter support, the main purpose of this = package; all the rest are code dealing with correctly expanding lists, = strings and comments with syntax-ppss. Thanks, Yuan --Apple-Mail=_20525690-C959-41E4-BB9D-7A19AF8669CA Content-Disposition: attachment; filename=expreg.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="expreg.patch" Content-Transfer-Encoding: quoted-printable =46rom=207e201deb71f324e22d31331c06cf3999a105668b=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Yuan=20Fu=20=0ADate:=20Mon,=20= 31=20Jul=202023=2011:14:04=20-0700=0ASubject:=20[PATCH]=20*=20= elpa-packages=20(expreg):=20New=20package.=0A=0A---=0A=20elpa-packages=20= |=201=20+=0A=201=20file=20changed,=201=20insertion(+)=0A=0Adiff=20--git=20= a/elpa-packages=20b/elpa-packages=0Aindex=2048a0ada..e1470d5=20100644=0A= ---=20a/elpa-packages=0A+++=20b/elpa-packages=0A@@=20-292,6=20+292,7=20= @@=0A=20=20=20:doc=20"doc/ess.texi")=0A=20=20(excorporate=09=09:url=20= nil)=0A=20=20(expand-region=09=09:url=20= "https://github.com/magnars/expand-region.el")=0A+=20(expreg=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20:url=20= "https://github.com/casouri/expreg.git")=0A=20=20(external-completion=20=20= =20:core=20"lisp/external-completion.el")=0A=20=20(exwm=09=09=09:url=20= "https://github.com/ch11ng/exwm.git")=0A=20=20(f90-interface-browser=20= :url=20nil)=20;;=20Was=20"https://github.com/wence-/f90-iface"=0A--=20=0A= 2.33.1=0A=0A= --Apple-Mail=_20525690-C959-41E4-BB9D-7A19AF8669CA--