Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

broken ref on offset.rst #5

Open
zzak opened this issue Oct 16, 2013 · 5 comments
Open

broken ref on offset.rst #5

zzak opened this issue Oct 16, 2013 · 5 comments

Comments

@zzak
Copy link
Contributor

zzak commented Oct 16, 2013

If you check in this section, you'll see below something like:

In other cases, there can be several applicable methods. Consider the generic function say-greeting, shown in The say-greeting generic function and its methods. :ref:applicable-methods-for-say-greeting shows that...

I believe the The say-greeting generic function and its methods part is supposed to be a ref to say-greeting-gf-methods.

I tried to write a patch for this, such as:

diff --git a/source/offset.rst b/source/offset.rst
index edecafa..00e813b 100644
--- a/source/offset.rst
+++ b/source/offset.rst
@@ -542,8 +542,7 @@ there is no applicable method, the “No applicable method” error is
 signaled. There is no need to continue to step 2.

 In other cases, there can be several applicable methods. Consider the
-generic function ``say-greeting``, shown in `The say-greeting generic
-function and its methods <say-greeting-gf-methods>`_.
+generic function ``say-greeting``, shown in :ref:`say-greeting-gf-methods`.
 :ref:`applicable-methods-for-say-greeting` shows that, for certain
 arguments, one method is applicable, but that, for an integer argument,
 two methods are applicable.

But it wasn't working..

If you could tell me what I'm doing wrong, or how to fix this patch I'd love to fix it, and any other doc bugs I run into with Dylan!

@fracek
Copy link
Member

fracek commented Oct 16, 2013

If you check in this section, you'll see below something like:

In other cases, there can be several applicable methods. Consider the generic function say-greeting, shown in The say-greeting generic function and its methods. :ref:applicable-methods-for-say-greeting shows that...

I believe the The say-greeting generic function and its methods part is supposed to be a ref to say-greeting-gf-methods.

If you look at that page on the website (or locally) you can see it's correct. http://opendylan.org/books/dpg/offset.html
This is because we use a Sphinx extension for Open Dylan that among other things is responsible for cross reference etc.
(Bruce can explain this better). Because GitHub doesn't use it when showing a preview of the file you'll notice that
most .rst files look "wrong".

If you want to help with the documentation you're welcome and I can help you setup your environment so you can generate
the pages locally.

@zzak
Copy link
Contributor Author

zzak commented Oct 16, 2013

I should mention that I'm building this locally, I just used Github as a reference

@fracek
Copy link
Member

fracek commented Oct 16, 2013

I should mention that I'm building this locally, I just used Github as a reference

I have no idea why it's failing then.
Now it's a good time for the usual questions:

  • What version of Sphinx are you using?
  • Do you have sphinx-extensions in your PYTHONPATH?
  • Can you attach the output of the make command?

Thanks

@zzak
Copy link
Contributor Author

zzak commented Oct 16, 2013

  • What version of Sphinx are you using?
    Sphinx v1.2b3
  • Do you have sphinx-extensions in your PYTHONPATH?
>>> import sys
>>> sys.path
['', '/Library/Python/2.7/site-packages/Sphinx-1.2b3dev_20131010-py2.7.egg', '/Library/Python/2.7/site-packages/Jinja2-2.7.1-py2.7.egg', '/Library/Python/2.7/site-packages/docutils-0.11-py2.7.egg', '/Library/Python/2.7/site-packages/Pygments-1.6-py2.7.egg', '/Library/Python/2.7/site-packages/MarkupSafe-0.18-py2.7-macosx-10.8-intel.egg', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC', '/Library/Python/2.7/site-packages']
  • Can you attach the output of the make command?
$ make html
sphinx-build -b html -d build/doctrees   source build/html
Making output directory...
Running Sphinx v1.2b3
loading pickled environment... not yet created
building [html]: targets for 32 source files that are out of date
updating environment: 32 added, 0 changed, 0 removed
reading sources... [100%] usr-class
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] usr-class
/Users/zzak/projects/dylan-programming-book/source/offset.rst:544: WARNING: undefined label: say-greeting-gf-methods (if the link has no caption the label must precede a section header)
writing additional files... genindex search
copying images... [100%] images/figure-13-2.png
copying static files... WARNING: html_static_path entry u'/Users/zzak/projects/dylan-programming-book/source/_static' does not exist
done
copying extra files... dumping search index... done
dumping object inventory... done
build succeeded, 2 warnings.

Build finished. The HTML pages are in build/html.

@zzak
Copy link
Contributor Author

zzak commented Oct 16, 2013

Looking at my ref, and the one that proceeds it :ref:applicable-methods-for-say-greeting shows that... they look like the same syntax so I'm not sure why I get this warning:

/Users/zzak/projects/dylan-programming-book/source/offset.rst:544: WARNING: undefined label: say-greeting-gf-methods (if the link has no caption the label must precede a section header)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants