* [ELPA] Proposing to add express to ELPA @ 2023-07-31 18:38 Yuan Fu 2023-08-01 8:07 ` Philip Kaludercic 2023-08-11 17:14 ` Yuan Fu 0 siblings, 2 replies; 17+ messages in thread From: Yuan Fu @ 2023-07-31 18:38 UTC (permalink / raw) To: emacs-devel [-- Attachment #1: Type: text/plain, Size: 1757 bytes --] Hi all, Since Emacs 29 is now released, I’d 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’t what you expected; and it only provides two functions for expansion and contraction, and one variable for adding/removing expanders—no transient maps and other “smart” features, nor different variables to set for each major mode. The obvious downsides is that, of course, it’s pretty useless on anything other than lisp if you don’t 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’ve 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’s 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 [-- Attachment #2: expreg.patch --] [-- Type: application/octet-stream, Size: 813 bytes --] From 7e201deb71f324e22d31331c06cf3999a105668b Mon Sep 17 00:00:00 2001 From: Yuan Fu <casouri@gmail.com> Date: Mon, 31 Jul 2023 11:14:04 -0700 Subject: [PATCH] * elpa-packages (expreg): New package. --- elpa-packages | 1 + 1 file changed, 1 insertion(+) diff --git a/elpa-packages b/elpa-packages index 48a0ada..e1470d5 100644 --- a/elpa-packages +++ b/elpa-packages @@ -292,6 +292,7 @@ :doc "doc/ess.texi") (excorporate :url nil) (expand-region :url "https://github.com/magnars/expand-region.el") + (expreg :url "https://github.com/casouri/expreg.git") (external-completion :core "lisp/external-completion.el") (exwm :url "https://github.com/ch11ng/exwm.git") (f90-interface-browser :url nil) ;; Was "https://github.com/wence-/f90-iface" -- 2.33.1 ^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [ELPA] Proposing to add express to ELPA 2023-07-31 18:38 [ELPA] Proposing to add express to ELPA Yuan Fu @ 2023-08-01 8:07 ` Philip Kaludercic 2023-08-01 19:09 ` Yuan Fu 2023-08-11 17:14 ` Yuan Fu 1 sibling, 1 reply; 17+ messages in thread From: Philip Kaludercic @ 2023-08-01 8:07 UTC (permalink / raw) To: Yuan Fu; +Cc: emacs-devel [-- Attachment #1: Type: text/plain, Size: 1245 bytes --] Yuan Fu <casouri@gmail.com> writes: > Hi all, Hi, > Since Emacs 29 is now released, I’d 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’t what you expected; and it > only provides two functions for expansion and contraction, and one > variable for adding/removing expanders—no transient maps and other > “smart” features, nor different variables to set for each major mode. > > The obvious downsides is that, of course, it’s pretty useless on > anything other than lisp if you don’t 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’ve been using it for months and ironed out all sorts of edge-cases, and can recommend it for daily usage. this looks nice! I have a few comments that might be interesting: [-- Attachment #2: Type: text/plain, Size: 3739 bytes --] diff --git a/expreg.el b/expreg.el index 05459af..2147ce8 100644 --- a/expreg.el +++ b/expreg.el @@ -1,6 +1,6 @@ ;;; expreg.el --- Simple expand region -*- lexical-binding: t; -*- -;; Copyright (C) 2022 Free Software Foundation, Inc. +;; Copyright (C) 2022, 2023 Free Software Foundation, Inc. ;; ;; Author: Yuan Fu <casouri@gmail.com> ;; Maintainer: Yuan Fu <casouri@gmail.com> @@ -79,8 +79,8 @@ (require 'subword) (require 'treesit) (eval-when-compile - (require 'cl-lib) - (require 'seq)) + (require 'cl-lib)) +(require 'seq) ;;; Cutom options and variables @@ -102,9 +102,9 @@ scan-error, like end-of-buffer, or unbalanced parentheses, etc.") (defun expreg--sort-regions (regions) "Sort REGIONS by their span." - (cl-sort regions (lambda (a b) - (< (- (cddr a) (cadr a)) - (- (cddr b) (cadr b)))))) + (sort regions (lambda (a b) + (< (- (cddr a) (cadr a)) + (- (cddr b) (cadr b)))))) (defvar expreg--validation-white-list '(list-at-point) "Regions produced by functions in this list skips filtering.") @@ -166,12 +166,11 @@ ORIG is the current position. Each region is (BEG . END)." ;; OTOH, if there are regions that ends at ORIG, filter out ;; regions that starts AFTER ORIGN, eg, special cases in ;; ‘expreg--list-at-point’. - (setq regions (cl-remove-if - (lambda (region) - (and orig-at-end-of-something - (> (cadr region) orig))) - regions)) - regions)) + (cl-remove-if + (lambda (region) + (and orig-at-end-of-something + (> (cadr region) orig))) + regions))) ;;; Syntax-ppss shorthands @@ -199,7 +198,7 @@ POS defaults to point." ;;; Expand/contract (defvar-local expreg--verbose nil - "If t, print debugging information.") + "Non-nil means print debugging information.") (defvar-local expreg--next-regions nil "The regions we are going to expand to. @@ -209,12 +208,13 @@ This should be a list of (BEG . END).") "The regions we’ve expanded past. This should be a list of (BEG . END).") +;;;###autoload (defun expreg-expand () "Expand region." (interactive) ;; Checking for last-command isn’t strictly necessary, but nice to ;; have. - (when (not (and (region-active-p) + (when (not (and (use-region-p) (eq (region-beginning) (cadr (car expreg--prev-regions))) (eq (region-end) @@ -236,7 +236,7 @@ This should be a list of (BEG . END).") ;; Go past all the regions that are smaller than the current region, ;; if region is active. - (when (region-active-p) + (when (use-region-p) (while (and expreg--next-regions (let ((beg (cadr (car expreg--next-regions))) (end (cddr (car expreg--next-regions)))) @@ -261,8 +261,8 @@ This should be a list of (BEG . END).") (defun expreg-contract () "Contract region." (interactive) - (when (and (region-active-p) - (> (length expreg--prev-regions) 1)) + (when (and (use-region-p) + (length> expreg--prev-regions 1)) (push (pop expreg--prev-regions) expreg--next-regions) (set-mark (cddr (car expreg--prev-regions))) @@ -548,7 +548,7 @@ current string/comment and get lists inside." (defun expreg--comment () "Return a list of regions containing comment." (let ((orig (point)) - (beg (point)) + (beg (point)) ;perhaps use narrowing? (end (point)) result forward-succeeded trailing-comment-p) [-- Attachment #3: Type: text/plain, Size: 1557 bytes --] > You can find the repository here: https://github.com/casouri/expreg > And I attached a patch for ELPA. It’s been awhile since I last made a > patch for ELPA, I hope I did it right. Looks OK. > [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 > > From 7e201deb71f324e22d31331c06cf3999a105668b Mon Sep 17 00:00:00 2001 > From: Yuan Fu <casouri@gmail.com> > Date: Mon, 31 Jul 2023 11:14:04 -0700 > Subject: [PATCH] * elpa-packages (expreg): New package. > > --- > elpa-packages | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/elpa-packages b/elpa-packages > index 48a0ada..e1470d5 100644 > --- a/elpa-packages > +++ b/elpa-packages > @@ -292,6 +292,7 @@ > :doc "doc/ess.texi") > (excorporate :url nil) > (expand-region :url "https://github.com/magnars/expand-region.el") > + (expreg :url "https://github.com/casouri/expreg.git") > (external-completion :core "lisp/external-completion.el") > (exwm :url "https://github.com/ch11ng/exwm.git") > (f90-interface-browser :url nil) ;; Was "https://github.com/wence-/f90-iface" ^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [ELPA] Proposing to add express to ELPA 2023-08-01 8:07 ` Philip Kaludercic @ 2023-08-01 19:09 ` Yuan Fu 0 siblings, 0 replies; 17+ messages in thread From: Yuan Fu @ 2023-08-01 19:09 UTC (permalink / raw) To: Philip Kaludercic; +Cc: emacs-devel > On Aug 1, 2023, at 1:07 AM, Philip Kaludercic <philipk@posteo.net> wrote: > > Yuan Fu <casouri@gmail.com> writes: > >> Hi all, > > Hi, > >> Since Emacs 29 is now released, I’d 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’t what you expected; and it >> only provides two functions for expansion and contraction, and one >> variable for adding/removing expanders—no transient maps and other >> “smart” features, nor different variables to set for each major mode. >> >> The obvious downsides is that, of course, it’s pretty useless on >> anything other than lisp if you don’t 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’ve been using it for months and ironed out all sorts of edge-cases, and can recommend it for daily usage. > > this looks nice! I have a few comments that might be interesting: Thanks for going over it. I incorporated your suggestions. Yuan ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [ELPA] Proposing to add express to ELPA 2023-07-31 18:38 [ELPA] Proposing to add express to ELPA Yuan Fu 2023-08-01 8:07 ` Philip Kaludercic @ 2023-08-11 17:14 ` Yuan Fu 2023-08-11 18:10 ` Emanuel Berg ` (2 more replies) 1 sibling, 3 replies; 17+ messages in thread From: Yuan Fu @ 2023-08-11 17:14 UTC (permalink / raw) To: emacs-devel > On Jul 31, 2023, at 11:38 AM, Yuan Fu <casouri@gmail.com> wrote: > > Hi all, > > Since Emacs 29 is now released, I’d 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’t what you expected; and it only provides two functions for expansion and contraction, and one variable for adding/removing expanders—no transient maps and other “smart” features, nor different variables to set for each major mode. What do you think, guys? Should it be added to ELPA? Yuan ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [ELPA] Proposing to add express to ELPA 2023-08-11 17:14 ` Yuan Fu @ 2023-08-11 18:10 ` Emanuel Berg 2023-08-11 18:14 ` Philip Kaludercic 2023-08-19 5:09 ` Yuan Fu 2 siblings, 0 replies; 17+ messages in thread From: Emanuel Berg @ 2023-08-11 18:10 UTC (permalink / raw) To: emacs-devel Yuan Fu wrote: >> Since Emacs 29 is now released, I’d 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’t what you expected; >> and it only provides two functions for expansion and >> contraction, and one variable for adding/removing >> expanders—no transient maps and other “smart” features, nor >> different variables to set for each major mode. > > What do you think, guys? Should it be added to ELPA? Sure! -- underground experts united https://dataswamp.org/~incal ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [ELPA] Proposing to add express to ELPA 2023-08-11 17:14 ` Yuan Fu 2023-08-11 18:10 ` Emanuel Berg @ 2023-08-11 18:14 ` Philip Kaludercic 2023-08-19 5:09 ` Yuan Fu 2 siblings, 0 replies; 17+ messages in thread From: Philip Kaludercic @ 2023-08-11 18:14 UTC (permalink / raw) To: Yuan Fu; +Cc: emacs-devel Yuan Fu <casouri@gmail.com> writes: >> On Jul 31, 2023, at 11:38 AM, Yuan Fu <casouri@gmail.com> wrote: >> >> Hi all, >> >> Since Emacs 29 is now released, I’d 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’t what you expected; and >> it only provides two functions for expansion and contraction, and >> one variable for adding/removing expanders—no transient maps and >> other “smart” features, nor different variables to set for each >> major mode. > > What do you think, guys? Should it be added to ELPA? I think it would be a nice addition, were there any open objections? > Yuan ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [ELPA] Proposing to add express to ELPA 2023-08-11 17:14 ` Yuan Fu 2023-08-11 18:10 ` Emanuel Berg 2023-08-11 18:14 ` Philip Kaludercic @ 2023-08-19 5:09 ` Yuan Fu 2023-08-19 9:04 ` Philip Kaludercic 2023-08-21 1:10 ` Richard Stallman 2 siblings, 2 replies; 17+ messages in thread From: Yuan Fu @ 2023-08-19 5:09 UTC (permalink / raw) To: emacs-devel > On Aug 11, 2023, at 10:14 AM, Yuan Fu <casouri@gmail.com> wrote: > > > >> On Jul 31, 2023, at 11:38 AM, Yuan Fu <casouri@gmail.com> wrote: >> >> Hi all, >> >> Since Emacs 29 is now released, I’d 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’t what you expected; and it only provides two functions for expansion and contraction, and one variable for adding/removing expanders—no transient maps and other “smart” features, nor different variables to set for each major mode. > > What do you think, guys? Should it be added to ELPA? > > Yuan I think I might have write access to ELPA, so if no one objects and no one adds it to ELPA, I’ll add it later :-) Yuan ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [ELPA] Proposing to add express to ELPA 2023-08-19 5:09 ` Yuan Fu @ 2023-08-19 9:04 ` Philip Kaludercic 2023-08-20 17:07 ` Yuan Fu 2023-08-21 1:10 ` Richard Stallman 1 sibling, 1 reply; 17+ messages in thread From: Philip Kaludercic @ 2023-08-19 9:04 UTC (permalink / raw) To: Yuan Fu; +Cc: emacs-devel Yuan Fu <casouri@gmail.com> writes: >> On Aug 11, 2023, at 10:14 AM, Yuan Fu <casouri@gmail.com> wrote: >> >> >> >>> On Jul 31, 2023, at 11:38 AM, Yuan Fu <casouri@gmail.com> wrote: >>> >>> Hi all, >>> >>> Since Emacs 29 is now released, I’d 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’t what >>> you expected; and it only provides two functions for expansion and >>> contraction, and one variable for adding/removing expanders—no >>> transient maps and other “smart” features, nor different variables >>> to set for each major mode. >> >> What do you think, guys? Should it be added to ELPA? >> >> Yuan > > I think I might have write access to ELPA, so if no one objects and no one adds it to ELPA, I’ll add it later :-) If you have access to emacs.git, you should also have access to elpa.git. Just make sure to test building the package locally before pushing anything. > Yuan ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [ELPA] Proposing to add express to ELPA 2023-08-19 9:04 ` Philip Kaludercic @ 2023-08-20 17:07 ` Yuan Fu 0 siblings, 0 replies; 17+ messages in thread From: Yuan Fu @ 2023-08-20 17:07 UTC (permalink / raw) To: Philip Kaludercic; +Cc: emacs-devel > On Aug 19, 2023, at 2:04 AM, Philip Kaludercic <philipk@posteo.net> wrote: > > Yuan Fu <casouri@gmail.com> writes: > >>> On Aug 11, 2023, at 10:14 AM, Yuan Fu <casouri@gmail.com> wrote: >>> >>> >>> >>>> On Jul 31, 2023, at 11:38 AM, Yuan Fu <casouri@gmail.com> wrote: >>>> >>>> Hi all, >>>> >>>> Since Emacs 29 is now released, I’d 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’t what >>>> you expected; and it only provides two functions for expansion and >>>> contraction, and one variable for adding/removing expanders—no >>>> transient maps and other “smart” features, nor different variables >>>> to set for each major mode. >>> >>> What do you think, guys? Should it be added to ELPA? >>> >>> Yuan >> >> I think I might have write access to ELPA, so if no one objects and no one adds it to ELPA, I’ll add it later :-) > > If you have access to emacs.git, you should also have access to > elpa.git. Just make sure to test building the package locally before > pushing anything. > >> Yuan I pushed expreg to ELPA. Yuan ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [ELPA] Proposing to add express to ELPA 2023-08-19 5:09 ` Yuan Fu 2023-08-19 9:04 ` Philip Kaludercic @ 2023-08-21 1:10 ` Richard Stallman 2023-08-21 4:08 ` Yuan Fu 1 sibling, 1 reply; 17+ messages in thread From: Richard Stallman @ 2023-08-21 1:10 UTC (permalink / raw) To: Yuan Fu; +Cc: emacs-devel [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] Would someone please explain to me what expreg does? I am not against adding it -- if it meets the criteria and people like it, why not? -- but I'd like to know what feature we are adding. However, to "add something to ELPA" is not a coherent proposal, because you need to specify WHICH branch or ELPA. GNU ELPA and NonGNU ELPA have different rules -- we need to know which one we are considering. -- Dr Richard Stallman (https://stallman.org) Chief GNUisance of the GNU Project (https://gnu.org) Founder, Free Software Foundation (https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org) ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [ELPA] Proposing to add express to ELPA 2023-08-21 1:10 ` Richard Stallman @ 2023-08-21 4:08 ` Yuan Fu 2023-08-21 9:04 ` Tassilo Horn 0 siblings, 1 reply; 17+ messages in thread From: Yuan Fu @ 2023-08-21 4:08 UTC (permalink / raw) To: rms; +Cc: emacs-devel > On Aug 20, 2023, at 6:10 PM, Richard Stallman <rms@gnu.org> wrote: > > [[[ To any NSA and FBI agents reading my email: please consider ]]] > [[[ whether defending the US Constitution against all enemies, ]]] > [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > > Would someone please explain to me what expreg does? I am not against > adding it -- if it meets the criteria and people like it, why not? -- > but I'd like to know what feature we are adding. It’s similar to expand-region, where repeatedly pressing a key expands the active region to enclose larger and larger constructs, words, statements, defuns, etc. I guess the selling point is that it’s simpler to configure and supports tree-sitter—weak justifications, but people liked it and requested to have it on ELPA, so I happily followed suit. > > However, to "add something to ELPA" is not a coherent proposal, > because you need to specify WHICH branch or ELPA. GNU ELPA and NonGNU > ELPA have different rules -- we need to know which one we > are considering. I’ve always thought of GNU ELPA as the “default” ELPA, so this is intended for GNU ELPA. Yuan ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [ELPA] Proposing to add express to ELPA 2023-08-21 4:08 ` Yuan Fu @ 2023-08-21 9:04 ` Tassilo Horn 2023-08-21 9:23 ` Tassilo Horn 2023-08-22 1:38 ` Yuan Fu 0 siblings, 2 replies; 17+ messages in thread From: Tassilo Horn @ 2023-08-21 9:04 UTC (permalink / raw) To: Yuan Fu; +Cc: emacs-devel Yuan Fu <casouri@gmail.com> writes: >> Would someone please explain to me what expreg does? I am not >> against adding it -- if it meets the criteria and people like it, why >> not? -- but I'd like to know what feature we are adding. > > It’s similar to expand-region, where repeatedly pressing a key expands > the active region to enclose larger and larger constructs, words, > statements, defuns, etc. I guess the selling point is that it’s > simpler to configure and supports tree-sitter—weak justifications, but > people liked it and requested to have it on ELPA, so I happily > followed suit. I've just tried it and also like it. I've used expand-region in the past but only its basic features so expreg works just as well for me. The only thing which seems missing and so common to justify a default expander is marking a complete sentence in prose text. Right now, it immediately jumps from work to paragraph. Bye, Tassilo ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [ELPA] Proposing to add express to ELPA 2023-08-21 9:04 ` Tassilo Horn @ 2023-08-21 9:23 ` Tassilo Horn 2023-08-22 1:38 ` Yuan Fu 1 sibling, 0 replies; 17+ messages in thread From: Tassilo Horn @ 2023-08-21 9:23 UTC (permalink / raw) Cc: Yuan Fu, emacs-devel Tassilo Horn <tsdh@gnu.org> writes: > I've just tried it and also like it. I've used expand-region in the > past but only its basic features so expreg works just as well for me. > The only thing which seems missing and so common to justify a default > expander is marking a complete sentence in prose text. Right now, it > immediately jumps from work to paragraph. ^^^^ This should have been "word", of course. Bye, Tassilo ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [ELPA] Proposing to add express to ELPA 2023-08-21 9:04 ` Tassilo Horn 2023-08-21 9:23 ` Tassilo Horn @ 2023-08-22 1:38 ` Yuan Fu 2023-08-22 9:56 ` Tassilo Horn 1 sibling, 1 reply; 17+ messages in thread From: Yuan Fu @ 2023-08-22 1:38 UTC (permalink / raw) To: Tassilo Horn; +Cc: emacs-devel > On Aug 21, 2023, at 2:04 AM, Tassilo Horn <tsdh@gnu.org> wrote: > > Yuan Fu <casouri@gmail.com> writes: > >>> Would someone please explain to me what expreg does? I am not >>> against adding it -- if it meets the criteria and people like it, why >>> not? -- but I'd like to know what feature we are adding. >> >> It’s similar to expand-region, where repeatedly pressing a key expands >> the active region to enclose larger and larger constructs, words, >> statements, defuns, etc. I guess the selling point is that it’s >> simpler to configure and supports tree-sitter—weak justifications, but >> people liked it and requested to have it on ELPA, so I happily >> followed suit. > > I've just tried it and also like it. I've used expand-region in the > past but only its basic features so expreg works just as well for me. > The only thing which seems missing and so common to justify a default > expander is marking a complete sentence in prose text. Right now, it > immediately jumps from word to paragraph. I’ve bitten by the sentence expander in expand-region before, so I didn’t add it. Anyway, I just added a sentence expander to expreg, but it’s not enabled by default. You can add expreg—sentence to expreg-functions in text modes yourself. Yuan ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [ELPA] Proposing to add express to ELPA 2023-08-22 1:38 ` Yuan Fu @ 2023-08-22 9:56 ` Tassilo Horn 2023-08-28 7:23 ` Yuan Fu 0 siblings, 1 reply; 17+ messages in thread From: Tassilo Horn @ 2023-08-22 9:56 UTC (permalink / raw) To: Yuan Fu; +Cc: emacs-devel Yuan Fu <casouri@gmail.com> writes: >> The only thing which seems missing and so common to justify a default >> expander is marking a complete sentence in prose text. Right now, it >> immediately jumps from word to paragraph. > > I’ve bitten by the sentence expander in expand-region before, so I > didn’t add it. Anyway, I just added a sentence expander to expreg, > but it’s not enabled by default. You can add expreg—sentence to > expreg-functions in text modes yourself. Thanks! Will you also bump the Version header in order to trigger a new release or should I use the ELPA-devel version for the time being? Bye, Tassilo ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [ELPA] Proposing to add express to ELPA 2023-08-22 9:56 ` Tassilo Horn @ 2023-08-28 7:23 ` Yuan Fu 2023-08-28 7:26 ` Tassilo Horn 0 siblings, 1 reply; 17+ messages in thread From: Yuan Fu @ 2023-08-28 7:23 UTC (permalink / raw) To: Tassilo Horn; +Cc: emacs-devel > On Aug 22, 2023, at 2:56 AM, Tassilo Horn <tsdh@gnu.org> wrote: > > Yuan Fu <casouri@gmail.com> writes: > >>> The only thing which seems missing and so common to justify a default >>> expander is marking a complete sentence in prose text. Right now, it >>> immediately jumps from word to paragraph. >> >> I’ve bitten by the sentence expander in expand-region before, so I >> didn’t add it. Anyway, I just added a sentence expander to expreg, >> but it’s not enabled by default. You can add expreg—sentence to >> expreg-functions in text modes yourself. > > Thanks! Will you also bump the Version header in order to trigger a new > release or should I use the ELPA-devel version for the time being? Sorry, I saw your message and forgot about it! I’ve now pushed a new version. Yuan ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [ELPA] Proposing to add express to ELPA 2023-08-28 7:23 ` Yuan Fu @ 2023-08-28 7:26 ` Tassilo Horn 0 siblings, 0 replies; 17+ messages in thread From: Tassilo Horn @ 2023-08-28 7:26 UTC (permalink / raw) To: Yuan Fu; +Cc: emacs-devel Yuan Fu <casouri@gmail.com> writes: Hi Yuan, >>> I’ve bitten by the sentence expander in expand-region before, so I >>> didn’t add it. Anyway, I just added a sentence expander to expreg, >>> but it’s not enabled by default. You can add expreg—sentence to >>> expreg-functions in text modes yourself. >> >> Thanks! Will you also bump the Version header in order to trigger a new >> release or should I use the ELPA-devel version for the time being? > > Sorry, I saw your message and forgot about it! I’ve now pushed a new > version. Thanks. Better late than never. :-) Bye, Tassilo ^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2023-08-28 7:26 UTC | newest] Thread overview: 17+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2023-07-31 18:38 [ELPA] Proposing to add express to ELPA Yuan Fu 2023-08-01 8:07 ` Philip Kaludercic 2023-08-01 19:09 ` Yuan Fu 2023-08-11 17:14 ` Yuan Fu 2023-08-11 18:10 ` Emanuel Berg 2023-08-11 18:14 ` Philip Kaludercic 2023-08-19 5:09 ` Yuan Fu 2023-08-19 9:04 ` Philip Kaludercic 2023-08-20 17:07 ` Yuan Fu 2023-08-21 1:10 ` Richard Stallman 2023-08-21 4:08 ` Yuan Fu 2023-08-21 9:04 ` Tassilo Horn 2023-08-21 9:23 ` Tassilo Horn 2023-08-22 1:38 ` Yuan Fu 2023-08-22 9:56 ` Tassilo Horn 2023-08-28 7:23 ` Yuan Fu 2023-08-28 7:26 ` Tassilo Horn
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.