emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#27153: closed (gnu: sicp: Add the HTML version.)


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#27153: closed (gnu: sicp: Add the HTML version.)
Date: Thu, 01 Jun 2017 09:10:02 +0000

Your message dated Thu, 01 Jun 2017 11:09:20 +0200
with message-id <address@hidden>
and subject line Re: bug#27153: [PATCH] gnu: sicp: Add the HTML version.
has caused the debbugs.gnu.org bug report #27153,
regarding gnu: sicp: Add the HTML version.
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
27153: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=27153
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: gnu: sicp: Add the HTML version. Date: Tue, 30 May 2017 23:05:42 +0200 User-agent: mu4e 0.9.18; emacs 25.2.1
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---



--- End Message ---
--- Begin Message --- Subject: Re: bug#27153: [PATCH] gnu: sicp: Add the HTML version. Date: Thu, 01 Jun 2017 11:09:20 +0200 User-agent: mu4e 0.9.18; emacs 25.2.1
Ludovic Courtès <address@hidden> writes:

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

Pushed, thank you!


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]