From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.bugs Subject: bug#6256: 24.0.50; read-event in `repeat' command Date: Tue, 19 Oct 2010 12:21:04 -0700 Message-ID: <8E5430CB43B84B91BB47DB3C0C710C44@us.oracle.com> References: <058F2FC300154C1AB894694655B2A968@us.oracle.com><90A72397ABF34D84A3ACB3B6DE18F74A@us.oracle.com><0658C0CCC79D466BA9DE233F5980CAE5@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1287517398 15615 80.91.229.12 (19 Oct 2010 19:43:18 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 19 Oct 2010 19:43:18 +0000 (UTC) Cc: 6256@debbugs.gnu.org To: "'Stefan Monnier'" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Oct 19 21:43:16 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1P8I5b-0005Fg-G1 for geb-bug-gnu-emacs@m.gmane.org; Tue, 19 Oct 2010 21:43:15 +0200 Original-Received: from localhost ([127.0.0.1]:43643 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P8I5a-0006Qo-T5 for geb-bug-gnu-emacs@m.gmane.org; Tue, 19 Oct 2010 15:43:14 -0400 Original-Received: from [140.186.70.92] (port=38748 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P8I50-000668-Je for bug-gnu-emacs@gnu.org; Tue, 19 Oct 2010 15:42:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P8I4z-0001i0-9x for bug-gnu-emacs@gnu.org; Tue, 19 Oct 2010 15:42:38 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:46494) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P8I4z-0001hu-8L for bug-gnu-emacs@gnu.org; Tue, 19 Oct 2010 15:42:37 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1P8HhC-0004Ab-I3; Tue, 19 Oct 2010 15:18:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Drew Adams" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 19 Oct 2010 19:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6256 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 6256-submit@debbugs.gnu.org id=B6256.128751585116019 (code B ref 6256); Tue, 19 Oct 2010 19:18:02 +0000 Original-Received: (at 6256) by debbugs.gnu.org; 19 Oct 2010 19:17:31 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P8Hgg-0004AK-KC for submit@debbugs.gnu.org; Tue, 19 Oct 2010 15:17:30 -0400 Original-Received: from rcsinet10.oracle.com ([148.87.113.121]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P8Hgd-0004AF-70 for 6256@debbugs.gnu.org; Tue, 19 Oct 2010 15:17:27 -0400 Original-Received: from rcsinet15.oracle.com (rcsinet15.oracle.com [148.87.113.117]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id o9JJLCYn025897 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 19 Oct 2010 19:21:13 GMT Original-Received: from acsmt355.oracle.com (acsmt355.oracle.com [141.146.40.155]) by rcsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o9J8lCrp028231; Tue, 19 Oct 2010 19:21:11 GMT Original-Received: from abhmt020.oracle.com by acsmt354.oracle.com with ESMTP id 698493011287516067; Tue, 19 Oct 2010 12:21:07 -0700 Original-Received: from dradamslap1 (/10.159.219.37) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 19 Oct 2010 12:21:06 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: ActvKXP10VE12WVIS1CpDYQsnZybNQAb20mA X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5994 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Tue, 19 Oct 2010 15:18:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:40994 Archived-At: (Putting this back into the bug-list thread, since some of my reply (#3 below) still pertains to #6256.) 1. > Yes, tho the only change it requires is to change the lets into setqs. Including the let-binding of `repeat-message-function'? I assume not. Doing that would change the value globally from then on. I've left that one as a let binding. 2. However, you say that your implementation will anyway render a let binding of `repeat-message-function' ineffective. Do you mean your current fix using read-key or your future reimplementation that you have locally? I assume you mean the latter. I can't test that, so I can't say how annoying the changed message behavior would be. Not being able to effectively let bind `repeat-message-function' (anywhere) would significantly reduce the utility of that variable. That's kind of the point of such a variable - code that uses it is unlikely to just treat it as a global setting (e.g. setq). There needs to be some simple way to prevent `repeat' from issuing its own message for the duration (including during all repetitions). And preferably we would also provide a way to apply an alternative function - i.e. to do exactly what `repeat-message' was intended to do and does currently. It seems like your future replacement would change the notion of a repetition so that it no longer does everything that is currently done in `repeat' (since `repeat' is not called repetitively). Dunno. I realize you are still working on it, but please try not to sacrifice too much in your quest for simplicity. 3. Your current read-key fix for `repeat' does not work in Emacs 23, whereas my fix using read-event does work. Yours works only for Emacs 24 - I'm not sure why (can you tell me perhaps?). Mine works also in Emacs 22 and 23. (Emacs 22 has no `read-key'.) So I cannot say I'm overjoyed with that solution. But maybe I will be if I understand its advantages. What was your objection to the solution I provided using `read-event'? You never stated it, IIRC. I realize that you do not care much about Emacs 22 or 23, but it seems like a fair amount of loss for little gain. I'd like to understand the advantage of your current fix using read-key. (Granted, an Emacs 22/23 user would need to eval the fixed version of `repeat', but that's not a big deal.) 4. > If you look at the corresponding patch included below, you'll see that > it makes it unnecessary to deal with pre/post-command-hook or with > undo-boundary. Actually it also handles various other details of the > top-level loop which the current version of repeat just > hasn't bothered to try and reproduce (e.g. moving the cursor outside > of images/compositions/invisible text). Yes, it looks simpler. (But you didn't show the definition of `set-temporary-overlay-map'.) > > I'm not objecting but asking to understand, especially > > since it breaks the way `repeat' has functioned (its > > interface), requiring code changes for at least some > > `repeat' callers such as mine. > > Yes, that's a concern. Consider providing some info in NEWS about how to make code compatible etc. > I've sent my current implementation to emacs-devel in some > other thread, but in any case it suffers from a few problems. > > > BTW, what's the `t' argument for? > > It means "keep this overlay map active as long as the user hits keys > within that keymap". A nil value means to keep it active only for the > very next command. You can also provide a predicate function > to decide when to deactivate the map. Do you actually use such optional functionality? How/where?