package ecaml

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Report progress of long-running operations in the echo area.

(Info-goto-node "(elisp) Progress")

Primitives

type 'a t
val sexp_of_t : ('a -> Sexplib0.Sexp.t) -> 'a t -> Sexplib0.Sexp.t
val create_spinner_and_display : message:string -> unit t

Create a progress reporter with no predefined min and max values.

Updating the reporter causes a spinner to be animated in the echo area.

val create_with_range_and_display : min_incl:int -> max_incl:int -> message:string -> int t

Create a progress reporter with a predefined min and max value, representing the starting and final states of the operation.

For example, when scanning a buffer, one might use:

create_with_range_and_display
  ~min_incl:(Point.min ())
  ~max_incl:(Point.max ())
  ~message:"..."

The initial state of the progress reporter is min_incl.

Updating the reporter causes a percentage to be displayed in the echo area.

val update : ?suffix:string -> 'a t -> 'a -> unit

Update the progress reporter with the current state of the operation.

suffix, if provided, is displayed after the main message and progress indicator.

val finish : _ t -> unit

Report that the operation is finished.

Convenience functions

module Deferred : sig ... end
OCaml

Innovation. Community. Security.