all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Joseph Turner via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: 65649@debbugs.gnu.org, philipk@posteo.net
Subject: bug#65649: [PATCH] package-vc: Continue installing package when documentation build fails
Date: Wed, 30 Aug 2023 23:34:29 -0700	[thread overview]
Message-ID: <87msy7vhum.fsf@breatheoutbreathe.in> (raw)
In-Reply-To: <87r0njvhyo.fsf@breatheoutbreathe.in>

It would be nice to report more information about the package with failed
documentation, but AFAICT with-demoted-errors does not allow its FORMAT
string to be a symbol whose value is a string.

Joseph Turner <joseph@breatheoutbreathe.in> writes:

> Oops, the format string should be %S, not %s.
>
> [2. text/x-diff; 0001-Continue-installing-package-when-documentation-build.patch]
> From 83c62d80b5199cee911e30c1f3bb03c5a585b689 Mon Sep 17 00:00:00 2001
> From: Joseph Turner <joseph@breatheoutbreathe.in>
> Date: Wed, 30 Aug 2023 23:24:16 -0700
> Subject: [PATCH] Continue installing package when documentation building fails
>
> * lisp/emacs-lisp/package-vc.el (package-vc--build-documentation):
> Demote errors to messages.
> ---
>  lisp/emacs-lisp/package-vc.el | 61 ++++++++++++++++++-----------------
>  1 file changed, 31 insertions(+), 30 deletions(-)
>
> diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el
> index 747fe696204..bc1200c583f 100644
> --- a/lisp/emacs-lisp/package-vc.el
> +++ b/lisp/emacs-lisp/package-vc.el
> @@ -409,36 +409,37 @@ prepared."
>    "Build documentation for package PKG-DESC from documentation source in FILE.
>  FILE can be an Org file, indicated by its \".org\" extension,
>  otherwise it's assumed to be an Info file."
> -  (let* ((pkg-name (package-desc-name pkg-desc))
> -         (default-directory (package-desc-dir pkg-desc))
> -         (docs-directory (file-name-directory (expand-file-name file)))
> -         (output (expand-file-name (format "%s.info" pkg-name)))
> -         clean-up)
> -    (when (string-match-p "\\.org\\'" file)
> -      (require 'ox)
> -      (require 'ox-texinfo)
> -      (with-temp-buffer
> -        (insert-file-contents file)
> -        (setq file (make-temp-file "ox-texinfo-"))
> -        (let ((default-directory docs-directory))
> -          (org-export-to-file 'texinfo file))
> -        (setq clean-up t)))
> -    (with-current-buffer (get-buffer-create " *package-vc doc*")
> -      (erase-buffer)
> -      (cond
> -       ((/= 0 (call-process "makeinfo" nil t nil
> -                            "-I" docs-directory
> -                            "--no-split" file
> -                            "-o" output))
> -        (message "Failed to build manual %s, see buffer %S"
> -                 file (buffer-name)))
> -       ((/= 0 (call-process "install-info" nil t nil
> -                            output (expand-file-name "dir")))
> -        (message "Failed to install manual %s, see buffer %S"
> -                 output (buffer-name)))
> -       ((kill-buffer))))
> -    (when clean-up
> -      (delete-file file))))
> +  (with-demoted-errors "package-vc: Could not build documentation: %S"
> +    (let* ((pkg-name (package-desc-name pkg-desc))
> +           (default-directory (package-desc-dir pkg-desc))
> +           (docs-directory (file-name-directory (expand-file-name file)))
> +           (output (expand-file-name (format "%s.info" pkg-name)))
> +           clean-up)
> +      (when (string-match-p "\\.org\\'" file)
> +        (require 'ox)
> +        (require 'ox-texinfo)
> +        (with-temp-buffer
> +          (insert-file-contents file)
> +          (setq file (make-temp-file "ox-texinfo-"))
> +          (let ((default-directory docs-directory))
> +            (org-export-to-file 'texinfo file))
> +          (setq clean-up t)))
> +      (with-current-buffer (get-buffer-create " *package-vc doc*")
> +        (erase-buffer)
> +        (cond
> +         ((/= 0 (call-process "makeinfo" nil t nil
> +                              "-I" docs-directory
> +                              "--no-split" file
> +                              "-o" output))
> +          (message "Failed to build manual %s, see buffer %S"
> +                   file (buffer-name)))
> +         ((/= 0 (call-process "install-info" nil t nil
> +                              output (expand-file-name "dir")))
> +          (message "Failed to install manual %s, see buffer %S"
> +                   output (buffer-name)))
> +         ((kill-buffer))))
> +      (when clean-up
> +        (delete-file file)))))
>
>  (defun package-vc-install-dependencies (deps)
>    "Install missing dependencies according to DEPS.






  reply	other threads:[~2023-08-31  6:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-31  6:26 bug#65649: [PATCH] package-vc: Continue installing package when documentation build fails Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-31  6:32 ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-31  6:34   ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2023-08-31  7:18     ` Philip Kaludercic
2023-08-31 21:19       ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-31 21:39         ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-01 13:14         ` Philip Kaludercic
2023-09-01 23:28           ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-02 12:03             ` Philip Kaludercic
2023-09-02 16:49               ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-03  7:00                 ` Philip Kaludercic
2023-08-31  6:50 ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87msy7vhum.fsf@breatheoutbreathe.in \
    --to=bug-gnu-emacs@gnu.org \
    --cc=65649@debbugs.gnu.org \
    --cc=joseph@breatheoutbreathe.in \
    --cc=philipk@posteo.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.