From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: [PATCH] Make `C-x {' and `C-x }' repeatable Date: Wed, 22 May 2013 16:53:43 -0700 (PDT) Message-ID: References: <87mwrombc3.fsf@mail.jurta.org> <87r4gyondh.fsf@mail.jurta.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1369266843 10828 80.91.229.3 (22 May 2013 23:54:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 22 May 2013 23:54:03 +0000 (UTC) Cc: Juri Linkov , =?iso-8859-1?B?R2F1dGhpZXIg1nN0ZXJ2YWxs?= , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu May 23 01:54:02 2013 Return-path: Envelope-to: ged-emacs-devel@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 1UfIr3-0002Do-Kq for ged-emacs-devel@m.gmane.org; Thu, 23 May 2013 01:54:01 +0200 Original-Received: from localhost ([::1]:43513 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UfIr3-0002d2-9W for ged-emacs-devel@m.gmane.org; Wed, 22 May 2013 19:54:01 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:43192) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UfIqv-0002cv-UA for emacs-devel@gnu.org; Wed, 22 May 2013 19:53:59 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UfIqq-0003tX-3u for emacs-devel@gnu.org; Wed, 22 May 2013 19:53:53 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:50312) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UfIqp-0003tM-Jj for emacs-devel@gnu.org; Wed, 22 May 2013 19:53:47 -0400 Original-Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by userp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r4MNrh2i028406 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 22 May 2013 23:53:44 GMT Original-Received: from userz7021.oracle.com (userz7021.oracle.com [156.151.31.85]) by ucsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r4MNriE3017821 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Wed, 22 May 2013 23:53:45 GMT Original-Received: from abhmt104.oracle.com (abhmt104.oracle.com [141.146.116.56]) by userz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r4MNritl008762; Wed, 22 May 2013 23:53:44 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.7 (607090) [OL 12.0.6668.5000 (x86)] X-Source-IP: ucsinet22.oracle.com [156.151.31.94] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 156.151.31.81 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:159737 Archived-At: > >> But it seems repeat.el can't be used if there are different commands > >> in the key sequence. > > No (i.e., correct), at least not the way I did it. >=20 > Indeed. But I don't think it's a big deal: set-temporary-overlay-map > makes it easy enough that you shouldn't need to use repeat.el > programatically (i.e. repeat.el is only useful as an implementation of > the C-x z command). Fine with me, if the things discussed (e.g., prefix arg passed to all final-key "repetitions" after the prefix key) can be worked out. I agree that, since it lets you define a group of related "repeatable" final keys for the same prefix key, the `set-temporary-overlay-map' approach is more general than what I do with `repeat-command'. But it is a little less convenient for the use case of a singleton group. One good thing might be to have an abbreviation to handle that use case. IOW, a simple way to do what one can do with `repeat-command', avoiding explicitly creating a singleton keymap. Not a big deal; it would be just a little more convenient. There is also the question (assuming a fix that would apply the prefix arg from the prefix key to each repeated final key) of whether using a prefix arg before an individual final key should affect only that key occurrence or all subsequent key hits as well. IOW, should using a prefix arg be modal for the repeated keys that follow i= t (until/unless you use another prefix arg), or should it apply only to the next final-key occurrence? E.g., C-2 C-x a a a C-6 a a a C-3 a a A prefix arg value of 2 should apply to each of the first 3 `a's (what `repeat-command' does that Juri's approach currently does not do). But should the prefix arg of 6 apply to just the first `a' that follows it, with the next 2 `a's getting a prefix arg value of 2? And likewise, the prefix arg of 3 apply only to the `a' that immediately follows it? Or should the prefix arg of 6 apply to the 3 `a's that follow it, and the prefix arg of 3 apply to the last two `a's? IOW, modal among final-key repetitions.