GNU bug report logs - #49598
28.0.50; [Feature Request] Support slurping and barfing operations in lisp-mode

Previous Next

Package: emacs;

Reported by: Liang-Jie Lee <s930054123yaoyao <at> gmail.com>

Date: Fri, 16 Jul 2021 16:14:02 UTC

Severity: wishlist

Tags: moreinfo

Found in version 28.0.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 49598 in the body.
You can then email your comments to 49598 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#49598; Package emacs. (Fri, 16 Jul 2021 16:14:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Liang-Jie Lee <s930054123yaoyao <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 16 Jul 2021 16:14:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Liang-Jie Lee <s930054123yaoyao <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.0.50; [Feature Request] Support slurping and barfing operations
 in lisp-mode
Date: Sat, 17 Jul 2021 00:04:39 +0800
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.






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#49598; Package emacs. (Fri, 16 Jul 2021 20:26:02 GMT) Full text and rfc822 format available.

Message #8 received at 49598 <at> debbugs.gnu.org (full text, mbox):

From: Eduardo Ochs <eduardoochs <at> gmail.com>
To: Liang-Jie Lee <s930054123yaoyao <at> gmail.com>
Cc: 49598 <at> debbugs.gnu.org
Subject: Re: bug#49598: 28.0.50; [Feature Request] Support slurping and
 barfing operations in lisp-mode
Date: Fri, 16 Jul 2021 17:25:12 -0300
On Fri, 16 Jul 2021 at 13:14, Liang-Jie Lee <s930054123yaoyao <at> 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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#49598; Package emacs. (Sat, 17 Jul 2021 14:22:02 GMT) Full text and rfc822 format available.

Message #11 received at 49598 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Liang-Jie Lee <s930054123yaoyao <at> gmail.com>
Cc: 49598 <at> debbugs.gnu.org
Subject: Re: bug#49598: 28.0.50; [Feature Request] Support slurping and
 barfing operations in lisp-mode
Date: Sat, 17 Jul 2021 16:21:05 +0200
Liang-Jie Lee <s930054123yaoyao <at> 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




Added tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 17 Jul 2021 14:22:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#49598; Package emacs. (Mon, 19 Jul 2021 00:07:01 GMT) Full text and rfc822 format available.

Message #16 received at 49598 <at> debbugs.gnu.org (full text, mbox):

From: Richard Stallman <rms <at> gnu.org>
To: Eduardo Ochs <eduardoochs <at> gmail.com>
Cc: 49598 <at> debbugs.gnu.org, s930054123yaoyao <at> gmail.com
Subject: Re: bug#49598: 28.0.50;
 [Feature Request] Support slurping and barfing operations in lisp-mode
Date: Sun, 18 Jul 2021 20:06:13 -0400
[[[ 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. ]]]

Could we please not call it "barfing"?
Perhaps "expelling"?

-- 
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)






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#49598; Package emacs. (Mon, 16 Aug 2021 12:15:01 GMT) Full text and rfc822 format available.

Message #19 received at 49598 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Liang-Jie Lee <s930054123yaoyao <at> gmail.com>
Cc: 49598 <at> debbugs.gnu.org
Subject: Re: bug#49598: 28.0.50; [Feature Request] Support slurping and
 barfing operations in lisp-mode
Date: Mon, 16 Aug 2021 14:14:37 +0200
Lars Ingebrigtsen <larsi <at> 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




bug closed, send any further explanations to 49598 <at> debbugs.gnu.org and Liang-Jie Lee <s930054123yaoyao <at> gmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 16 Aug 2021 12:15:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 14 Sep 2021 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 196 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.