all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: Philip Kaludercic <philipk@posteo.net>, 50929@debbugs.gnu.org
Subject: bug#50929: Add slurp-sexp and barf-sexp
Date: Sat, 06 Nov 2021 20:53:49 +0200	[thread overview]
Message-ID: <86h7cp3yzi.fsf@mail.linkov.net> (raw)
In-Reply-To: <87o86zmhg5.fsf@gnus.org> (Lars Ingebrigtsen's message of "Fri, 05 Nov 2021 04:04:10 +0100")

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





  reply	other threads:[~2021-11-06 18:53 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-01  7:43 bug#50929: Add slurp-sexp and barf-sexp Philip Kaludercic
2021-10-01  8:12 ` Lars Ingebrigtsen
2021-10-01  8:31   ` Philip Kaludercic
2021-11-05  3:04     ` Lars Ingebrigtsen
2021-11-06 18:53       ` Juri Linkov [this message]
2021-11-08  3:08       ` Richard Stallman
2021-11-08 15:23         ` Philip Kaludercic
2021-11-09 11:38           ` Richard Stallman
2021-11-09 12:13             ` Philip Kaludercic
2021-11-09 16:26               ` bug#50929: [External] : " Drew Adams
2021-11-09 18:44                 ` Philip Kaludercic
2021-11-09 19:15                   ` Drew Adams
2021-11-09 22:17                     ` Drew Adams
2021-11-11  3:39                       ` Richard Stallman
2021-11-14  0:05                     ` Philip Kaludercic
2021-11-14 17:32                       ` Drew Adams
2021-11-09 22:14               ` Rudolf Adamkovič via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-11-11  3:39                 ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86h7cp3yzi.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=50929@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    --cc=philipk@posteo.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.