unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* How to delete the parens around a sexp?
@ 2015-09-22  7:40 Marcin Borkowski
  2015-09-22 10:11 ` Nicolas Richard
                   ` (6 more replies)
  0 siblings, 7 replies; 17+ messages in thread
From: Marcin Borkowski @ 2015-09-22  7:40 UTC (permalink / raw)
  To: Help Gnu Emacs mailing list

Hi list,

I'd like to transform this:

-!-(some gibberish)

into this:

-!-some gibberish

I assume there's no function in Elisp for that, and it's trivial to
write one, but I just wanted to make sure before I code it.  raise-sexp
doesn't work, since it gobbles "gibberish" in the above example unless
given a prefix argument, and if you replace "some gibberish" with an
actual sentence, counting words manually is no fun.

(Note: before anyone tells me how such a transformation doesn't make
sense: I need it for writing in a natural language.)

TIA,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: How to delete the parens around a sexp?
       [not found] <mailman.1573.1442907653.19560.help-gnu-emacs@gnu.org>
@ 2015-09-22  8:28 ` Joost Kremers
  2015-09-22  8:38 ` Marco Wahl
  1 sibling, 0 replies; 17+ messages in thread
From: Joost Kremers @ 2015-09-22  8:28 UTC (permalink / raw)
  To: help-gnu-emacs

Marcin Borkowski wrote:
> I'd like to transform this:
>
> -!-(some gibberish)
>
> into this:
>
> -!-some gibberish
>
> I assume there's no function in Elisp for that, and it's trivial to
> write one, but I just wanted to make sure before I code it.  raise-sexp
> doesn't work, since it gobbles "gibberish" in the above example unless
> given a prefix argument, and if you replace "some gibberish" with an
> actual sentence, counting words manually is no fun.
>
> (Note: before anyone tells me how such a transformation doesn't make
> sense: I need it for writing in a natural language.)

Using the smartparens package, sp-splice-sexp-killing-backwards does
that. Consider the following examples (where | indicates point):

(insert (|format "Some string")) ==> (insert |format "Some string")

(insert |(format "Some string")) ==> |(format "Some string")

paredit (and I assume lispy) have similar commands, but they only work
in Lisp modes. smartparens handles any kind of delimiters, also quotes
etc. and can work in non-Lisp modes as well. For example, I can do the
transformations above in the buffer I'm writing this message in, which
has `message-mode` as its major mode. And I use it sometimes to
transform footnotes in LaTeX into normal text.


-- 
Joost Kremers                                   joostkremers@fastmail.fm
Selbst in die Unterwelt dringt durch Spalten Licht
EN:SiS(9)


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: How to delete the parens around a sexp?
       [not found] <mailman.1573.1442907653.19560.help-gnu-emacs@gnu.org>
  2015-09-22  8:28 ` Joost Kremers
@ 2015-09-22  8:38 ` Marco Wahl
  1 sibling, 0 replies; 17+ messages in thread
From: Marco Wahl @ 2015-09-22  8:38 UTC (permalink / raw)
  To: help-gnu-emacs

Hi!

Marcin Borkowski <mbork@mbork.pl> writes:

> Hi list,
>
> I'd like to transform this:
>
> -!-(some gibberish)
>
> into this:
>
> -!-some gibberish
>
> I assume there's no function in Elisp for that, and it's trivial to
> write one, but I just wanted to make sure before I code it.  raise-sexp
> doesn't work, since it gobbles "gibberish" in the above example unless
> given a prefix argument, and if you replace "some gibberish" with an
> actual sentence, counting words manually is no fun.
>
> (Note: before anyone tells me how such a transformation doesn't make
> sense: I need it for writing in a natural language.)
>
> TIA,

Maybe you can use command paredit-splice-sexp from paredit mode.

C-h k M-s in paredit mode yields:

M-s runs the command paredit-splice-sexp (found in paredit-mode-map),
which is an interactive compiled Lisp function in ‘paredit.el’.



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: How to delete the parens around a sexp?
  2015-09-22  7:40 How to delete the parens around a sexp? Marcin Borkowski
