* bug#49598: 28.0.50; [Feature Request] Support slurping and barfing operations in lisp-mode
@ 2021-07-16 16:04 Liang-Jie Lee
2021-07-16 20:25 ` Eduardo Ochs
2021-07-17 14:21 ` Lars Ingebrigtsen
0 siblings, 2 replies; 5+ messages in thread
From: Liang-Jie Lee @ 2021-07-16 16:04 UTC (permalink / raw)
To: 49598
Slurping is the operation to expand current S-expression by pulling in
the next outer S-expression, for example (| is cursor):
(foo (bar |baz) abc efg) -> (foo (bar |baz abc) efg)
Barfing is the opposite, contracting the S-expression by pushing out
it's last-most form, for example:
(foo (bar |baz abc) efg) -> (foo (bar |baz) abc efg)
These operations are provided by many third party packages like paredit,
smartparen, lispy, etc. Many people find it useful (especially when
you want to wrap several expressions into a `let` form), so I propose to
have these operations built in.
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#49598: 28.0.50; [Feature Request] Support slurping and barfing operations in lisp-mode
2021-07-16 16:04 bug#49598: 28.0.50; [Feature Request] Support slurping and barfing operations in lisp-mode Liang-Jie Lee
@ 2021-07-16 20:25 ` Eduardo Ochs
2021-07-19 0:06 ` Richard Stallman
2021-07-17 14:21 ` Lars Ingebrigtsen
1 sibling, 1 reply; 5+ messages in thread
From: Eduardo Ochs @ 2021-07-16 20:25 UTC (permalink / raw)
To: Liang-Jie Lee; +Cc: 49598
On Fri, 16 Jul 2021 at 13:14, Liang-Jie Lee <s930054123yaoyao@gmail.com> wrote:
>
>
> Slurping is the operation to expand current S-expression by pulling in
> the next outer S-expression, for example (| is cursor):
>
> (foo (bar |baz) abc efg) -> (foo (bar |baz abc) efg)
>
> Barfing is the opposite, contracting the S-expression by pushing out
> it's last-most form, for example:
>
> (foo (bar |baz abc) efg) -> (foo (bar |baz) abc efg)
>
> These operations are provided by many third party packages like paredit,
> smartparen, lispy, etc. Many people find it useful (especially when
> you want to wrap several expressions into a `let` form), so I propose to
> have these operations built in.
Hint: if you change that to "How do I implement these operations? I am
using the modes such and such to edit Lisp" and send that changed
message to html-gnu-emacs you can have these functionalities in a few
hours or days instead of in a few months...
Cheers,
Eduardo Ochs
http://angg.twu.net/#eev
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#49598: 28.0.50; [Feature Request] Support slurping and barfing operations in lisp-mode
2021-07-16 16:04 bug#49598: 28.0.50; [Feature Request] Support slurping and barfing operations in lisp-mode Liang-Jie Lee
2021-07-16 20:25 ` Eduardo Ochs
@ 2021-07-17 14:21 ` Lars Ingebrigtsen
2021-08-16 12:14 ` Lars Ingebrigtsen
1 sibling, 1 reply; 5+ messages in thread
From: Lars Ingebrigtsen @ 2021-07-17 14:21 UTC (permalink / raw)
To: Liang-Jie Lee; +Cc: 49598
Liang-Jie Lee <s930054123yaoyao@gmail.com> writes:
> Slurping is the operation to expand current S-expression by pulling in
> the next outer S-expression, for example (| is cursor):
>
> (foo (bar |baz) abc efg) -> (foo (bar |baz abc) efg)
>
> Barfing is the opposite, contracting the S-expression by pushing out
> it's last-most form, for example:
>
> (foo (bar |baz abc) efg) -> (foo (bar |baz) abc efg)
I'm not quite sure what the request is here -- to add key bindings for
`paredit-forward-slurp-sexp' and `paredit-forward-barf-sexp' to
`emacs-lisp-mode? (Or `lisp-mode-shared-map', I guess...)
I'm not sure these are commands that are generally used that much to
warrant doing that, and I think people that are really into these things
just enable paredit mode (or something similar).
But I may be wrong in that -- if there's a clamouring for these commands
having a key binding in Lispish modes, I wouldn't be against adding
them. What do the rest of you people think?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#49598: 28.0.50; [Feature Request] Support slurping and barfing operations in lisp-mode
2021-07-17 14:21 ` Lars Ingebrigtsen
@ 2021-08-16 12:14 ` Lars Ingebrigtsen
0 siblings, 0 replies; 5+ messages in thread
From: Lars Ingebrigtsen @ 2021-08-16 12:14 UTC (permalink / raw)
To: Liang-Jie Lee; +Cc: 49598
Lars Ingebrigtsen <larsi@gnus.org> writes:
> I'm not quite sure what the request is here -- to add key bindings for
> `paredit-forward-slurp-sexp' and `paredit-forward-barf-sexp' to
> `emacs-lisp-mode? (Or `lisp-mode-shared-map', I guess...)
>
> I'm not sure these are commands that are generally used that much to
> warrant doing that, and I think people that are really into these things
> just enable paredit mode (or something similar).
>
> But I may be wrong in that -- if there's a clamouring for these commands
> having a key binding in Lispish modes, I wouldn't be against adding
> them. What do the rest of you people think?
Nobody seemed to want to hoist these functions up from paredit, and they
work fine where they are, so I'm closing this bug report.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-08-16 12:14 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-16 16:04 bug#49598: 28.0.50; [Feature Request] Support slurping and barfing operations in lisp-mode Liang-Jie Lee
2021-07-16 20:25 ` Eduardo Ochs
2021-07-19 0:06 ` Richard Stallman
2021-07-17 14:21 ` Lars Ingebrigtsen
2021-08-16 12:14 ` Lars Ingebrigtsen
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).