diff --git a/emacs/guix-build-log.el b/emacs/guix-build-log.el index 9ce30bd1dda2f7b02e14ee04049eb110655a144b..c0855b284c7f365083ceab5c3b9360512022f5f0 100644 --- a/emacs/guix-build-log.el +++ b/emacs/guix-build-log.el @@ -256,8 +256,9 @@ Return nil, if there is no phase start before the current point." ;; Some phases may be hidden, and some shown. Whether to hide or to ;; show them, it is determined by the state of the first phase here. (goto-char (point-min)) - (guix-build-log-next-phase) - (let ((fun (guix-build-log-phase-toggle-function))) + (let ((fun (save-excursion + (re-search-forward guix-build-log-phase-start-regexp nil t) + (guix-build-log-phase-toggle-function)))) (while (re-search-forward guix-build-log-phase-start-regexp nil t) (funcall fun)))))