@ 2015-09-22 10:11 ` Nicolas Richard
  2015-09-22 11:30   ` Edward Knyshov
  2015-09-22 11:45 ` Rasmus
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 17+ messages in thread
From: Nicolas Richard @ 2015-09-22 10:11 UTC (permalink / raw)
  To: Marcin Borkowski; +Cc: Help Gnu Emacs mailing list

Marcin Borkowski <mbork@mbork.pl> writes:

> Hi list,
>
> I'd like to transform this:
>
> -!-(some gibberish)
>
> into this:
>
> -!-some gibberish

I use the following code, which allows me to delete the brackets (M-D
RET) or replace them by another pair, e.g. square brackets (M-D [).

M-D runs the command yf/replace-or-delete-pair defined as follows:

(defun yf/replace-or-delete-pair (open)
  "Replace pair at point by OPEN and its corresponding closing character.
The closing character is lookup in the syntax table or asked to
the user if not found."
  (interactive
   (list
    (read-char
     (format "Replacing pair %c%c by (or hit RET to delete pair):"
             (char-after)
             (save-excursion
               (forward-sexp 1)
               (char-before))))))
  (if (memq open '(?\n ?\r))
      (delete-pair)
    (let ((close (cdr (aref (syntax-table) open))))
      (when (not close)
        (setq close
              (read-char
               (format "Don't know how to close character %s (#%d) ; please provide a closing character: "
                       (single-key-description open 'no-angles)
                       open))))
      (yf/replace-pair open close))))

(defun yf/replace-pair (open close)
  "Replace pair at point by respective chars OPEN and CLOSE.
If CLOSE is nil, lookup the syntax table. If that fails, signal
an error."
  (let ((close (or close
                   (cdr-safe (aref (syntax-table) open))
                   (error "No matching closing char for character %s (#%d)"
                          (single-key-description open t)
                          open)))
        (parens-require-spaces))
    (insert-pair 1 open close))
  (delete-pair)
  (backward-char 1))

-- 
Nicolas Richard



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: How to delete the parens around a sexp?
  2015-09-22 10:11 ` Nicolas Richard
@ 2015-09-22 11:30   ` Edward Knyshov
  0 siblings, 0 replies; 17+ messages in thread
From: Edward Knyshov @ 2015-09-22 11:30 UTC (permalink / raw)
  To: Nicolas Richard, Marcin Borkowski; +Cc: Help Gnu Emacs mailing list

You may use unwrap-sexp from smartparens

On Tue, Sep 22, 2015, 1:14 PM Nicolas Richard <youngfrog@members.fsf.org>
wrote:

> Marcin Borkowski <mbork@mbork.pl> writes:
>
> > Hi list,
> >
> > I'd like to transform this:
> >
> > -!-(some gibberish)
> >
> > into this:
> >
> > -!-some gibberish
>
> I use the following code, which allows me to delete the brackets (M-D
> RET) or replace them by another pair, e.g. square brackets (M-D [).
>
> M-D runs the command yf/replace-or-delete-pair defined as follows:
>
> (defun yf/replace-or-delete-pair (open)
>   "Replace pair at point by OPEN and its corresponding closing character.
> The closing character is lookup in the syntax table or asked to
> the user if not found."
>   (interactive
>    (list
>     (read-char
>      (format "Replacing pair %c%c by (or hit RET to delete pair):"
>              (char-after)
>              (save-excursion
>                (forward-sexp 1)
>                (char-before))))))
>   (if (memq open '(?\n ?\r))
>       (delete-pair)
>     (let ((close (cdr (aref (syntax-table) open))))
>       (when (not close)
>         (setq close
>               (read-char
>                (format "Don't know how to close character %s (#%d) ;
> please provide a closing character: "
>                        (single-key-description open 'no-angles)
>                        open))))
>       (yf/replace-pair open close))))
>
> (defun yf/replace-pair (open close)
>   "Replace pair at point by respective chars OPEN and CLOSE.
> If CLOSE is nil, lookup the syntax table. If that fails, signal
> an error."
>   (let ((close (or close
>                    (cdr-safe (aref (syntax-table) open))
>                    (error "No matching closing char for character %s (#%d)"
>                           (single-key-description open t)
>                           open)))
>         (parens-require-spaces))
>     (insert-pair 1 open close))
>   (delete-pair)
>   (backward-char 1))
>
> --
> Nicolas Richard
>
>


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: How to delete the parens around a sexp?
  2015-09-22  7:40 How to delete the parens around a sexp? Marcin Borkowski
  2015-09-22 10:11 ` Nicolas Richard
