From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Simon Law Newsgroups: gmane.emacs.bugs Subject: bug#11520: 24.1.50; delete-selection-mode conflicts with electric-pair-mode Date: Mon, 21 May 2012 00:19:38 -0400 Message-ID: References: <52696FFEBE154517A60576312AEEEE22@us.oracle.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1337574042 25090 80.91.229.3 (21 May 2012 04:20:42 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 21 May 2012 04:20:42 +0000 (UTC) Cc: 11520@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon May 21 06:20:41 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SWK6i-000101-E8 for geb-bug-gnu-emacs@m.gmane.org; Mon, 21 May 2012 06:20:32 +0200 Original-Received: from localhost ([::1]:39420 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SWK6h-000210-PP for geb-bug-gnu-emacs@m.gmane.org; Mon, 21 May 2012 00:20:31 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:51614) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SWK6e-00020u-KK for bug-gnu-emacs@gnu.org; Mon, 21 May 2012 00:20:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SWK6c-0004E7-BX for bug-gnu-emacs@gnu.org; Mon, 21 May 2012 00:20:28 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:54747) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SWK6c-0004E1-8H for bug-gnu-emacs@gnu.org; Mon, 21 May 2012 00:20:26 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SWK7B-0001Ru-Hm for bug-gnu-emacs@gnu.org; Mon, 21 May 2012 00:21:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Simon Law Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 21 May 2012 04:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11520 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 11520-submit@debbugs.gnu.org id=B11520.13375740455542 (code B ref 11520); Mon, 21 May 2012 04:21:01 +0000 Original-Received: (at 11520) by debbugs.gnu.org; 21 May 2012 04:20:45 +0000 Original-Received: from localhost ([127.0.0.1]:36060 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SWK6u-0001RL-MJ for submit@debbugs.gnu.org; Mon, 21 May 2012 00:20:45 -0400 Original-Received: from mail-bk0-f44.google.com ([209.85.214.44]:58204) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SWK6q-0001R6-K0 for 11520@debbugs.gnu.org; Mon, 21 May 2012 00:20:42 -0400 Original-Received: by bkty8 with SMTP id y8so3485968bkt.3 for <11520@debbugs.gnu.org>; Sun, 20 May 2012 21:19:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-originating-ip:in-reply-to:references:from:date :message-id:subject:to:cc:content-type:content-transfer-encoding :x-gm-message-state; bh=hug74sqRvYZn0zRDKVOYUaTsfMV/ChYtre9r0XcZLc8=; b=dxI5GPw9UxkVGsotuDQvrHOHHqUo7VzmFoKB1bN2pUZCxYdXmiwpVOKhe1UidVYM95 +Jnp0GPf4XNsMxAqfW2c9+X6rXeFE7TmjRQG3PxXmgyp3rW5e1AuH1Zf06xBgbjShfG0 6ZSjQUCEV96rSzj3DRiMQxCYEZ3rA85ryUABP8ehYuN1s3kLW6Ne3GNowft7YVMf+IlT TRMuV6Jj9Syu7W8swp1I4eyhriglGa2R7yylKCFvqFf7iF4N0QMJ6Tj4r52J5PVPKZj2 t/ayGUubyeEla6J+aWgkElwYCOPfV56vnFySAvV/5/OV9ftQvKR0JuBVwqDQcdH0tsbs 63/Q== Original-Received: by 10.205.133.13 with SMTP id hw13mr7223020bkc.30.1337573998726; Sun, 20 May 2012 21:19:58 -0700 (PDT) Original-Received: by 10.204.185.208 with HTTP; Sun, 20 May 2012 21:19:38 -0700 (PDT) X-Originating-IP: [76.10.168.90] In-Reply-To: <52696FFEBE154517A60576312AEEEE22@us.oracle.com> X-Gm-Message-State: ALoCoQnUFNF2ZRwNWTfKOrMcCXTMmkiVd1Yqlyz1tjcf9lgXmcF1zwUenkkDGDWzLWDGb+v10NSf X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:60253 Archived-At: On Sun, May 20, 2012 at 12:31 PM, Drew Adams wrote: > But as you say, Stefan, a pre-command approach like d-s knows nothing abo= ut 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. = =C2=A0We could > make `d-s' aware that `e-p' mode is turned on, and we could even try to l= et it > know exactly what `e-p' mode does (not a very modular approach, but perha= ps > doable). > > But knowing that, `d-s' would have to not only test for `self-insert-comm= and' > but also test the character to be inserted. =C2=A0We would end up, I'm af= raid, > duplicating nearly all of the `e-p' logic inside `d-s'. =C2=A0(But perhap= s I don't > understand well what you had in mind.) > > Anyway, that mismatch (pre-command control vs post) is I guess the proble= m 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. --=20 Cheers, Simon -=C2=A0http://ca.linkedin.com/in/sfllaw/