all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Simon Law <sfllaw@sfllaw.ca>
To: Drew Adams <drew.adams@oracle.com>
Cc: 11520@debbugs.gnu.org
Subject: bug#11520: 24.1.50; delete-selection-mode conflicts with electric-pair-mode
Date: Mon, 21 May 2012 00:19:38 -0400	[thread overview]
Message-ID: <CABMJL3+5R=N+BbgiGcZFZ0958qoO8vRTFOMnPj6B-=0q7ykZag@mail.gmail.com> (raw)
In-Reply-To: <52696FFEBE154517A60576312AEEEE22@us.oracle.com>

On Sun, May 20, 2012 at 12:31 PM, Drew Adams <drew.adams@oracle.com> wrote:
> But as you say, Stefan, a pre-command approach like d-s knows nothing about what
> might be expected to happen after the command is done.
>
> It could be possible to let `e-p' know what `d-s' has already done, but I do not
> see how it is possible/practical to let `d-s' know what `e-p' will do.  We could
> make `d-s' aware that `e-p' mode is turned on, and we could even try to let it
> know exactly what `e-p' mode does (not a very modular approach, but perhaps
> doable).
>
> But knowing that, `d-s' would have to not only test for `self-insert-command'
> but also test the character to be inserted.  We would end up, I'm afraid,
> duplicating nearly all of the `e-p' logic inside `d-s'.  (But perhaps I don't
> understand well what you had in mind.)
>
> Anyway, that mismatch (pre-command control vs post) is I guess the problem here.
> If so, it might be seen to be more general than `d-s' vs `e-p'.

It seems to me that delete-selection-mode already knows about four
types of commands: 'yank, 'supercede, 'kill, and non-nil. It looks
like it could take a function, which will inhibit
delete-selection-mode if it returns nil, or return any of the other
commands. This way, electric-pair-mode can register its own behaviour
with delete-selection-mode when it's activated.

-- 
Cheers,
Simon - http://ca.linkedin.com/in/sfllaw/





  reply	other threads:[~2012-05-21  4:19 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-19 20:07 bug#11520: 24.1.50; delete-selection-mode conflicts with electric-pair-mode Simon Law
2012-05-19 22:41 ` bug#11520: Workaround Simon Law
2012-05-20 14:54 ` bug#11520: 24.1.50; delete-selection-mode conflicts with electric-pair-mode Stefan Monnier
2012-05-20 16:31   ` Drew Adams
2012-05-21  4:19     ` Simon Law [this message]
2012-06-11 21:24       ` Simon Law
2012-07-14  5:23 ` Chong Yidong
2012-07-14  6:42   ` Simon Law
2012-07-15 14:39     ` Chong Yidong
2012-07-15 16:33       ` Simon Law
2012-07-18 12:13         ` Stefan Monnier
2012-07-18 13:55           ` Drew Adams
2012-10-08 22:25         ` Stefan Monnier
2012-10-21 23:12           ` Simon Law
2012-10-22 12:46             ` Stefan Monnier
2012-10-23  1:07               ` Simon Law
2012-10-23 15:10                 ` Stefan Monnier
     [not found]                   ` <b47bddfc-e35c-4ab2-8f4f-3e0a51bec33c@default>
2014-08-18 15:21                     ` Stefan Monnier
     [not found]                 ` <<jwvboft8hsz.fsf-monnier+emacs@gnu.org>
2014-07-24 17:34                   ` Drew Adams

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='CABMJL3+5R=N+BbgiGcZFZ0958qoO8vRTFOMnPj6B-=0q7ykZag@mail.gmail.com' \
    --to=sfllaw@sfllaw.ca \
    --cc=11520@debbugs.gnu.org \
    --cc=drew.adams@oracle.com \
    /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.