@ 2015-09-22 11:45 ` Rasmus
  2015-09-22 11:54 ` Andreas Röhler
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 17+ messages in thread
From: Rasmus @ 2015-09-22 11:45 UTC (permalink / raw)
  To: help-gnu-emacs

Marcin Borkowski <mbork@mbork.pl> writes:

> Hi list,
>
> I'd like to transform this:
>
> -!-(some gibberish)
>
> into this:
>
> -!-some gibberish

I use "M-s" (paredit-splice-sexp) in paredit when the cursor is inside the
parenthesis.

Rasmus

-- 
History is what should never happen again




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: How to delete the parens around a sexp?
  2015-09-22  7:40 How to delete the parens around a sexp? Marcin Borkowski
  2015-09-22 10:11 ` Nicolas Richard
  2015-09-22 11:45 ` Rasmus
@ 2015-09-22 11:54 ` Andreas Röhler
  2015-09-23  0:49 ` Emanuel Berg
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 17+ messages in thread
From: Andreas Röhler @ 2015-09-22 11:54 UTC (permalink / raw)
  To: help-gnu-emacs


Am 22.09.2015 um 09:40 schrieb Marcin Borkowski:
> Hi list,
>
> I'd like to transform this:
>
> -!-(some gibberish)
>
> into this:
>
> -!-some gibberish
>
> I assume there's no function in Elisp for that, and it's trivial to
> write one, but I just wanted to make sure before I code it.  raise-sexp
> doesn't work, since it gobbles "gibberish" in the above example unless
> given a prefix argument, and if you replace "some gibberish" with an
> actual sentence, counting words manually is no fun.
>
> (Note: before anyone tells me how such a transformation doesn't make
> sense: I need it for writing in a natural language.)
>
> TIA,
>

thing-at-point-utils toolkit

provides

ar-trim-parentized-atpt

ar-trim-delimited-atpt

Works from inside the parentized form to curb.
ar-trim-...  takes any known --customized-- delimiter, i.e. the first found.

https://github.com/andreas-roehler/thing-at-point-utils





^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: How to delete the parens around a sexp?
  2015-09-22  7:40 How to delete the parens around a sexp? Marcin Borkowski
                   ` (2 preceding siblings ...)
  2015-09-22 11:54 ` Andreas Röhler
@ 2015-09-23  0:49 ` Emanuel Berg
  2015-09-23  0:58   ` Emanuel Berg
  2015-09-23  2:15 ` John Mastro
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 17+ messages in thread
From: Emanuel Berg @ 2015-09-23  0:49 UTC (permalink / raw)
  To: help-gnu-emacs

Marcin Borkowski <mbork@mbork.pl> writes:

> I'd like to transform this:
>
> -!-(some gibberish)
>
> into this:
>
> -!-some gibberish
>
> I assume there's no function in Elisp for that, and
> it's trivial to write one

You say "sexp" when you want to delete the parens
around

    (some gibberish)

but place point within the parens and do for example
`forward-sexp' and see that "some" and "gibberish" are
not a unit.

If you want do just delete right and left parens in
natural languages, something like the below
would work.

If you want do delete *matching* pairs in programming,
you would have to do the same, only with
`matching-paren' or so to find out what should
be deleted.

(defun remove-parens ()
  (interactive)
  (let ((start (point))
        (right)
        (left)
        (done) )
    (setq right (re-search-forward ")" nil t) )
    (when right
      (goto-char start)
      (setq left (re-search-backward "(" nil t))
      (when (and right left)
        (goto-char right)
        (delete-char -1)
        (goto-char left)
        (delete-char 1)
        (goto-char (1- start))
        (setq done t) ))
    (unless done (message "No parenthesis pair around point.") )))

-- 
underground experts united
http://user.it.uu.se/~embe8573




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: How to delete the parens around a sexp?
  2015-09-23  0:49 ` Emanuel Berg
