Ludovic Courtès (2014-10-26 21:37 +0300) wrote:

> Alex Kost <alez...@gmail.com> skribis:
>
>> This is an auxiliary commit for a “pull” operation added in a later patch.
>>
>>
>> From ef04333314fbe738d18d33b23a67dc47c8e75dbb Mon Sep 17 00:00:00 2001
>> From: Alex Kost <alez...@gmail.com>
>> Date: Mon, 20 Oct 2014 23:18:13 +0400
>> Subject: [PATCH 2/5] emacs: Introduce REPL operation type.
>>
>> * emacs/guix-backend.el (guix-repl-operation-type): New variable.
>>   (guix-repl-output-filter): Run type hooks after performing an operation.
>>   (guix-eval-read): Add 'operation-type' argument.
>
> [...]
>
>> +(defvar guix-repl-operation-type nil
>> +  "Type of the current operation performed by `guix-eval-in-repl'.")
>
> Could you write something about the valid values it may take and their
> meaning?
>
> Otherwise LGTM.

It's an internal variable set by ‘guix-eval-in-repl’.

The point of an “operation type” is to run some specialized actions
after finishing a REPL operation (e.g., to refresh buffers after ‘pull’
operation).

If there is ‘guix-after-foo-hook’ variable and ‘guix-eval-in-repl’ is
called with ‘foo’ operation-type, the hooks from that var will be called
after executing ‘foo’ operation.

Currently only ‘pull’ operation type is used, so ‘guix-after-pull-hook’
is called after a pull operation.


Reply via email to