emacs-orgmode
[Top][All Lists]
Advanced

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

[Orgmode] Custom links


From: Sebastian Rose
Subject: [Orgmode] Custom links
Date: Thu, 09 Oct 2008 02:49:09 +0200
User-agent: Mozilla-Thunderbird 2.0.0.16 (X11/20080724)

Hi,


there where questions about custom links here from time to time.
I thought I'd share my way of displaying man pages, info pages
and such.


This is how I set up my custom links:


(setq org-link-abbrev-alist
  '(("man"     . "http://localhost/man.php?q=man&what=%s";)
    ("info"    . "http://localhost/man.php?q=info&what=%s";)
    ("help"    . "http://localhost/man.php?q=help&what=%s";)
    ("apropos" . "http://localhost/man.php?q=apropos&what=%s";)
     ;;; etc. several more...
    ))

As you can see here, I prefer to BROWSE man pages.
I hate to clutter my emacs session with buffers like *man*.

The "http://localhost/devel/man.php"; is attached to this mail. It's not
the version I use localy (that is included in a knowledge base app I
wrote), but it's just working that way.

The man.php does display links in Org-files like

[[man:man][How to use the man command]]
[[man:man 7][How to write manpages]]
[[help:man][man --help]]
[[info:man][Read about man in info]] needs info2html or info2www.
[[apropos:man][man -k -- find man pages refering to man]]


man.php also turns the names of man pages in the 'SEE ALSO' section
into hyperlinks. Same is true for the names of man pages listed in the
apropos' output. This way, you can BROWSE YOUR MAN PAGES.

A big advantage is the use of tabs in a web browser like opera or
firefox.

The script is easy to set up if you have a webserver running locally. It's not meant for a public installation, where you don't want to allow
scripts to execute shell commands. Having 'man' installed, a webserver
is just an 'apt-get install apache2 php5' or 'rpm -I apache2 php5'.
You might also need to install one or two packages from the roff
family, to create the HTML output.

I could not live without a webserver and database installed. Can you?

The setup is just as simple. Put man.php in a directory under your
localhost's web root and adjust the three values in the SETUP section.

Happy browsing,

 - Sebastian

Attachment: man.php
Description: application/httpd-php


reply via email to

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