@ 2015-09-23  0:58   ` Emanuel Berg
  0 siblings, 0 replies; 17+ messages in thread
From: Emanuel Berg @ 2015-09-23  0:58 UTC (permalink / raw)
  To: help-gnu-emacs

Emanuel Berg <embe8573@student.uu.se> writes:

> If you want do delete *matching* pairs in
> programming, you would have to do the same, only
> with `matching-paren' or so to find out what should
> be deleted.

That doesn't work as `matching-paren' tells what char
matches in general, not the position of the char that
actually matches the other char in the code. OK, then
you can do it manually by searching and counting.
But since you said you don't want this for code I'll
drop the matter.

-- 
underground experts united
http://user.it.uu.se/~embe8573




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: How to delete the parens around a sexp?
  2015-09-22  7:40 How to delete the parens around a sexp? Marcin Borkowski
                   ` (3 preceding siblings ...)
  2015-09-23  0:49 ` Emanuel Berg
@ 2015-09-23  2:15 ` John Mastro
  2015-09-23  3:06   ` Emanuel Berg
  2015-10-19  6:04   ` Marcin Borkowski
  2015-10-18 22:12 ` Thien-Thi Nguyen
       [not found] ` <mailman.588.1445207663.7904.help-gnu-emacs@gnu.org>
  6 siblings, 2 replies; 17+ messages in thread
From: John Mastro @ 2015-09-23  2:15 UTC (permalink / raw)
  To: Help Gnu Emacs mailing list

> I'd like to transform this:
>
> -!-(some gibberish)
>
> into this:
>
> -!-some gibberish
>
> I assume there's no function in Elisp for that, and it's trivial to
> write one, but I just wanted to make sure before I code it.  raise-sexp
> doesn't work, since it gobbles "gibberish" in the above example unless
> given a prefix argument, and if you replace "some gibberish" with an
> actual sentence, counting words manually is no fun.
>
> (Note: before anyone tells me how such a transformation doesn't make
> sense: I need it for writing in a natural language.)

As someone else noted, `sp-unwrap-sexp' (part of the `smartparens'
package) does this. Smartparens is great for bringing some of the joy of
Paredit to non-Lisps [1] so I'd recommend checking it out anyway.

However, if you don't want to depend on a third-party package, something
along these lines might help get you started:

    (defun unwrap-next-sexp ()
      (interactive)
      (let ((close (progn (forward-sexp 1)
                          (point)))
            (open (progn (forward-sexp -1)
                         (point))))
        (goto-char close)
        (delete-char -1)
        (goto-char open)
        (delete-char 1)))

[1] I still prefer Paredit when working with Lisps but plenty of
reasonable people use Smartparens everywhere.

-- 
john



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: How to delete the parens around a sexp?
  2015-09-23  2:15 ` John Mastro
@ 2015-09-23  3:06   ` Emanuel Berg
  2015-10-19  6:04   ` Marcin Borkowski
  1 sibling, 0 replies; 17+ messages in thread
From: Emanuel Berg @ 2015-09-23  3:06 UTC (permalink / raw)
  To: help-gnu-emacs

John Mastro <john.b.mastro@gmail.com> writes:

> However, if you don't want to depend on
> a third-party package, something along these lines
> might help get you started:
>
> (defun unwrap-next-sexp ()
>   (interactive)
>   (let ((close (progn (forward-sexp 1)
>                       (point)))
>         (open (progn (forward-sexp -1)
>                      (point))))
>     (goto-char close)
>     (delete-char -1)
>     (goto-char open)
>     (delete-char 1)))

That is some cool Elisp, especially the `progn's in
the `let' form.

This works for symbolic expressions so you can't have
point in the middle of what should be unwrapped.
Because the OP said natural languages, but also
mentioned sexp's, I suppose this is part of the
solution :)

-- 
underground experts united
http://user.it.uu.se/~embe8573




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: How to delete the parens around a sexp?
  2015-09-22  7:40 How to delete the parens around a sexp? Marcin Borkowski
                   ` (4 preceding siblings ...)
  2015-09-23  2:15 ` John Mastro
@ 2015-10-18 22:12 ` Thien-Thi Nguyen
  2015-10-19  5:59   ` Marcin Borkowski
       [not found] ` <mailman.588.1445207663.7904.help-gnu-emacs@gnu.org>
  6 siblings, 1 reply; 17+ messages in thread
