From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#50929: Add slurp-sexp and barf-sexp Date: Sat, 06 Nov 2021 20:53:49 +0200 Organization: LINKOV.NET Message-ID: <86h7cp3yzi.fsf@mail.linkov.net> References: <87czop2nre.fsf@posteo.net> <871r55w4dg.fsf@gnus.org> <87v92h1708.fsf@posteo.net> <87o86zmhg5.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13746"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) Cc: Philip Kaludercic , 50929@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 06 20:11:16 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1mjR5v-0003Pq-QN for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 06 Nov 2021 20:11:15 +0100 Original-Received: from localhost ([::1]:49578 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mjR5u-0001eN-5V for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 06 Nov 2021 15:11:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59104) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mjR5j-0001Z1-KX for bug-gnu-emacs@gnu.org; Sat, 06 Nov 2021 15:11:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39162) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mjR5j-000519-BV for bug-gnu-emacs@gnu.org; Sat, 06 Nov 2021 15:11:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mjR5j-0003s2-6n for bug-gnu-emacs@gnu.org; Sat, 06 Nov 2021 15:11:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 06 Nov 2021 19:11:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50929 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch wontfix Original-Received: via spool by 50929-submit@debbugs.gnu.org id=B50929.163622583514812 (code B ref 50929); Sat, 06 Nov 2021 19:11:03 +0000 Original-Received: (at 50929) by debbugs.gnu.org; 6 Nov 2021 19:10:35 +0000 Original-Received: from localhost ([127.0.0.1]:50703 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjR5H-0003qq-0H for submit@debbugs.gnu.org; Sat, 06 Nov 2021 15:10:35 -0400 Original-Received: from relay4-d.mail.gandi.net ([217.70.183.196]:46695) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjR5G-0003qQ-9v for 50929@debbugs.gnu.org; Sat, 06 Nov 2021 15:10:34 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 82D2CE0005; Sat, 6 Nov 2021 19:10:27 +0000 (UTC) In-Reply-To: <87o86zmhg5.fsf@gnus.org> (Lars Ingebrigtsen's message of "Fri, 05 Nov 2021 04:04:10 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:219145 Archived-At: >>>> 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.