* calc-dispatch problem
@ 2006-09-10 16:04 Slawomir Nowaczyk
2006-09-10 18:19 ` David Kastrup
2006-09-10 20:05 ` Jason Rumney
0 siblings, 2 replies; 8+ messages in thread
From: Slawomir Nowaczyk @ 2006-09-10 16:04 UTC (permalink / raw)
Hello,
Start emacs --no-init-file --no-site-file
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?
--
Best wishes,
Slawomir Nowaczyk
( slawomir.nowaczyk.847@student.lu.se )
Hardware: The parts of a computer system that can be kicked.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: calc-dispatch problem
2006-09-10 16:04 calc-dispatch problem Slawomir Nowaczyk
@ 2006-09-10 18:19 ` David Kastrup
2006-09-10 19:11 ` Slawomir Nowaczyk
2006-09-10 20:05 ` Jason Rumney
1 sibling, 1 reply; 8+ messages in thread
From: David Kastrup @ 2006-09-10 18:19 UTC (permalink / raw)
Cc: emacs-devel
Slawomir Nowaczyk <slawomir.nowaczyk.847@student.lu.se> writes:
> Hello,
>
> Start emacs --no-init-file --no-site-file
>
> 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?
Is this on X11 or a tty?
If it is the latter, this sounds like a function key sequence.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: calc-dispatch problem
2006-09-10 18:19 ` David Kastrup
@ 2006-09-10 19:11 ` Slawomir Nowaczyk
0 siblings, 0 replies; 8+ messages in thread
From: Slawomir Nowaczyk @ 2006-09-10 19:11 UTC (permalink / raw)
On Sun, 10 Sep 2006 20:19:29 +0200
David Kastrup <dak@gnu.org> wrote:
#> Slawomir Nowaczyk <slawomir.nowaczyk.847@student.lu.se> writes:
#>
#> > Hello,
#> >
#> > Start emacs --no-init-file --no-site-file
#> >
#> > 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?
#>
#> Is this on X11 or a tty?
#>
#> If it is the latter, this sounds like a function key sequence.
It's on M$ Windows:
In GNU Emacs 22.0.50.1 (i386-msvc-nt5.1.2600)
of 2006-09-05 on FIONA
X server distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-msvc (13.10) --cflags -IM:/EmacsCVS/libraries/include/'
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: ENG
locale-coding-system: cp1252
default-enable-multibyte-characters: t
Major mode: Lisp Interaction
Minor modes in effect:
encoded-kbd-mode: t
tooltip-mode: t
tool-bar-mode: t
mouse-wheel-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
unify-8859-on-encoding-mode: t
utf-translate-cjk-mode: t
auto-compression-mode: t
line-number-mode: t
Recent input:
<return> <S-insert> C-x C-e M-` M-` M-x r e p o r t
- e m <tab> <return>
Recent messages:
Mark set
Loading edmacro...done
calc-dispatch
Loading calc...done
Loading calc-embed...done
Loading calc-aent...done
calc-embedded-edit: Expected `)'
Loading emacsbug...
Loading regexp-opt...done
Loading emacsbug...done
--
Best wishes,
Slawomir Nowaczyk
( slawomir.nowaczyk.847@student.lu.se )
A little inaccuracy sometimes saves a ton of explanation.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: calc-dispatch problem
2006-09-10 16:04 calc-dispatch problem Slawomir Nowaczyk
2006-09-10 18:19 ` David Kastrup
@ 2006-09-10 20:05 ` Jason Rumney
2006-09-11 14:30 ` Slawomir Nowaczyk
2006-09-11 17:48 ` Jay Belanger
1 sibling, 2 replies; 8+ messages in thread
From: Jason Rumney @ 2006-09-10 20:05 UTC (permalink / raw)
Cc: emacs-devel
Slawomir Nowaczyk <slawomir.nowaczyk.847@student.lu.se> writes:
> Hello,
>
> Start emacs --no-init-file --no-site-file
>
> 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. Repeating the keys that invoked calc-dispatch seems to
try to evaluate the current line using calc as far as I can tell.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: calc-dispatch problem
2006-09-10 20:05 ` Jason Rumney
@ 2006-09-11 14:30 ` Slawomir Nowaczyk
2006-09-11 17:48 ` Jay Belanger
1 sibling, 0 replies; 8+ messages in thread
From: Slawomir Nowaczyk @ 2006-09-11 14:30 UTC (permalink / raw)
On Sun, 10 Sep 2006 21:05:08 +0100
Jason Rumney <jasonr@gnu.org> 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.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: calc-dispatch problem
2006-09-10 20:05 ` Jason Rumney
2006-09-11 14:30 ` Slawomir Nowaczyk
@ 2006-09-11 17:48 ` Jay Belanger
2006-09-11 19:20 ` Slawomir Nowaczyk
1 sibling, 1 reply; 8+ messages in thread
From: Jay Belanger @ 2006-09-11 17:48 UTC (permalink / raw)
Cc: belanger
Jason Rumney <jasonr@gnu.org> writes:
> Slawomir Nowaczyk <slawomir.nowaczyk.847@student.lu.se> writes:
...
>> 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.
...
> 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. Repeating the keys that invoked calc-dispatch seems to
> try to evaluate the current line using calc as far as I can tell.
Repeating the keys should start calc up normally.
But `calc-dispatch' followed by "`" or "M-`" normally starts
calc-embedded-edit, and which behavior is used depends on whether or
not the `sit-for' is interrupted or not.
If the `sit-for' is interrupted, then a subsequent call of
`this-command-keys' gets a longer string than if `sit-for' isn't
interrupted. I don't know what good the `sit-for' is doing; calc
shouldn't behave differently depending on how fast those keys are
pressed.
The behaviour without the `sit-for' seems the proper behaviour;
perhaps the `sit-for' should be removed.
Jay
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: calc-dispatch problem
2006-09-11 17:48 ` Jay Belanger
@ 2006-09-11 19:20 ` Slawomir Nowaczyk
2006-09-12 18:27 ` Jay Belanger
0 siblings, 1 reply; 8+ messages in thread
From: Slawomir Nowaczyk @ 2006-09-11 19:20 UTC (permalink / raw)
On Mon, 11 Sep 2006 12:48:42 -0500
Jay Belanger <belanger@truman.edu> wrote:
#> Repeating the keys should start calc up normally.
It was also my impression -- but, as I have just noticed, neither doc
string nor manual say that explicitly (they only talk about specific
case of "*" key starting calc)... I think they should be changed to
specifically say that repeating key bound to calc-dispatch should work
even if it has been customised.
#> But `calc-dispatch' followed by "`" or "M-`" normally starts
#> calc-embedded-edit, and which behavior is used depends on whether or
#> not the `sit-for' is interrupted or not. If the `sit-for' is
#> interrupted, then a subsequent call of `this-command-keys' gets a
#> longer string than if `sit-for' isn't interrupted.
Thanks for the explanation.
#> I don't know what good the `sit-for' is doing; calc shouldn't behave
#> differently depending on how fast those keys are pressed.
I agree!
#> The behaviour without the `sit-for' seems the proper behaviour;
#> perhaps the `sit-for' should be removed.
Sounds good to me.
--
Best wishes,
Slawomir Nowaczyk
( slawomir.nowaczyk.847@student.lu.se )
Most common use of Brutal Sarcasm (tm) in Computer Science is:
"It's a feature."
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: calc-dispatch problem
2006-09-11 19:20 ` Slawomir Nowaczyk
@ 2006-09-12 18:27 ` Jay Belanger
0 siblings, 0 replies; 8+ messages in thread
From: Jay Belanger @ 2006-09-12 18:27 UTC (permalink / raw)
Cc: belanger
Slawomir Nowaczyk <slawomir.nowaczyk.847@student.lu.se> writes:
...
> #> The behaviour without the `sit-for' seems the proper behaviour;
> #> perhaps the `sit-for' should be removed.
>
> Sounds good to me.
This has been done in cvs.
Jay
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2006-09-12 18:27 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-10 16:04 calc-dispatch problem Slawomir Nowaczyk
2006-09-10 18:19 ` David Kastrup
2006-09-10 19:11 ` Slawomir Nowaczyk
2006-09-10 20:05 ` Jason Rumney
2006-09-11 14:30 ` Slawomir Nowaczyk
2006-09-11 17:48 ` Jay Belanger
2006-09-11 19:20 ` Slawomir Nowaczyk
2006-09-12 18:27 ` Jay Belanger
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.