[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: elisp documentation links to emacs doc
From: |
Alan Mackenzie |
Subject: |
Re: elisp documentation links to emacs doc |
Date: |
Sat, 12 Jan 2008 11:50:39 +0000 |
User-agent: |
Mutt/1.5.9i |
Hi, Xah!
On Fri, Jan 11, 2008 at 07:06:25PM -0800, xah lee wrote:
> In the official HTML version of the elisp doc, there are many links to
> the emacs doc nodes. (i counted, 101 of them.)
[ .... ]
> My problem is that for those who only install one doc, then the links
> are dead.
> Are people suppose do always install these 2 docs together? If not,
> is there some mechanism, either when writing the doc or generating
> the doc, to not result in links to other docs?
I had this problem in cc-mode.sourceforge.net: my solution was to fix the
html files, redirecting all {links to the non-existent directories
../emacs and ../elisp} to
http://www.gnu.org/software/emacs/manual/html_node/e{macs,lisp}/
Here is the script I use, called "2www.gnu.org.sh" - (it also deletes a
reference to the non-existent GNU Indent manual). Feel free to adapt it
to your needs.
#########################################################################
#!/bin/sh
# Fix all http links to the Emacs or Elisp manual.
#
# These are redirected from, e.g., "../emacs" to the existing page at
# www.gnu.org. The link to the indent manual is deleted, because there is no
# online copy of this.
#
# This script takes exactly 1 parameter, the directory to run in.
# e.g. % 2www.gnu.org.sh ~/cc-mode/html
CURDIR=`pwd`
cd $1
for f in *.html
do mv $f asdf.html
sed
's%href="../emacs/%href="http://www.gnu.org/software/emacs/manual/html_node/emacs/%g
s%href="../elisp/%href="http://www.gnu.org/software/emacs/manual/html_node/elisp/%g'
\
asdf.html > $f
done
mv Limitations-and-Known-Bugs.html asdf.html
sed "s%<[^<>]*>GNU indent ([^()]*)</a>%GNU indent%" \
asdf.html > Limitations-and-Known-Bugs.html
rm asdf.html
cd $CURDIR
#########################################################################
> Thanks.
> Xah
--
Alan Mackenzie (Nuremberg, Germany)