GNU bug report logs - #27153
gnu: sicp: Add the HTML version.

Previous Next

Package: guix-patches;

Reported by: Clément Lassieur <clement <at> lassieur.org>

Date: Tue, 30 May 2017 21:07:02 UTC

Severity: normal

Done: Clément Lassieur <clement <at> lassieur.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 27153 in the body.
You can then email your comments to 27153 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#27153; Package guix-patches. (Tue, 30 May 2017 21:07:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Clément Lassieur <clement <at> lassieur.org>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Tue, 30 May 2017 21:07:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Clément Lassieur <clement <at> lassieur.org>
To: guix-patches <at> gnu.org
Subject: gnu: sicp: Add the HTML version.
Date: Tue, 30 May 2017 23:05:42 +0200
Yesterday, while browsing the Info version of SICP, I came accross an
incomplete figure (Figure 3.1: environments A and B are missing).  I
thought the HTML version might be complete and indeed it was.  It's
really nice by the way, see http://sarabander.github.io/sicp/.  And real
figures are in my opinion more pleasant to study than ASCII art figures.

So I think we should add the HTML version to our package. :-)  That
would allow us to use it without Internet access.

I find it much easier to browse the Info manual than the HTML one, so I
wrote this small Elisp snippet to switch from the former to the latter:

--8<---------------cut here---------------start------------->8---
(defun sicp-browse ()
  "Ask a browser to load the HTML version of the current node."
  (interactive)
  (let* ((home (expand-file-name "~"))
         (dir (concat "file://" home "/.guix-profile/share/doc/sicp/html/"))
         (node Info-current-node)
         (pattern
          (string-join
           '("^\\(?1:[0-9]\\)\.\\(?2:[0-9]\\)\.\\(?3:[0-9]\\)$" ; 4-5-7
             "^\\(?1:[0-9]\\)\.\\(?2:[0-9]\\)$"                 ; 4-5
             "^Chapter \\(?1:[0-9]\\)$")                        ; Chapter 4
           "\\|")))
    (if (string-match pattern node)
        (let ((chapter     (match-string 1 node)) ; 4
              (section     (match-string 2 node)) ; 5
              (sub-section (match-string 3 node)) ; 7
              base
              (anchor ""))
          (if section
              (setq base (format "%s_002e%s" chapter section))
            (setq base (format "Chapter-%s" chapter)))
          (when sub-section
            (setq anchor (format "#g_t%s_002e%s" base sub-section)))
          (browse-url (concat dir base ".xhtml" anchor)))
      (error "Node not matched"))))
--8<---------------cut here---------------end--------------->8---




Information forwarded to guix-patches <at> gnu.org:
bug#27153; Package guix-patches. (Tue, 30 May 2017 21:13:01 GMT) Full text and rfc822 format available.

Message #8 received at 27153 <at> debbugs.gnu.org (full text, mbox):

From: Clément Lassieur <clement <at> lassieur.org>
To: 27153 <at> debbugs.gnu.org
Subject: [PATCH] gnu: sicp: Add the HTML version.
Date: Tue, 30 May 2017 23:11:49 +0200
* gnu/packages/scheme.scm (sicp)[arguments]: Copy the HTML directory to the
output.
---
 gnu/packages/scheme.scm | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gnu/packages/scheme.scm b/gnu/packages/scheme.scm
index f6aee005c..eacfd733d 100644
--- a/gnu/packages/scheme.scm
+++ b/gnu/packages/scheme.scm
@@ -7,6 +7,7 @@
 ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke <at> gnu.org>
 ;;; Copyright © 2016, 2017 ng0 <contact.ng0 <at> cryptolab.net>
 ;;; Copyright © 2017 John Darrington <jmd <at> gnu.org>