From: Thien-Thi Nguyen @ 2015-10-18 22:12 UTC (permalink / raw)
  To: Marcin Borkowski; +Cc: Help Gnu Emacs mailing list

[-- Attachment #1: Type: text/plain, Size: 501 bytes --]

() Marcin Borkowski <mbork@mbork.pl>
() Tue, 22 Sep 2015 09:40:28 +0200

   I'd like to transform this:

   -!-(some gibberish)

   into this:

   -!-some gibberish

See ‘delete-pair’.

-- 
Thien-Thi Nguyen -----------------------------------------------
  (if you're human and you know it) read my lisp:
    (defun responsep (type via)
      (case type
        (technical (eq 'mailing-list via))
        ...))
---------------------------------------------- GPG key: 4C807502

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: How to delete the parens around a sexp?
       [not found] ` <mailman.588.1445207663.7904.help-gnu-emacs@gnu.org>
@ 2015-10-19  0:49   ` Pascal J. Bourguignon
  2015-10-19  5:59     ` Marcin Borkowski
  0 siblings, 1 reply; 17+ messages in thread
From: Pascal J. Bourguignon @ 2015-10-19  0:49 UTC (permalink / raw)
  To: help-gnu-emacs

Thien-Thi Nguyen <ttn@gnu.org> writes:

> () Marcin Borkowski <mbork@mbork.pl>
> () Tue, 22 Sep 2015 09:40:28 +0200
>
>    I'd like to transform this:
>
>    -!-(some gibberish)
>
>    into this:
>
>    -!-some gibberish
>
> See ‘delete-pair’.

In a sexp, therefore you are using paredit, therefore you type C-f M-s
or C-f M-x paredit-splice-sexp RET

Alternatively, when you're (some gibberish|some good stuff), you can use
M-<up> to get |some good stuff, with the gibberish removed.



-- 
__Pascal Bourguignon__                 http://www.informatimago.com/
“The factory of the future will have only two employees, a man and a
dog. The man will be there to feed the dog. The dog will be there to
keep the man from touching the equipment.” -- Carl Bass CEO Autodesk


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: How to delete the parens around a sexp?
  2015-10-19  0:49   ` Pascal J. Bourguignon
@ 2015-10-19  5:59     ` Marcin Borkowski
  0 siblings, 0 replies; 17+ messages in thread
From: Marcin Borkowski @ 2015-10-19  5:59 UTC (permalink / raw)
  To: Pascal J. Bourguignon; +Cc: help-gnu-emacs


On 2015-10-19, at 02:49, Pascal J. Bourguignon <pjb@informatimago.com> wrote:

> Thien-Thi Nguyen <ttn@gnu.org> writes:
>
>> () Marcin Borkowski <mbork@mbork.pl>
>> () Tue, 22 Sep 2015 09:40:28 +0200
>>
>>    I'd like to transform this:
>>
>>    -!-(some gibberish)
>>
>>    into this:
>>
>>    -!-some gibberish
>>
>> See ‘delete-pair’.
>
> In a sexp, therefore you are using paredit, therefore you type C-f M-s
> or C-f M-x paredit-splice-sexp RET

No, I'm not using paredit.  When I'm editing Elisp, I usually use Lispy
(which is paredit on steroids AFAIK), but this one I need for a /natural
language/.

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: How to delete the parens around a sexp?
  2015-10-18 22:12 ` Thien-Thi Nguyen
@ 2015-10-19  5:59   ` Marcin Borkowski
  0 siblings, 0 replies; 17+ messages in thread
From: Marcin Borkowski @ 2015-10-19  5:59 UTC (permalink / raw)
  To: Thien-Thi Nguyen; +Cc: Help Gnu Emacs mailing list


On 2015-10-19, at 00:12, Thien-Thi Nguyen <ttn@gnu.org> wrote:

> () Marcin Borkowski <mbork@mbork.pl>
> () Tue, 22 Sep 2015 09:40:28 +0200
>
>    I'd like to transform this:
>
>    -!-(some gibberish)
>
>    into this:
>
>    -!-some gibberish
>
> See ‘delete-pair’.

Wow, thanks!

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: How to delete the parens around a sexp?
  2015-09-23  2:15 ` John Mastro
  2015-09-23  3:06   ` Emanuel Berg
@ 2015-10-19  6:04   ` Marcin Borkowski
  2015-10-21 11:23     ` Oleh Krehel
  1 sibling, 1 reply; 17+ messages in thread
From: Marcin Borkowski @ 2015-10-19  6:04 UTC (permalink / raw)
  To: John Mastro; +Cc: Help Gnu Emacs mailing list


On 2015-09-23, at 04:15, John Mastro <john.b.mastro@gmail.com> wrote:

>> I'd like to transform this:
>>
>> -!-(some gibberish)
>>
>> into this:
>>
>> -!-some gibberish
>>
>> I assume there's no function in Elisp for that, and it's trivial to
>> write one, but I just wanted to make sure before I code it.  raise-sexp
>> doesn't work, since it gobbles "gibberish" in the above example unless
>> given a prefix argument, and if you replace "some gibberish" with an
>> actual sentence, counting words manually is no fun.
>>
>> (Note: before anyone tells me how such a transformation doesn't make
>> sense: I need it for writing in a natural language.)
>
> As someone else noted, `sp-unwrap-sexp' (part of the `smartparens'
> package) does this. Smartparens is great for bringing some of the joy of
> Paredit to non-Lisps [1] so I'd recommend checking it out anyway.

Last time I did, it didn't work in my use-case.  Not that it doesn't
work; it is just not smart enough for me;-).  Consider this LaTeX code:

\left\{ ... \bigl\langle ... ( ... ] ... \bigr\rangle ... \right.

(The dot after \right is part of the code.)

> However, if you don't want to depend on a third-party package, something
> along these lines might help get you started:
>
>     (defun unwrap-next-sexp ()
>       (interactive)
>       (let ((close (progn (forward-sexp 1)
>                           (point)))
>             (open (progn (forward-sexp -1)
>                          (point))))
>         (goto-char close)
>         (delete-char -1)
>         (goto-char open)
>         (delete-char 1)))

Nice, better than delete-pair.

> [1] I still prefer Paredit when working with Lisps but plenty of
> reasonable people use Smartparens everywhere.

I didn't try paredit, but - as I wrote a minute ago - Lispy might be
even better due to its cool reuse of self-inserting commands in contexts
they don't make sense anyway.

Regards,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: How to delete the parens around a sexp?
  2015-10-19  6:04   ` Marcin Borkowski
@ 2015-10-21 11:23     ` Oleh Krehel
  0 siblings, 0 replies; 17+ messages in thread
From: Oleh Krehel @ 2015-10-21 11:23 UTC (permalink / raw)
  To: Marcin Borkowski; +Cc: John Mastro, Help Gnu Emacs mailing list

Marcin Borkowski <mbork@mbork.pl> writes:

> I didn't try paredit, but - as I wrote a minute ago - Lispy might be
> even better due to its cool reuse of self-inserting commands in contexts
> they don't make sense anyway.

The command to use is `lispy-splice', bound to "/" in special.  You can
enable `lispy-mode' even in `fundamental-mode' and "/" will still work,
it will only try to re-position the point to get back into special.




^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2015-10-21 11:23 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-22  7:40 How to delete the parens around a sexp? Marcin Borkowski
2015-09-22 10:11 ` Nicolas Richard
2015-09-22 11:30   ` Edward Knyshov
2015-09-22 11:45 ` Rasmus
2015-09-22 11:54 ` Andreas Röhler
2015-09-23  0:49 ` Emanuel Berg
2015-09-23  0:58   ` Emanuel Berg
2015-09-23  2:15 ` John Mastro
2015-09-23  3:06   ` Emanuel Berg
2015-10-19  6:04   ` Marcin Borkowski
2015-10-21 11:23     ` Oleh Krehel
2015-10-18 22:12 ` Thien-Thi Nguyen
2015-10-19  5:59   ` Marcin Borkowski
     [not found] ` <mailman.588.1445207663.7904.help-gnu-emacs@gnu.org>
2015-10-19  0:49   ` Pascal J. Bourguignon
2015-10-19  5:59     ` Marcin Borkowski
     [not found] <mailman.1573.1442907653.19560.help-gnu-emacs@gnu.org>
2015-09-22  8:28 ` Joost Kremers
2015-09-22  8:38 ` Marco Wahl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).