all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#19526: 24.4; Wrapping text with pairs in electrical-pair-mode
@ 2015-01-07 11:00 Sebastien Vauban
  2015-01-07 15:13 ` Stefan Monnier
  0 siblings, 1 reply; 3+ messages in thread
From: Sebastien Vauban @ 2015-01-07 11:00 UTC (permalink / raw
  To: 19526-ubl+/3LiMTaZdePnXv/OxA

Selecting a region and hitting one "pair" character does not wrap the
selected text with that character.  Instead, it replaces the region by
the typed character.

That's a missing feature, IMHO, if electric-pair-mode is supposed to
replace (part of) smartparens, autopair and/or paredit -- unless you
consider them as completely orthogonal.

Best regards,
  Seb





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

* bug#19526: 24.4; Wrapping text with pairs in electrical-pair-mode
  2015-01-07 11:00 bug#19526: 24.4; Wrapping text with pairs in electrical-pair-mode Sebastien Vauban
@ 2015-01-07 15:13 ` Stefan Monnier
       [not found]   ` <86egr6svng.fsf-hcDgGtZH8xNBDgjK7y7TUQ@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Monnier @ 2015-01-07 15:13 UTC (permalink / raw
  To: Sebastien Vauban; +Cc: 19526

> Selecting a region and hitting one "pair" character does not wrap the
> selected text with that character.

I don't see that here:

   % emacs -Q -f electric-pair-mode
   C-SPC C-b C-b "

wraps the two newlines in ".." for me.


        Stefan





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

* bug#19526: 24.4; Wrapping text with pairs in electrical-pair-mode
       [not found]   ` <86egr6svng.fsf-hcDgGtZH8xNBDgjK7y7TUQ@public.gmane.org>
@ 2015-01-29 15:20     ` Sebastien Vauban
  0 siblings, 0 replies; 3+ messages in thread
From: Sebastien Vauban @ 2015-01-29 15:20 UTC (permalink / raw
  To: Stefan Monnier; +Cc: 19526-ubl+/3LiMTaZdePnXv/OxA

Stefan Monnier wrote:
>  Sebastien Vauban:
>> Selecting a region and hitting one "pair" character does not wrap the
>> selected text with that character.
>
> I don't see that here:
>
>    % emacs -Q -f electric-pair-mode
>    C-SPC C-b C-b "
>
> wraps the two newlines in ".." for me.

I must have changed things over time, as it now works for me as well as
I expect it.  Like what you show as well.  Sorry for the noise.

Now, I've added:

--8<---------------cut here---------------start------------->8---
  (defvar org-electric-pairs
    '((?\* . ?\*)
      (?/ . ?/)
      (?_ . ?_)
      (?= . ?=)
      (?~ . ?~))
    "Electric pairs for Org mode.")     ; See `org-emphasis-alist'.

  (defun org-add-electric-pairs ()
    (setq-local electric-pair-pairs (append electric-pair-pairs org-electric-pairs)))

  (add-hook 'org-mode-hook 'org-add-electric-pairs)
--8<---------------cut here---------------end--------------->8---

to get added support of markers *, /, _, = and ~ in Org mode.  And that
works OK.

Small question regarding the double quotes: would there be a way to
convert them to « | » (instead of "|", where | is the cursor) when
`ispell-local-dictionary' or `ispell-dictionary' is equal to "francais"?

A few hings on how could we implement this in our .emacs (if it's not
foreseen in electric-pair-mode)?

Best regards,
  Seb

-- 
Sebastien Vauban





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

end of thread, other threads:[~2015-01-29 15:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-07 11:00 bug#19526: 24.4; Wrapping text with pairs in electrical-pair-mode Sebastien Vauban
2015-01-07 15:13 ` Stefan Monnier
     [not found]   ` <86egr6svng.fsf-hcDgGtZH8xNBDgjK7y7TUQ@public.gmane.org>
2015-01-29 15:20     ` Sebastien Vauban

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.