+;;; Copyright © 2017 Clément Lassieur <clement <at> lassieur.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -780,7 +781,9 @@ engineering.")
            (let ((gzip (assoc-ref %build-inputs "gzip"))
                  (source (assoc-ref %build-inputs "source"))
                  (texinfo (assoc-ref %build-inputs "texinfo"))
+                 (html-dir (string-append %output "/share/doc/" ,name "/html"))
                  (info-dir (string-append %output "/share/info")))
+             (copy-recursively (string-append source "/html") html-dir)
              (setenv "PATH" (string-append gzip "/bin"
                                            ":" texinfo "/bin"))
              (mkdir-p info-dir)
-- 
2.13.0





Information forwarded to guix-patches <at> gnu.org:
bug#27153; Package guix-patches. (Wed, 31 May 2017 03:43:01 GMT) Full text and rfc822 format available.

Message #11 received at 27153 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Clément Lassieur <clement <at> lassieur.org>
Cc: 27153 <at> debbugs.gnu.org
Subject: Re: bug#27153: gnu: sicp: Add the HTML version.
Date: Tue, 30 May 2017 20:42:34 -0700
Hi Clément,

Clément Lassieur <clement <at> lassieur.org> writes:

> Yesterday, while browsing the Info version of SICP, I came accross an
> incomplete figure (Figure 3.1: environments A and B are missing).  I
> thought the HTML version might be complete and indeed it was.  It's
> really nice by the way, see http://sarabander.github.io/sicp/.  And real
> figures are in my opinion more pleasant to study than ASCII art figures.
>
> So I think we should add the HTML version to our package. :-)  That
> would allow us to use it without Internet access.
>
> I find it much easier to browse the Info manual than the HTML one, so I
> wrote this small Elisp snippet to switch from the former to the latter:
>
> (defun sicp-browse ()
>   "Ask a browser to load the HTML version of the current node."
>   (interactive)
>   (let* ((home (expand-file-name "~"))
>          (dir (concat "file://" home "/.guix-profile/share/doc/sicp/html/"))
>          (node Info-current-node)
>          (pattern
>           (string-join
>            '("^\\(?1:[0-9]\\)\.\\(?2:[0-9]\\)\.\\(?3:[0-9]\\)$" ; 4-5-7
>              "^\\(?1:[0-9]\\)\.\\(?2:[0-9]\\)$"                 ; 4-5
>              "^Chapter \\(?1:[0-9]\\)$")                        ; Chapter 4
>            "\\|")))
>     (if (string-match pattern node)
>         (let ((chapter     (match-string 1 node)) ; 4
>               (section     (match-string 2 node)) ; 5
>               (sub-section (match-string 3 node)) ; 7
>               base
>               (anchor ""))
>           (if section
>               (setq base (format "%s_002e%s" chapter section))
>             (setq base (format "Chapter-%s" chapter)))
>           (when sub-section
>             (setq anchor (format "#g_t%s_002e%s" base sub-section)))
>           (browse-url (concat dir base ".xhtml" anchor)))
>       (error "Node not matched"))))

Cool! Thanks for sharing. I having started my study of SICP yet, but
that's something I've been meaning to do.

Also, couldn't the info version contain real figures (bitmaps)? Emacs is
capable of displaying images; maybe the info viewer is able to detect if
yes or no images are supported, and degrade gracefully to an alternative
(ascii art) when support is lacking?

Just some thoughts :)

Maxim




Information forwarded to guix-patches <at> gnu.org:
bug#27153; Package guix-patches. (Wed, 31 May 2017 06:45:01 GMT) Full text and rfc822 format available.

Message #14 received at 27153 <at> debbugs.gnu.org (full text, mbox):

From: Clément Lassieur <clement <at> lassieur.org>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: 27153 <at> debbugs.gnu.org
Subject: Re: bug#27153: gnu: sicp: Add the HTML version.
Date: Wed, 31 May 2017 08:44:06 +0200
Hi Maxim,

Maxim Cournoyer <maxim.cournoyer <at> gmail.com> writes:

> Also, couldn't the info version contain real figures (bitmaps)? Emacs is
> capable of displaying images; maybe the info viewer is able to detect if
> yes or no images are supported, and degrade gracefully to an alternative
> (ascii art) when support is lacking?

You're right, I think they should be displayed but for some reason they
aren't.  There is an 'Info-display-images-node' function in 'info.el.gz'
though, but the regexp there isn't matching anything.

Clément




Information forwarded to guix-patches <at> gnu.org:
bug#27153; Package guix-patches. (Wed, 31 May 2017 13:40:02 GMT) Full text and rfc822 format available.

Message #17 received at 27153 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Clément Lassieur <clement <at> lassieur.org>
Cc: 27153 <at> debbugs.gnu.org, Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Subject: Re: bug#27153: gnu: sicp: Add the HTML version.
Date: Wed, 31 May 2017 15:39:34 +0200
Hi,

Clément Lassieur <clement <at> lassieur.org> skribis:

