Re: [STUMP] Drop the generation of stumpwm.texi

Scott Jaderholm <[email protected]>
Newsgroups gmane.comp.window-managers.stumpwm.devel
Message-ID <CAA9PRe_gSaV-oJs2_r=MNMwCXCZL8NnaoiiioxBhhFy1+qfRjQ@mail.gmail.com>
On Mon, Nov 17, 2014 at 10:54 AM, David Bjergaard <[email protected]> wrote:
>> The complexity reduction is one of the benefits which I see in this.
>> There is also the fact that by editing `stumpwm.tex.in', sometimes it is
>> not clear how the manual will turn up because there is still the
>> processing part.
> The with this is that having them coupled does not increase the
> complexity of the workflow:
> 1. edit stumpwm.texi.in (usually to explain pedagogy)
> 2. type "make"
> 3. Read the resulting manual
> 4. Rinse and repeat.
>
> The new proposed work flow would be exactly the same, the only
> difference being that lisp would never be involved in making the
> stumpwm.texi file.

I wanted to share two things that I think might help here.

First, in Emacs when editing a .texi file you can run M-x
makeinfo-buffer and it will show the rendered info page in *info*.
With stumpwm.texi.in this won't do the processing step, but it can be
made to work I believe by customizing the variable
makeinfo-run-command to run something that foo_INFOPTS command in
Makefile.

Second, I wrote this command to render the docstring at point as
texinfo and display it in *info*.

(require 'thingatpt)

(defun jsj-render-docstring-as-texinfo ()
  "Render the docstring at point in an *info* buffer."
  (interactive)
  (save-excursion
    (while (in-string-p)
      (backward-char))
    (let ((docstring (thing-at-point 'sexp))
          (file  (make-temp-file "texinfo")))
      (with-temp-file file
        (insert "@setfilename " file " \n"
                "@node Top\n")
        (insert docstring))
      (find-file file)
      (makeinfo-buffer))))

Cheers,
Scott
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.