bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#50929: Add slurp-sexp and barf-sexp


From: Juri Linkov
Subject: bug#50929: Add slurp-sexp and barf-sexp
Date: Sat, 06 Nov 2021 20:53:49 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)

>>>> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]