GNU bug report logs - #50929
Add slurp-sexp and barf-sexp

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: wishlist; Reported by: Philip Kaludercic <philipk@HIDDEN>; Keywords: patch wontfix; Done: Lars Ingebrigtsen <larsi@HIDDEN>; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 50929 <at> debbugs.gnu.org:


Received: (at 50929) by debbugs.gnu.org; 6 Nov 2021 19:10:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Nov 06 15:10:35 2021
Received: from localhost ([127.0.0.1]:50703 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mjR5H-0003qq-0H
	for submit <at> debbugs.gnu.org; Sat, 06 Nov 2021 15:10:35 -0400
Received: from relay4-d.mail.gandi.net ([217.70.183.196]:46695)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1mjR5G-0003qQ-9v
 for 50929 <at> debbugs.gnu.org; Sat, 06 Nov 2021 15:10:34 -0400
Received: (Authenticated sender: juri@HIDDEN)
 by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 82D2CE0005;
 Sat,  6 Nov 2021 19:10:27 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
Subject: Re: bug#50929: Add slurp-sexp and barf-sexp
Organization: LINKOV.NET
References: <87czop2nre.fsf@HIDDEN> <871r55w4dg.fsf@HIDDEN>
 <87v92h1708.fsf@HIDDEN> <87o86zmhg5.fsf@HIDDEN>
Date: Sat, 06 Nov 2021 20:53:49 +0200
In-Reply-To: <87o86zmhg5.fsf@HIDDEN> (Lars Ingebrigtsen's message of "Fri,
 05 Nov 2021 04:04:10 +0100")
Message-ID: <86h7cp3yzi.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.3 (/)
X-Debbugs-Envelope-To: 50929
Cc: Philip Kaludercic <philipk@HIDDEN>, 50929 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

>>>> I'd like to suggest adding the command slurp-sexp and barf-sexp to
>>>> lisp.el (perhaps after changing the names). These commands were
>>>> popularized by structural editing packages like Paredit, and allow the
>>>> user to quickly pull or push s-expressions into the current list.
>>>
>>> There's already paredit-forward-slurp-sexp (etc) -- do we need them in
>>> lisp.el, too?
>>
>> Need is a difficult concept: Paredit also has a raise-sexp analogue, so
>> lisp.el doesn't need that either (hence why I added slurp-sexp and
>> barf-sexp right under raise-sexp), beyond the fact that it has already
>> been added to the file.
>
> I rather think that raise-sexp is an indication that these commands do
> not belong in Emacs core -- it seems like raise-sexp was added in 2004,
> but nobody seems to have clamoured for getting a key binding for it,
> which would be unusual if it was a popular command.  (And nobody has
> documented it either, apparently.)

I use raise-sexp all the time bound to 'C-x C-M-u'
with mnemonics of "delete everything except sexp raised by C-M-u".
(I don't know if this will make sense for ‘lisp.el’.)

> My feeling is that these commands are vital for people who do structural
> editing a lot -- but those people use paredit or similar.  People who
> don't really don't think in those terms, so they don't miss the commands.
>
> So my conclusion is that we don't want to add these commands, so I'm
> closing this bug report (but if everybody else feels strongly that Emacs
> should grow a more substantial support for structural Lisp editing, I
> won't protest, but it should be just that -- more substantial, with a
> fuller set of commands (with better names) and an Emacs manual section
> explaining how it all ties together).

Sorry, I don't have an opinion about the proposed new commands:
it seems easier to use mark-sexp/copy/paste for complex structural editing
than to remember all possible list transformation commands with their keybindings.
But more commands could be added if more people will ask for them.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50929; Package emacs. Full text available.
bug closed, send any further explanations to 50929 <at> debbugs.gnu.org and Philip Kaludercic <philipk@HIDDEN> Request was from Lars Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Added tag(s) wontfix. Request was from Lars Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 50929 <at> debbugs.gnu.org:


Received: (at 50929) by debbugs.gnu.org; 5 Nov 2021 03:04:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 04 23:04:24 2021
Received: from localhost ([127.0.0.1]:44151 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mipWi-0003tW-DS
	for submit <at> debbugs.gnu.org; Thu, 04 Nov 2021 23:04:24 -0400
Received: from quimby.gnus.org ([95.216.78.240]:34284)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1mipWg-0003tF-60
 for 50929 <at> debbugs.gnu.org; Thu, 04 Nov 2021 23:04:22 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=3RJob6woIuSRbhAYYubGdTwJ/7/ogXCebZAvu/zpvQc=; b=ZX5uIl2kFSXMm+mJTbzItH/BmH
 ybZpbNQpU17XB8lYWplNlHSovwObLEI5FvoR6EYG/BeEXRQlLbIYRdIa6WlBGxbtEhUVi2VfN3lrJ
 DKXf3nTE5Ir67cHkXuH86UrZUDKff3TazgvPZ51bhCZl4pN+4iQKBZfexo0H3uyEEACM=;
Received: from [84.212.220.105] (helo=elva)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1mipWV-0000Sn-Uw; Fri, 05 Nov 2021 04:04:15 +0100
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Philip Kaludercic <philipk@HIDDEN>
Subject: Re: bug#50929: Add slurp-sexp and barf-sexp
References: <87czop2nre.fsf@HIDDEN> <871r55w4dg.fsf@HIDDEN>
 <87v92h1708.fsf@HIDDEN>
X-Now-Playing: Fairport Convention's _Come All Ye (5)_: "Sloth"
Date: Fri, 05 Nov 2021 04:04:10 +0100
In-Reply-To: <87v92h1708.fsf@HIDDEN> (Philip Kaludercic's message of "Fri, 
 01 Oct 2021 08:31:03 +0000")
Message-ID: <87o86zmhg5.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview: Philip Kaludercic <philipk@HIDDEN> writes: >>> I'd like
 to suggest adding the command slurp-sexp and barf-sexp to >>> lisp.el (perhaps
 after changing the names). These commands were >>> popularized by structural
 editing packages like Paredit, [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 50929
Cc: 50929 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Philip Kaludercic <philipk@HIDDEN> writes:

>>> I'd like to suggest adding the command slurp-sexp and barf-sexp to
>>> lisp.el (perhaps after changing the names). These commands were
>>> popularized by structural editing packages like Paredit, and allow the
>>> user to quickly pull or push s-expressions into the current list.
>>
>> There's already paredit-forward-slurp-sexp (etc) -- do we need them in
>> lisp.el, too?
>
> Need is a difficult concept: Paredit also has a raise-sexp analogue, so
> lisp.el doesn't need that either (hence why I added slurp-sexp and
> barf-sexp right under raise-sexp), beyond the fact that it has already
> been added to the file.

I rather think that raise-sexp is an indication that these commands do
not belong in Emacs core -- it seems like raise-sexp was added in 2004,
but nobody seems to have clamoured for getting a key binding for it,
which would be unusual if it was a popular command.  (And nobody has
documented it either, apparently.)

My feeling is that these commands are vital for people who do structural
editing a lot -- but those people use paredit or similar.  People who
don't really don't think in those terms, so they don't miss the commands.

So my conclusion is that we don't want to add these commands, so I'm
closing this bug report (but if everybody else feels strongly that Emacs
should grow a more substantial support for structural Lisp editing, I
won't protest, but it should be just that -- more substantial, with a
fuller set of commands (with better names) and an Emacs manual section
explaining how it all ties together).

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50929; Package emacs. Full text available.
Severity set to 'wishlist' from 'normal' Request was from Stefan Kangas <stefan@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 50929 <at> debbugs.gnu.org:


Received: (at 50929) by debbugs.gnu.org; 1 Oct 2021 08:31:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Oct 01 04:31:15 2021
Received: from localhost ([127.0.0.1]:54643 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mWDwo-0006PA-RQ
	for submit <at> debbugs.gnu.org; Fri, 01 Oct 2021 04:31:15 -0400
Received: from mout02.posteo.de ([185.67.36.66]:54637)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <philipk@HIDDEN>) id 1mWDwk-0006On-TT
 for 50929 <at> debbugs.gnu.org; Fri, 01 Oct 2021 04:31:13 -0400
Received: from submission (posteo.de [89.146.220.130]) 
 by mout02.posteo.de (Postfix) with ESMTPS id 8E3E2240101
 for <50929 <at> debbugs.gnu.org>; Fri,  1 Oct 2021 10:31:04 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1633077064; bh=ZbcS1WTR3F9l5HBmB7XULtbhK8hAVSR7qloBVPDLa20=;
 h=From:To:Cc:Subject:Autocrypt:Date:From;
 b=c24tL7WC86lM3D6W1u1AFUrNGlvs9HX0J6+aT9FkFToZulW11GUVIZAeGqUrV5lhi
 zZOAcJSHwgtkquqs0WZWAJ2Jnu0zR1FD2NTAN1RkQxIQElQemAErbqnDuhy0h5cnya
 oPAJNZj4qW8wX3UmRFdqXOo5cJJcPsEx/LD6dz3UB7BwDJu/FE6kQxIcg/hXFsngRv
 w04bPjqNl0VkDq2CSL71vo6dwyTeqZZhdkrK1z546UN/X7pnJqLrXAq0OLXrM3xs67
 CTZ5R0eJh1852XoFYD86WJyKIOFxlVzG9Q+47Bq6Sk8jkYb9wcFde1nncV4DEeXy6z
 xj7HvWMNrNKqQ==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4HLNc7414tz9rxN;
 Fri,  1 Oct 2021 10:31:03 +0200 (CEST)
From: Philip Kaludercic <philipk@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
Subject: Re: bug#50929: Add slurp-sexp and barf-sexp
References: <87czop2nre.fsf@HIDDEN> <871r55w4dg.fsf@HIDDEN>
Autocrypt: addr=philipk@HIDDEN; prefer-encrypt=nopreference; keydata=
 mDMEYHHqUhYJKwYBBAHaRw8BAQdAp3GdmYJ6tm5McweY6dEvIYIiry+Oz9rU4MH6NHWK0Ee0QlBo
 aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0
 ZW8ubmV0PoiQBBMWCAA4FiEEDM2H44ZoPt9Ms0eHtVrAHPRh1FwFAmBx6lICGwMFCwkIBwIGFQoJ
 CAsCBBYCAwECHgECF4AACgkQtVrAHPRh1FyTkgEAjlbGPxFchvMbxzAES3r8QLuZgCxeAXunM9gh
 io0ePtUBALVhh9G6wIoZhl0gUCbQpoN/UJHI08Gm1qDob5zDxnIHuDgEYHHqUhIKKwYBBAGXVQEF
 AQEHQNcRB+MUimTMqoxxMMUERpOR+Q4b1KgncDZkhrO2ql1tAwEIB4h4BBgWCAAgFiEEDM2H44Zo
 Pt9Ms0eHtVrAHPRh1FwFAmBx6lICGwwACgkQtVrAHPRh1Fw1JwD/Qo7kvtib8jy7puyWrSv0MeTS
 g8qIxgoRWJE/KKdkCLEA/jb9b9/g8nnX+UcwHf/4VfKsjExlnND3FrBviXUW6NcB
Date: Fri, 01 Oct 2021 08:31:03 +0000
In-Reply-To: <871r55w4dg.fsf@HIDDEN> (Lars Ingebrigtsen's message of "Fri,
 01 Oct 2021 10:12:11 +0200")
Message-ID: <87v92h1708.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 50929
Cc: 50929 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Lars Ingebrigtsen <larsi@HIDDEN> writes:

> Philip Kaludercic <philipk@HIDDEN> writes:
>
>> I'd like to suggest adding the command slurp-sexp and barf-sexp to
>> lisp.el (perhaps after changing the names). These commands were
>> popularized by structural editing packages like Paredit, and allow the
>> user to quickly pull or push s-expressions into the current list.
>
> There's already paredit-forward-slurp-sexp (etc) -- do we need them in
> lisp.el, too?

Need is a difficult concept: Paredit also has a raise-sexp analogue, so
lisp.el doesn't need that either (hence why I added slurp-sexp and
barf-sexp right under raise-sexp), beyond the fact that it has already
been added to the file.

-- 
	Philip Kaludercic




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50929; Package emacs. Full text available.

Message received at 50929 <at> debbugs.gnu.org:


Received: (at 50929) by debbugs.gnu.org; 1 Oct 2021 08:12:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Oct 01 04:12:26 2021
Received: from localhost ([127.0.0.1]:54609 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mWDeb-0005sJ-U6
	for submit <at> debbugs.gnu.org; Fri, 01 Oct 2021 04:12:26 -0400
Received: from quimby.gnus.org ([95.216.78.240]:51350)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1mWDeY-0005s4-4U
 for 50929 <at> debbugs.gnu.org; Fri, 01 Oct 2021 04:12:24 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=DkkgMtJJzd1d35wciYzAlG7113AN3+sB+vI3snbh8PQ=; b=PrKSfC7U0Lsr83gb8U1e1vTqkx
 zBaW+15NCOte+Nc+123l8zeMOvU2HwVhInqoGK/kD8h+CQGxBb5jeilXw/1S0eMKzjmnUEaSbKUwC
 SkroKOrXFgFAXutMaXCKb0PWeIp+kUJfxrRds0W1nyAtl/bsM8qJYkhkmy595tODuL4s=;
Received: from [84.212.220.105] (helo=elva)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1mWDeO-0006q2-BD; Fri, 01 Oct 2021 10:12:15 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Philip Kaludercic <philipk@HIDDEN>
Subject: Re: bug#50929: Add slurp-sexp and barf-sexp
References: <87czop2nre.fsf@HIDDEN>
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAAAXNSR0IArs4c6QAAAAlQTFRF
 0K6PNzEs////OZlX6wAAAAFiS0dEAmYLfGQAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfl
 CgEGJjcHvwXMAAAASElEQVQoz2NgGCYgNBTBZgwNdYBzWENDA+Ac0dBQFyQtoa5YOYwgjgMuTihx
 nBAHJKNDkTmO2J3DGhoigvCCgyjCCyieG9oAACIWFVbu726BAAAAWmVYSWZNTQAqAAAACAAFARIA
 AwAAAAEAAQAAARoABQAAAAEAAABKARsABQAAAAEAAABSASgAAwAAAAEAAgAAAhMAAwAAAAEAAQAA
 AAAAAAAAAEgAAAABAAAASAAAAAEfUvc0AAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIxLTEwLTAxVDA2
 OjM4OjU1KzAwOjAw4LNwDgAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMS0xMC0wMVQwNjozODo1NSsw
 MDowMJHuyLIAAAAXdEVYdGV4aWY6WUNiQ3JQb3NpdGlvbmluZwAxrA+AYwAAADh0RVh0aWNjOmNv
 cHlyaWdodABDb3B5cmlnaHQgKGMpIDE5OTggSGV3bGV0dC1QYWNrYXJkIENvbXBhbnn5V3k3AAAA
 IXRFWHRpY2M6ZGVzY3JpcHRpb24Ac1JHQiBJRUM2MTk2Ni0yLjFXrdpHAAAAJnRFWHRpY2M6bWFu
 dWZhY3R1cmVyAElFQyBodHRwOi8vd3d3LmllYy5jaBx/AEwAAAA3dEVYdGljYzptb2RlbABJRUMg
 NjE5NjYtMi4xIERlZmF1bHQgUkdCIGNvbG91ciBzcGFjZSAtIHNSR0JEU0ipAAAAAElFTkSuQmCC
X-Now-Playing: The Notwist's _Vertigo Dubs Vol. 1: Odd Nosdam_: "Ship (Odd
 Nosdam Remix)"
Date: Fri, 01 Oct 2021 10:12:11 +0200
In-Reply-To: <87czop2nre.fsf@HIDDEN> (Philip Kaludercic's message of "Fri, 
 01 Oct 2021 07:43:49 +0000")
Message-ID: <871r55w4dg.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview:  Philip Kaludercic <philipk@HIDDEN> writes: > I'd like
 to suggest adding the command slurp-sexp and barf-sexp to > lisp.el (perhaps
 after changing the names). These commands were > popularized by structural
 editing packages like Paredit, and al [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 50929
Cc: 50929 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Philip Kaludercic <philipk@HIDDEN> writes:

> I'd like to suggest adding the command slurp-sexp and barf-sexp to
> lisp.el (perhaps after changing the names). These commands were
> popularized by structural editing packages like Paredit, and allow the
> user to quickly pull or push s-expressions into the current list.

There's already paredit-forward-slurp-sexp (etc) -- do we need them in
lisp.el, too?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50929; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 1 Oct 2021 07:44:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Oct 01 03:44:02 2021
Received: from localhost ([127.0.0.1]:54597 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mWDD8-00059g-6t
	for submit <at> debbugs.gnu.org; Fri, 01 Oct 2021 03:44:02 -0400
Received: from lists.gnu.org ([209.51.188.17]:35058)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <philipk@HIDDEN>) id 1mWDD3-00059B-AI
 for submit <at> debbugs.gnu.org; Fri, 01 Oct 2021 03:44:00 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:42218)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <philipk@HIDDEN>)
 id 1mWDD3-0002Mo-2f
 for bug-gnu-emacs@HIDDEN; Fri, 01 Oct 2021 03:43:57 -0400
Received: from mout01.posteo.de ([185.67.36.65]:37711)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <philipk@HIDDEN>)
 id 1mWDCz-0005q9-KA
 for bug-gnu-emacs@HIDDEN; Fri, 01 Oct 2021 03:43:56 -0400
Received: from submission (posteo.de [89.146.220.130]) 
 by mout01.posteo.de (Postfix) with ESMTPS id 3BD79240028
 for <bug-gnu-emacs@HIDDEN>; Fri,  1 Oct 2021 09:43:51 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1633074231; bh=edyTJS3dHgo4ZKtZ32srN7N49PvZRUPja4yFFm84Wcs=;
 h=From:To:Subject:Autocrypt:Date:From;
 b=YVf83ZK3PCwiLIB0+nknCxTbht8fr2YPiIUzwABSDeFyrQPcwqKm3GAAOPZKCzNNM
 fojP+dnZdT83DOkPeXx1piHNdYpRIbePu75h7wNCDGnirviDWnbnbrcEl6bxU+AYMs
 bD4ZoT7DlNDPZ03mbRwrQUIFp+R2ASF26H3j3twYG2+P7jJOWVckTvc0sMHMtH6DQI
 grt4UCEWJl9iNPZXBD57VBOnS0iEuUK9TpI0CdChbqXzZtLMiQoRqxaGe8YS8u47TX
 b94+YX7RGSPJFRFen1GaD0eeXe599SIL5wWroITcyNvRfJAgRGkXa7EzXipdJlX1WA
 9OaYc37nWR61A==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4HLMYf42tZz9rxK
 for <bug-gnu-emacs@HIDDEN>; Fri,  1 Oct 2021 09:43:50 +0200 (CEST)
From: Philip Kaludercic <philipk@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: Add slurp-sexp and barf-sexp
Autocrypt: addr=philipk@HIDDEN; prefer-encrypt=nopreference; keydata=
 mDMEYHHqUhYJKwYBBAHaRw8BAQdAp3GdmYJ6tm5McweY6dEvIYIiry+Oz9rU4MH6NHWK0Ee0QlBo
 aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0
 ZW8ubmV0PoiQBBMWCAA4FiEEDM2H44ZoPt9Ms0eHtVrAHPRh1FwFAmBx6lICGwMFCwkIBwIGFQoJ
 CAsCBBYCAwECHgECF4AACgkQtVrAHPRh1FyTkgEAjlbGPxFchvMbxzAES3r8QLuZgCxeAXunM9gh
 io0ePtUBALVhh9G6wIoZhl0gUCbQpoN/UJHI08Gm1qDob5zDxnIHuDgEYHHqUhIKKwYBBAGXVQEF
 AQEHQNcRB+MUimTMqoxxMMUERpOR+Q4b1KgncDZkhrO2ql1tAwEIB4h4BBgWCAAgFiEEDM2H44Zo
 Pt9Ms0eHtVrAHPRh1FwFAmBx6lICGwwACgkQtVrAHPRh1Fw1JwD/Qo7kvtib8jy7puyWrSv0MeTS
 g8qIxgoRWJE/KKdkCLEA/jb9b9/g8nnX+UcwHf/4VfKsjExlnND3FrBviXUW6NcB
Date: Fri, 01 Oct 2021 07:43:49 +0000
Message-ID: <87czop2nre.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
Received-SPF: pass client-ip=185.67.36.65; envelope-from=philipk@HIDDEN;
 helo=mout01.posteo.de
X-Spam_score_int: -43
X-Spam_score: -4.4
X-Spam_bar: ----
X-Spam_report: (-4.4 / 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,
 RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

--=-=-=
Content-Type: text/plain

Tags: patch


Hi,

I'd like to suggest adding the command slurp-sexp and barf-sexp to
lisp.el (perhaps after changing the names). These commands were
popularized by structural editing packages like Paredit, and allow the
user to quickly pull or push s-expressions into the current list.

In GNU Emacs 28.0.50 (build 5, x86_64-pc-linux-gnu, X toolkit, cairo version 1.16.0, Xaw scroll bars)
 of 2021-09-30 built on icterid
Repository revision: a1789fd67b2dd67d891b6c7181aee885a9ab9447
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12011000
System Description: Debian GNU/Linux 11 (bullseye)

Configured using:
 'configure --with-native-compilation --with-x-toolkit=athena
 'CFLAGS=-Os -march=native -pipe' LDFLAGS=-flto'


--=-=-=
Content-Type: text/patch
Content-Disposition: attachment;
 filename=0001-Add-slurp-sexp-and-barf-sexp.patch

From 90ca9317f524359786f6427f6d5a109abee2211c Mon Sep 17 00:00:00 2001
From: Philip Kaludercic <philipk@HIDDEN>
Date: Fri, 1 Oct 2021 09:25:43 +0200
Subject: [PATCH] Add slurp-sexp and barf-sexp

* lisp.el (slurp-sexp): Add function
(barf-sexp): Add function
---
 lisp/emacs-lisp/lisp.el | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el
index 9b38d86e2c..e49893303c 100644
--- a/lisp/emacs-lisp/lisp.el
+++ b/lisp/emacs-lisp/lisp.el
@@ -867,6 +867,33 @@ raise-sexp
     (delete-region (point) (save-excursion (forward-sexp 1) (point)))
     (save-excursion (insert s))))
 
+(defun slurp-sexp (&optional arg)
+  "Pull the next ARG sexps into the current list."
+  (interactive "p")
+  (save-excursion
+    (up-list 1)
+    (let ((start (point)))
+      (forward-sexp arg)
+      (let ((copy (delete-and-extract-region start (point))))
+        (down-list -1)
+        (insert copy)))
+    (let ((bounds (bounds-of-thing-at-point 'sexp)))
+      (indent-region (car bounds) (cdr bounds)))))
+
+(defun barf-sexp (&optional arg)
+  "Push the last ARG sexps out of the current list."
+  (interactive "p")
+  (save-excursion
+    (up-list 1)
+    (down-list -1)
+    (let ((start (point)))
+      (backward-sexp arg)
+      (let ((copy (delete-and-extract-region (point) start)))
+        (move-past-close-and-reindent)
+        (insert copy)))
+    (let ((bounds (bounds-of-thing-at-point 'sexp)))
+      (indent-region (car bounds) (cdr bounds)))))
+
 (defun move-past-close-and-reindent ()
   "Move past next `)', delete indentation before it, then indent after it."
   (interactive)
-- 
2.30.2


--=-=-=
Content-Type: text/plain


-- 
	Philip K.

--=-=-=--




Acknowledgement sent to Philip Kaludercic <philipk@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#50929; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sat, 6 Nov 2021 19:15:02 UTC

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