> Maxim Cournoyer <maxim.cournoyer <at> gmail.com> writes:
>
>> Also, couldn't the info version contain real figures (bitmaps)? Emacs is
>> capable of displaying images; maybe the info viewer is able to detect if
>> yes or no images are supported, and degrade gracefully to an alternative
>> (ascii art) when support is lacking?
>
> You're right, I think they should be displayed but for some reason they
> aren't.

Could it be that they’re not installed in the right place?

The Guix manual has a couple of images (info "(guix) Invoking guix
graph") and they are properly displayed by Emacs on X11.

Thanks,
Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#27153; Package guix-patches. (Wed, 31 May 2017 13:41:01 GMT) Full text and rfc822 format available.

Message #20 received at 27153 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Clément Lassieur <clement <at> lassieur.org>
Cc: 27153 <at> debbugs.gnu.org
Subject: Re: bug#27153: [PATCH] gnu: sicp: Add the HTML version.
Date: Wed, 31 May 2017 15:39:54 +0200
Clément Lassieur <clement <at> lassieur.org> skribis:

> * gnu/packages/scheme.scm (sicp)[arguments]: Copy the HTML directory to the
> output.

LGTM, thanks!

Ludo'.




Reply sent to Clément Lassieur <clement <at> lassieur.org>:
You have taken responsibility. (Thu, 01 Jun 2017 09:10:02 GMT) Full text and rfc822 format available.

Notification sent to Clément Lassieur <clement <at> lassieur.org>:
bug acknowledged by developer. (Thu, 01 Jun 2017 09:10:02 GMT) Full text and rfc822 format available.

Message #25 received at 27153-done <at> debbugs.gnu.org (full text, mbox):

From: Clément Lassieur <clement <at> lassieur.org>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 27153-done <at> debbugs.gnu.org
Subject: Re: bug#27153: [PATCH] gnu: sicp: Add the HTML version.
Date: Thu, 01 Jun 2017 11:09:20 +0200
Ludovic Courtès <ludo <at> gnu.org> writes:

> Clément Lassieur <clement <at> lassieur.org> skribis:
>
>> * gnu/packages/scheme.scm (sicp)[arguments]: Copy the HTML directory to the
>> output.
>
> LGTM, thanks!
>
> Ludo'.

Pushed, thank you!




Information forwarded to guix-patches <at> gnu.org:
bug#27153; Package guix-patches. (Thu, 01 Jun 2017 13:28:02 GMT) Full text and rfc822 format available.

Message #28 received at 27153 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Allan Webber <cwebber <at> dustycloud.org>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 27153 <at> debbugs.gnu.org,
 Clément Lassieur <clement <at> lassieur.org>
Subject: Re: bug#27153: gnu: sicp: Add the HTML version.
Date: Thu, 01 Jun 2017 08:27:51 -0500
Ludovic Courtès writes:

> Hi,
>
> Clément Lassieur <clement <at> lassieur.org> skribis:
>
>> Maxim Cournoyer <maxim.cournoyer <at> gmail.com> writes:
>>
>>> Also, couldn't the info version contain real figures (bitmaps)? Emacs is
>>> capable of displaying images; maybe the info viewer is able to detect if
>>> yes or no images are supported, and degrade gracefully to an alternative
>>> (ascii art) when support is lacking?
>>
>> You're right, I think they should be displayed but for some reason they
>> aren't.
>
> Could it be that they’re not installed in the right place?
>
> The Guix manual has a couple of images (info "(guix) Invoking guix
> graph") and they are properly displayed by Emacs on X11.
>
> Thanks,
> Ludo’.

I think it's because the texinfo version has the images replaced with
ascii art, in most places!




Information forwarded to guix-patches <at> gnu.org:
bug#27153; Package guix-patches. (Sat, 03 Jun 2017 00:49:02 GMT) Full text and rfc822 format available.

Message #31 received at 27153 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Christopher Allan Webber <cwebber <at> dustycloud.org>
Cc: Ludovic Courtès <ludo <at> gnu.org>, 27153 <at> debbugs.gnu.org,
 Clément Lassieur <clement <at> lassieur.org>
Subject: Re: bug#27153: gnu: sicp: Add the HTML version.
Date: Fri, 2 Jun 2017 17:48:15 -0700
[Message part 1 (text/plain, inline)]
>
>
> I think it's because the texinfo version has the images replaced with
> ascii art, in most places!
>
>
OK. Not something we can fix at the package level then.

Maxim
[Message part 2 (text/html, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 01 Jul 2017 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 7 years and 356 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.