From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Slawomir Nowaczyk Newsgroups: gmane.emacs.devel Subject: Re: calc-dispatch problem Date: Mon, 11 Sep 2006 16:30:45 +0200 Message-ID: <20060911162558.2A24.SLAWOMIR.NOWACZYK.847@student.lu.se> References: <20060909194523.29BA.SLAWOMIR.NOWACZYK.847@student.lu.se> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1157985081 32153 80.91.229.2 (11 Sep 2006 14:31:21 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 11 Sep 2006 14:31:21 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Sep 11 16:31:19 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GMmoV-0001lL-Mq for ged-emacs-devel@m.gmane.org; Mon, 11 Sep 2006 16:31:07 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GMmoV-0000xy-5Z for ged-emacs-devel@m.gmane.org; Mon, 11 Sep 2006 10:31:07 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GMmoK-0000xY-Og for emacs-devel@gnu.org; Mon, 11 Sep 2006 10:30:56 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GMmoI-0000xF-3L for emacs-devel@gnu.org; Mon, 11 Sep 2006 10:30:55 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GMmoH-0000xB-Tm for emacs-devel@gnu.org; Mon, 11 Sep 2006 10:30:53 -0400 Original-Received: from [130.235.16.11] (helo=himmelsborg.cs.lth.se) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GMmpZ-0001pM-9b for emacs-devel@gnu.org; Mon, 11 Sep 2006 10:32:13 -0400 Original-Received: from [127.0.0.1] (slawek@dain [130.235.16.76]) by himmelsborg.cs.lth.se (8.13.6/8.13.6/perf-jw-tr) with ESMTP id k8BEUpd0007321 for ; Mon, 11 Sep 2006 16:30:51 +0200 (CEST) Original-To: emacs-devel@gnu.org In-Reply-To: X-Esmandil_Citation: done X-Mailer-Plugin: Popup Memopad for Becky!2 Ver.0.02 Rev.2 X-Mailer: Becky! ver. 2.25.02 [en] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:59690 Archived-At: On Sun, 10 Sep 2006 21:05:08 +0100 Jason Rumney wrote: #> > Evaluate (global-set-key (kbd "M-`") 'calc-dispatch) #> > #> > Press "M-`" twice, *fast*. I get an error "calc-embedded-edit: Expected `)'" #> > #> > If I press "M-`" slowly, however (with about 1-2 second pause between #> > first and second keypress), calc opens properly. #> > #> > Strange. Any ideas? #> #> It seems to be deliberate. calc-dispatch uses (sit-for #> echo-keystrokes) to wait for further input, then acts differently #> depending on what keys were pressed or if the sit-for timed out starts #> calc normally. I still find it strange. So, OK, repeating calc-dispatch key fast does indeed send current line to some kind of "Calc edit mode"... but only if I *have not* opened calc before. Once I do "M-`" slowly *once*, it subsequently works even when typed quickly. Honestly, it really does look like a bug to me -- at the very least we should strive for some kind of consistent behaviour. #> Repeating the keys that invoked calc-dispatch seems to try to #> evaluate the current line using calc as far as I can tell. Exactly what calc-dispatch tries to do depends, I think, on what key is it bound to... it seems like second (quick) keypress is interpreted according to what calc-dispatch-help, but a second keypress after a pause wants to toggle calc. Any chance of making this "deliberate behaviour" customisable? -- Best wishes, Slawomir Nowaczyk ( slawomir.nowaczyk.847@student.lu.se ) Be nice to other people--they outnumber you six billion to one.