* When is hourglass shown?
@ 2005-03-02 16:05 Lennart Borgman
0 siblings, 0 replies; 15+ messages in thread
From: Lennart Borgman @ 2005-03-02 16:05 UTC (permalink / raw)
Can someone please tell me when an hourglass is shown on X Emacs? Is it
shown for an operation like ediff-buffers (that takes a long time on my pc)?
Is it shown for indent-region?
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: When is hourglass shown?
@ 2005-03-04 17:34 Jan D.
2005-03-04 19:33 ` Stefan Monnier
2005-03-05 10:45 ` Eli Zaretskii
0 siblings, 2 replies; 15+ messages in thread
From: Jan D. @ 2005-03-04 17:34 UTC (permalink / raw)
>
>
>Can someone please tell me when an hourglass is shown on X Emacs? Is it
>shown for an operation like ediff-buffers (that takes a long time on my pc)?
>Is it shown for indent-region?
>
Not for indent-region (it should be IMHO). Ediff-buffer is quite fast
on my machines, so I can't tell. Constructing the info directory on
first C-h i is an example where the hourglass is shown.
Jan D.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: When is hourglass shown?
2005-03-04 17:34 When is hourglass shown? Jan D.
@ 2005-03-04 19:33 ` Stefan Monnier
2005-03-04 20:30 ` Jan D.
2005-03-05 10:51 ` Eli Zaretskii
2005-03-05 10:45 ` Eli Zaretskii
1 sibling, 2 replies; 15+ messages in thread
From: Stefan Monnier @ 2005-03-04 19:33 UTC (permalink / raw)
Cc: Emacs-Devel
>> Can someone please tell me when an hourglass is shown on X Emacs? Is it
>> shown for an operation like ediff-buffers (that takes a long time on my pc)?
>> Is it shown for indent-region?
> Not for indent-region (it should be IMHO).
Are you sure? I thought it was command-agnostic (i.e. it simply displays
an hourglass if more than X seconds have passed since Emacs was last ready
to process keyboard input).
[ ... trying out (setq indent-line-function (lambda () (while t))) ... ]
Duh! You're right. Hmm... how does this thing work?
Stefan
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: When is hourglass shown?
2005-03-04 19:33 ` Stefan Monnier
@ 2005-03-04 20:30 ` Jan D.
2005-03-05 10:51 ` Eli Zaretskii
1 sibling, 0 replies; 15+ messages in thread
From: Jan D. @ 2005-03-04 20:30 UTC (permalink / raw)
Cc: Emacs-Devel
Stefan Monnier wrote:
>>>Can someone please tell me when an hourglass is shown on X Emacs? Is it
>>>shown for an operation like ediff-buffers (that takes a long time on my pc)?
>>>Is it shown for indent-region?
>>>
>>>
>
>
>
>>Not for indent-region (it should be IMHO).
>>
>>
>
>Are you sure? I thought it was command-agnostic (i.e. it simply displays
>an hourglass if more than X seconds have passed since Emacs was last ready
>to process keyboard input).
>
>[ ... trying out (setq indent-line-function (lambda () (while t))) ... ]
>
>Duh! You're right. Hmm... how does this thing work?
>
I only tried M-x indent-region. For that no hourglass is shown. But if
invoked with M-C-\ an hourglass is shown. Turns out that M-x ... calls
minibuffer-complete-and-exit, and that function throws so the start
hourglass action is unwind and canceled. A bit inconsistent here.
Jan D.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: When is hourglass shown?
2005-03-04 17:34 When is hourglass shown? Jan D.
2005-03-04 19:33 ` Stefan Monnier
@ 2005-03-05 10:45 ` Eli Zaretskii
2005-03-05 11:17 ` Jan D.
1 sibling, 1 reply; 15+ messages in thread
From: Eli Zaretskii @ 2005-03-05 10:45 UTC (permalink / raw)
Cc: emacs-devel
> Date: Fri, 04 Mar 2005 18:34:23 +0100
> From: "Jan D." <jan.h.d@swipnet.se>
>
> Not for indent-region (it should be IMHO). Ediff-buffer is quite fast
> on my machines, so I can't tell.
I think the easiest way to find out whether the hourglass could be
shown in the context of some function is to put a breakpoint on the
place where the hourglass timer is set up. Then you will know if
Emacs arranges for the hourglass even if the operation itself is fast
enough so that no hourglass is actually shown before it finishes.
(It might be necessary to change the default handling of SIGALRM by
GDB, in order to run this under GDB.)
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: When is hourglass shown?
2005-03-04 19:33 ` Stefan Monnier
2005-03-04 20:30 ` Jan D.
@ 2005-03-05 10:51 ` Eli Zaretskii
1 sibling, 0 replies; 15+ messages in thread
From: Eli Zaretskii @ 2005-03-05 10:51 UTC (permalink / raw)
Cc: emacs-devel
> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Date: Fri, 04 Mar 2005 14:33:19 -0500
> Cc: Emacs-Devel <emacs-devel@gnu.org>
>
> I thought it was command-agnostic
AFAIK, it is, at least in principle (i.e. barring any bugs).
I see in keyboard.c that one instance of the call to start_hourglass
is ifdef'ed away; perhaps re-enabling that call (and taking care of
the problem described in a comment there, that caused the call to be
disabled) would fix the problem.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: When is hourglass shown?
2005-03-05 10:45 ` Eli Zaretskii
@ 2005-03-05 11:17 ` Jan D.
2005-03-05 12:00 ` Lennart Borgman
2005-03-05 17:24 ` Eli Zaretskii
0 siblings, 2 replies; 15+ messages in thread
From: Jan D. @ 2005-03-05 11:17 UTC (permalink / raw)
Cc: emacs-devel
2005-03-05 kl. 11.45 skrev Eli Zaretskii:
>> Date: Fri, 04 Mar 2005 18:34:23 +0100
>> From: "Jan D." <jan.h.d@swipnet.se>
>>
>> Not for indent-region (it should be IMHO). Ediff-buffer is quite fast
>> on my machines, so I can't tell.
>
> I think the easiest way to find out whether the hourglass could be
> shown in the context of some function is to put a breakpoint on the
> place where the hourglass timer is set up. Then you will know if
> Emacs arranges for the hourglass even if the operation itself is fast
> enough so that no hourglass is actually shown before it finishes.
>
> (It might be necessary to change the default handling of SIGALRM by
> GDB, in order to run this under GDB.)
This does not always work, as in the case of M-x indent-region versus
C-M-\. Both starts the hourglass timer, but the first stops it
directly afterwards.
Jan D.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: When is hourglass shown?
2005-03-05 11:17 ` Jan D.
@ 2005-03-05 12:00 ` Lennart Borgman
2005-03-05 12:38 ` Jan D.
2005-03-05 15:11 ` Jason Rumney
2005-03-05 17:24 ` Eli Zaretskii
1 sibling, 2 replies; 15+ messages in thread
From: Lennart Borgman @ 2005-03-05 12:00 UTC (permalink / raw)
Cc: emacs-devel
----- Original Message -----
From: "Jan D." <jan.h.d@swipnet.se>
> This does not always work, as in the case of M-x indent-region versus
> C-M-\. Both starts the hourglass timer, but the first stops it
> directly afterwards.
I am glad you took this up since it is rather confusing when trying to get
things working on w32 (where it currently does not work at all as far as I
can see). What is the reason it is stopped when using M-x? Is this a general
behaviour when using M-x or is it just indent-region?
On w32 I notice that the cursor is changed from an arrow (if outside the
text) to the same cursor that is used when it is over text. I have not been
able to find where this change is done yet. Is this the behaviour under X
Windows too?
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: When is hourglass shown?
2005-03-05 12:00 ` Lennart Borgman
@ 2005-03-05 12:38 ` Jan D.
2005-03-06 0:41 ` Richard Stallman
2005-03-05 15:11 ` Jason Rumney
1 sibling, 1 reply; 15+ messages in thread
From: Jan D. @ 2005-03-05 12:38 UTC (permalink / raw)
Cc: Eli Zaretskii, emacs-devel
> ----- Original Message -----
> From: "Jan D." <jan.h.d@swipnet.se>
>
>> This does not always work, as in the case of M-x indent-region versus
>> C-M-\. Both starts the hourglass timer, but the first stops it
>> directly afterwards.
>
> I am glad you took this up since it is rather confusing when trying to
> get
> things working on w32 (where it currently does not work at all as far
> as I
> can see). What is the reason it is stopped when using M-x? Is this a
> general
> behaviour when using M-x or is it just indent-region?
AFAIK it is a general M-x behaviour. Pressing return in the minibuffer
starts the hourglass, and then invokes minibuffer-complete-and-exit.
This function throws so the start_hourglass done after return is
canceled by an unwind-protect (in keyboard.c, command_loop_1(), around
line 1784). This may be a bug. I've checked 21.3 and it is the same
there so it is not a regression.
Jan D.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: When is hourglass shown?
2005-03-05 12:00 ` Lennart Borgman
2005-03-05 12:38 ` Jan D.
@ 2005-03-05 15:11 ` Jason Rumney
1 sibling, 0 replies; 15+ messages in thread
From: Jason Rumney @ 2005-03-05 15:11 UTC (permalink / raw)
Cc: Eli Zaretskii, Jan D., emacs-devel
"Lennart Borgman" <lennart.borgman.073@student.lu.se> writes:
> On w32 I notice that the cursor is changed from an arrow (if outside the
> text) to the same cursor that is used when it is over text. I have not been
> able to find where this change is done yet. Is this the behaviour under X
> Windows too?
The change to enable mouse cursors on w32 was this one. You should be
able to get the diffs from CVS, or through the HTTP interface on
savannah.gnu.org.
2003-01-21 KOBAYASHI Yasuhiro <kobayays@otsukakj.co.jp>
* w32term.h (struct w32_output): New member hand_cursor.
(WM_EMACS_SETCURSOR): New message definition.
* w32term.c (note_mode_line_highlight): Delete #if 0 to enable
function w32_define_cursor.
(note_mouse_highlight): Initialize, setup cursor accoding to mouse
position, change member name output_data.x to output_data.w32 and
add function w32_define_cursor.
(show_mouse_face): Delete #if 0 to enable function w32_define_cursor
and change member name output_data.x to output_data.w32.
(w32_initialize_display_info):
Setup dpyinfo->vertical_scroll_bar_cursor.
* w32fns.c (Vx_hand_shape): New variable.
(w32_wnd_proc): Add message entries for WM_SETCURSOR and
WM_EMACS_SETCURSOR.
(x-create-frame): Setup Cursor types.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: When is hourglass shown?
2005-03-05 11:17 ` Jan D.
2005-03-05 12:00 ` Lennart Borgman
@ 2005-03-05 17:24 ` Eli Zaretskii
2005-03-05 18:18 ` Jan D.
1 sibling, 1 reply; 15+ messages in thread
From: Eli Zaretskii @ 2005-03-05 17:24 UTC (permalink / raw)
Cc: emacs-devel
> Cc: emacs-devel@gnu.org
> From: "Jan D." <jan.h.d@swipnet.se>
> Date: Sat, 5 Mar 2005 12:17:24 +0100
>
> > I think the easiest way to find out whether the hourglass could be
> > shown in the context of some function is to put a breakpoint on the
> > place where the hourglass timer is set up. Then you will know if
> > Emacs arranges for the hourglass even if the operation itself is fast
> > enough so that no hourglass is actually shown before it finishes.
> >
> > (It might be necessary to change the default handling of SIGALRM by
> > GDB, in order to run this under GDB.)
>
> This does not always work, as in the case of M-x indent-region versus
> C-M-\. Both starts the hourglass timer, but the first stops it
> directly afterwards.
Actually, I think it did work very well: it shows you that the
hourglass was armed, i.e. that Emacs _meant_ for it to appear if the
operation took enough time. If you want to know why it didn't
actually happen, an additional breakpoint where the timer is disabled
would have shown you the code which did that.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: When is hourglass shown?
2005-03-05 17:24 ` Eli Zaretskii
@ 2005-03-05 18:18 ` Jan D.
2005-03-05 20:11 ` Nick Roberts
0 siblings, 1 reply; 15+ messages in thread
From: Jan D. @ 2005-03-05 18:18 UTC (permalink / raw)
Cc: emacs-devel
>>
>> This does not always work, as in the case of M-x indent-region versus
>> C-M-\. Both starts the hourglass timer, but the first stops it
>> directly afterwards.
>
> Actually, I think it did work very well: it shows you that the
> hourglass was armed, i.e. that Emacs _meant_ for it to appear if the
> operation took enough time. If you want to know why it didn't
> actually happen, an additional breakpoint where the timer is disabled
> would have shown you the code which did that.
>
I know exactly where now :-). Not sure what to do about though. Also,
starting and cancelling hourglass is done frequently, so running with
those breakpoints enabled makes for a lot of continue in gdb. Not
impossible though.
Jan D.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: When is hourglass shown?
2005-03-05 18:18 ` Jan D.
@ 2005-03-05 20:11 ` Nick Roberts
0 siblings, 0 replies; 15+ messages in thread
From: Nick Roberts @ 2005-03-05 20:11 UTC (permalink / raw)
Cc: Eli Zaretskii, emacs-devel
> I know exactly where now :-). Not sure what to do about though. Also,
> starting and cancelling hourglass is done frequently, so running with
> those breakpoints enabled makes for a lot of continue in gdb. Not
> impossible though.
I'm not sure if this helps, but gdb has 'ignore count', eg.
(gdb) b start_hourglass
Breakpoint 3 at 0x...
(gdb) ignore 3 9
(gdb) b cancel_hourglass
Breakpoint 4 at 0x...
(gdb) ignore 4 9
and gdb will only stop every tenth time.
Nick
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: When is hourglass shown?
2005-03-05 12:38 ` Jan D.
@ 2005-03-06 0:41 ` Richard Stallman
2005-03-10 19:10 ` Jan D.
0 siblings, 1 reply; 15+ messages in thread
From: Richard Stallman @ 2005-03-06 0:41 UTC (permalink / raw)
Cc: lennart.borgman.073, eliz, emacs-devel
AFAIK it is a general M-x behaviour. Pressing return in the minibuffer
starts the hourglass, and then invokes minibuffer-complete-and-exit.
This function throws so the start_hourglass done after return is
canceled by an unwind-protect (in keyboard.c, command_loop_1(), around
line 1784). This may be a bug.
I am sure it is a bug.
If you can fix it, please do.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: When is hourglass shown?
2005-03-06 0:41 ` Richard Stallman
@ 2005-03-10 19:10 ` Jan D.
0 siblings, 0 replies; 15+ messages in thread
From: Jan D. @ 2005-03-10 19:10 UTC (permalink / raw)
Cc: lennart.borgman.073, eliz, emacs-devel
Richard Stallman wrote:
> AFAIK it is a general M-x behaviour. Pressing return in the minibuffer
> starts the hourglass, and then invokes minibuffer-complete-and-exit.
> This function throws so the start_hourglass done after return is
> canceled by an unwind-protect (in keyboard.c, command_loop_1(), around
> line 1784). This may be a bug.
>
>I am sure it is a bug.
>If you can fix it, please do.
>
I've checked in a fix. Note that this fix is only for X, I don't know
if the other ports may need a similar fix.
Jan D.
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2005-03-10 19:10 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-04 17:34 When is hourglass shown? Jan D.
2005-03-04 19:33 ` Stefan Monnier
2005-03-04 20:30 ` Jan D.
2005-03-05 10:51 ` Eli Zaretskii
2005-03-05 10:45 ` Eli Zaretskii
2005-03-05 11:17 ` Jan D.
2005-03-05 12:00 ` Lennart Borgman
2005-03-05 12:38 ` Jan D.
2005-03-06 0:41 ` Richard Stallman
2005-03-10 19:10 ` Jan D.
2005-03-05 15:11 ` Jason Rumney
2005-03-05 17:24 ` Eli Zaretskii
2005-03-05 18:18 ` Jan D.
2005-03-05 20:11 ` Nick Roberts
-- strict thread matches above, loose matches on Subject: below --
2005-03-02 16:05 Lennart Borgman
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).