Wilfred / helpful

A better Emacs *help* buffer
1.1k stars 62 forks source link

New syntax to link to manpages when available #94

Open vermiculus opened 6 years ago

vermiculus commented 6 years ago

It'd be really slick if we could link to manpages.

(defun my-crazy-function ()
  "Use Git configuration variables to do fancy things.

See (man)git-config."
  '(blah blah blah))

In normal help-mode buffers, it would obviously just show as (man)git-config. In helpful buffers, it could link out to the manpage if those facilities are available and if that page exists.

Wilfred commented 6 years ago

Interesting idea! Are there projects that currently use this syntax, or are you proposing new syntax for docstrings?

vermiculus commented 6 years ago

As far as I know, I'm proposing new syntax. It would be particularly useful for projects like Magit which wrap a large number of documented CLI tools.

zabe40 commented 2 years ago

As of Emacs 28 there's an included link type for linking to man pages in docstrings! Heres the NEWS entry about it. It would really be great if helpful could format these links, and would be doubly helpful for older versions of emacs using newer packages that include these links in their docstrings.

nagy commented 1 year ago

As of Emacs 28 there's an included link type for linking to man pages in docstrings!

Here is the documentation page for this https://www.gnu.org/software/emacs/manual/html_node/elisp/Documentation-Tips.html ( search for "hyperlinks for"). It also supports other word recognition prefixes like "info node" and "customization group" and "face"