package ecaml

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

Module Ecaml.Progress_reporterSource

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

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

Primitives

Sourcetype 'a t
Sourceval sexp_of_t : ('a -> Sexplib0.Sexp.t) -> 'a t -> Sexplib0.Sexp.t
Sourceval 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.

Sourceval 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.

Sourceval 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.

Sourceval finish : _ t -> unit

Report that the operation is finished.

Convenience functions

Sourcemodule Deferred : sig ... end
OCaml

Innovation. Community. Security.