emacs-devel
[Top][All Lists]
Advanced

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

RE: 5x5 documentation


From: Drew Adams
Subject: RE: 5x5 documentation
Date: Wed, 22 Jun 2011 10:55:20 -0700

> It seems that there was a mistunderstanding, I thought
> that your module allows to add some addtional markup
> into the doctstring itself (similar to \\[...]) to
> display some part of some manual instead of the docstring
> content.
        
Nope.
        
> Here is the use case I was thinking of...

Yes, what I did probably won't help you with that, at least not directly.
AFAICT, the Calc stuff is pretty much a special case.

If, on the other hand, the Calc function `cos' had a doc string, then the `C-h f
cos' output would, with my code, include a link to its doc in the Calc manual.

In fact, because there is also an Emacs-Lisp function named `cos', `C-h f cos'
does show *Help*, and it does therefore show a link to the manuals.

When you then click that manuals link, and assuming option
`help-cross-reference-manuals' says to check the Calc manual (i.e., if it has
value `all' or a list containing "calc"), you'll get an Info virtual index with
a link to the location in the Calc manual.

For example, with value `all', so that all manuals are searched, I get this
virtual index when I click `manuals':

* cos [elisp]: (elisp)Math Functions
* cos [calc]:  (calc)Trigonometric and Hyperbolic Functions

That won't work for something like `sinh', however, because `C-h f' does not
recognize `sinh' (no match) - there is no doc for that function.

If calc-math.el has been loaded, then `C-h f calc-sinh' does show *Help* (with
just "Not documented").  But because the Calc manual index entry for this is
`sinh', not `calc-sinh', no `manuals' link is added to *Help* for this:
`calc-sinh' is indexed.

See my comment about `describe-package' - this is similar.  In the case of
package names, the index entries have " package" appended to the names, so in
`describe-package' I set up the manuals link to look for the package name with
that text appended.

Something similar could be done for Calc perhaps (remove the `calc-' to get the
proper index entry), but we probably would not want to do that at the level of
the general command `describe-function' (`C-h f').  It might be appropriate to
do it for a Calc-specific help command, but it seems that Calc already gives you
everything you could want in this regard.

In sum, what I've done probably won't help you directly, and it won't do what
you describe as the special, built-in behavior for looking up stuff in the Calc
manual.  But it could perhaps be leveraged, the same as is done for other
`describe-*' functions.




reply via email to

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