Gnus development mailing list
 help / color / mirror / Atom feed
* Postponed Emacs actions
@ 1998-11-21 10:24 Lars Magne Ingebrigtsen
  1998-11-21 10:47 ` William M. Perry
  1998-11-21 14:59 ` Simon Josefsson
  0 siblings, 2 replies; 9+ messages in thread
From: Lars Magne Ingebrigtsen @ 1998-11-21 10:24 UTC (permalink / raw)


When one does things that usually takes a long time, you message to
tell the user that Emacs is doing whatever it's doing.

Filling paragraphs...
Filling paragraphs...done

However, in many cases the action doesn't take all that long, so you
just get a flutter of these messages, which is annoying.

Wouldn't it be neat if you could say

(maybe-message "Filling paragraphs..."
  (do-that-thing)
  ...)

and then that message would only be displayed if `do-that-thing' took
more than ¼ second.

Does this sound useful? 

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Postponed Emacs actions
  1998-11-21 10:24 Postponed Emacs actions Lars Magne Ingebrigtsen
@ 1998-11-21 10:47 ` William M. Perry
  1998-11-22  7:02   ` Lars Magne Ingebrigtsen
  1998-11-21 14:59 ` Simon Josefsson
  1 sibling, 1 reply; 9+ messages in thread
From: William M. Perry @ 1998-11-21 10:47 UTC (permalink / raw)


Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

> When one does things that usually takes a long time, you message to
> tell the user that Emacs is doing whatever it's doing.
> 
> Filling paragraphs...
> Filling paragraphs...done
> 
> However, in many cases the action doesn't take all that long, so you
> just get a flutter of these messages, which is annoying.
> 
> Wouldn't it be neat if you could say
> 
> (maybe-message "Filling paragraphs..."
>   (do-that-thing)
>   ...)
> 
> and then that message would only be displayed if `do-that-thing' took
> more than ¼ second.
> 
> Does this sound useful? 

  Emacs/W3 used to do this, it was pretty nice, and pretty easy to
implement.

-Bill P.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Postponed Emacs actions
  1998-11-21 10:24 Postponed Emacs actions Lars Magne Ingebrigtsen
  1998-11-21 10:47 ` William M. Perry
@ 1998-11-21 14:59 ` Simon Josefsson
  1998-11-22  7:03   ` Lars Magne Ingebrigtsen
  1 sibling, 1 reply; 9+ messages in thread
From: Simon Josefsson @ 1998-11-21 14:59 UTC (permalink / raw)


Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

> Filling paragraphs...
> Filling paragraphs...done
> 
> However, in many cases the action doesn't take all that long, so you
> just get a flutter of these messages, which is annoying.

Doesn't the tty optimization help?  When expiring big groups over a
modem, I only see every hundred (or so) 'Expring article 32423'.

Also, couldn't the base64 decoder be a little bit more verbose?  Right
now my Emacs hangs for minutes on bigish attachments. A `Decoding
base64..........' message where the dot grows just like nntp would be
very neat. Or should I just wait for a Emacs with built-in
base64-decoding?




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Postponed Emacs actions
  1998-11-21 10:47 ` William M. Perry
@ 1998-11-22  7:02   ` Lars Magne Ingebrigtsen
  1998-11-22 15:02     ` William M. Perry
  0 siblings, 1 reply; 9+ messages in thread
From: Lars Magne Ingebrigtsen @ 1998-11-22  7:02 UTC (permalink / raw)


wmperry@aventail.com (William M. Perry) writes:

>   Emacs/W3 used to do this, it was pretty nice, and pretty easy to
> implement.

Was this done in the C layer?  If not, how could one do this without
having the body of the form call `(sleep 0)' or the like?

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Postponed Emacs actions
  1998-11-21 14:59 ` Simon Josefsson
@ 1998-11-22  7:03   ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 9+ messages in thread
From: Lars Magne Ingebrigtsen @ 1998-11-22  7:03 UTC (permalink / raw)


Simon Josefsson <jas@pdc.kth.se> writes:

> Doesn't the tty optimization help?  When expiring big groups over a
> modem, I only see every hundred (or so) 'Expring article 32423'.

I usually run Emacs under X, which flutters oodles when entering a
group on a fast machine.

> Also, couldn't the base64 decoder be a little bit more verbose?  Right
> now my Emacs hangs for minutes on bigish attachments. A `Decoding
> base64..........' message where the dot grows just like nntp would be
> very neat. Or should I just wait for a Emacs with built-in
> base64-decoding?

I think the latter is easier, since Emacs 20.4 will have the base64
things in the C layer.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Postponed Emacs actions
  1998-11-22  7:02   ` Lars Magne Ingebrigtsen
@ 1998-11-22 15:02     ` William M. Perry
  1998-11-22 16:07       ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 9+ messages in thread
From: William M. Perry @ 1998-11-22 15:02 UTC (permalink / raw)


Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

> wmperry@aventail.com (William M. Perry) writes:
> 
> >   Emacs/W3 used to do this, it was pretty nice, and pretty easy to
> > implement.
> 
> Was this done in the C layer?  If not, how could one do this without
> having the body of the form call `(sleep 0)' or the like?

  Nope, all in lisp.  Emacs/W3 still does do it, I just didn't remember the 
function name correctly.

(defun url-lazy-message (&rest args)
  "Just like `message', but is a no-op if called more than once a second.
Will not do anything if url-show-status is nil."
  (if (or (null url-show-status)
          (active-minibuffer-window)
          (= url-lazy-message-time
             (setq url-lazy-message-time (nth 1 (current-time)))))
      nil
    (apply 'message args)))

-Bill P.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Postponed Emacs actions
  1998-11-22 15:02     ` William M. Perry
@ 1998-11-22 16:07       ` Lars Magne Ingebrigtsen
  1998-11-22 17:18         ` William M. Perry
  0 siblings, 1 reply; 9+ messages in thread
From: Lars Magne Ingebrigtsen @ 1998-11-22 16:07 UTC (permalink / raw)


wmperry@aventail.com (William M. Perry) writes:

>   Nope, all in lisp.  Emacs/W3 still does do it, I just didn't remember the 
> function name correctly.
> 
> (defun url-lazy-message (&rest args)
>   "Just like `message', but is a no-op if called more than once a second.

No, not like that -- the other way around.  The postponed message I
envision will only be shown if not preempted a quarter second after it
was suggested.

(postponed-message "This takes a long time"
  (do-something))

will be shown if `(do-something)' takes a long while.

The length of time between messages isn't the concern, although it has 
an effect on that as well.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Postponed Emacs actions
  1998-11-22 16:07       ` Lars Magne Ingebrigtsen
@ 1998-11-22 17:18         ` William M. Perry
  1998-11-24  9:39           ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 9+ messages in thread
From: William M. Perry @ 1998-11-22 17:18 UTC (permalink / raw)


Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

> wmperry@aventail.com (William M. Perry) writes:
> 
> >   Nope, all in lisp.  Emacs/W3 still does do it, I just didn't remember the 
> > function name correctly.
> > 
> > (defun url-lazy-message (&rest args)
> >   "Just like `message', but is a no-op if called more than once a second.
> 
> No, not like that -- the other way around.  The postponed message I
> envision will only be shown if not preempted a quarter second after it
> was suggested.
> 
> (postponed-message "This takes a long time"
>   (do-something))
> 
> will be shown if `(do-something)' takes a long while.
> 
> The length of time between messages isn't the concern, although it has 
> an effect on that as well.

  You could do this with itimers, but that's kind of yucky. :)

-Bill P.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Postponed Emacs actions
  1998-11-22 17:18         ` William M. Perry
@ 1998-11-24  9:39           ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 9+ messages in thread
From: Lars Magne Ingebrigtsen @ 1998-11-24  9:39 UTC (permalink / raw)


wmperry@aventail.com (William M. Perry) writes:

>   You could do this with itimers, but that's kind of yucky. :)

Yup; then the bodies would have to `(sit-for 0)' or something to let
the timers be run.  So the thing would have to be implemented in the C 
layer.

Anyway, RMS is positive to the idea, but he thinks it will be
difficult to implement.  Can one use `setitimer' and friends and
stuff?  Not that I have thought closely at how to implement this...

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~1998-11-24  9:39 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-11-21 10:24 Postponed Emacs actions Lars Magne Ingebrigtsen
1998-11-21 10:47 ` William M. Perry
1998-11-22  7:02   ` Lars Magne Ingebrigtsen
1998-11-22 15:02     ` William M. Perry
1998-11-22 16:07       ` Lars Magne Ingebrigtsen
1998-11-22 17:18         ` William M. Perry
1998-11-24  9:39           ` Lars Magne Ingebrigtsen
1998-11-21 14:59 ` Simon Josefsson
1998-11-22  7:03   ` Lars Magne Ingebrigtsen

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 NNTP newsgroup(s).