summaryrefslogtreecommitdiff
path: root/.emacs.d/org-7.4/contrib/lisp/org-man.el
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2011-05-17 16:27:50 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2011-05-17 16:27:50 -0400
commitb81536ad49001abf292bd31a0dcbf57e387387b1 (patch)
tree722cac2e9eab46a3b18d930dcd37703df48ebeba /.emacs.d/org-7.4/contrib/lisp/org-man.el
parent5b8794f1f5e82c1a220f36a724e5c8ce3335c462 (diff)
Fiddle with emacs config (when to use -n, -c), get emacs using el-get.
Diffstat (limited to '.emacs.d/org-7.4/contrib/lisp/org-man.el')
-rw-r--r--.emacs.d/org-7.4/contrib/lisp/org-man.el64
1 files changed, 0 insertions, 64 deletions
diff --git a/.emacs.d/org-7.4/contrib/lisp/org-man.el b/.emacs.d/org-7.4/contrib/lisp/org-man.el
deleted file mode 100644
index 27e8cca..0000000
--- a/.emacs.d/org-7.4/contrib/lisp/org-man.el
+++ /dev/null
@@ -1,64 +0,0 @@
-;;; org-man.el - Support for links to manpages in Org-mode
-;;
-;; Author: Carsten Dominik <carsten at orgmode dot org>
-;; Keywords: outlines, hypermedia, calendar, wp
-;; Homepage: http://orgmode.org
-;; Version: 1.0
-;;
-;; This file is not yet part of GNU Emacs.
-;;
-;; GNU Emacs is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 3, or (at your option)
-;; any later version.
-
-;; GNU Emacs is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-;; Boston, MA 02110-1301, USA.
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-
-(require 'org)
-
-(org-add-link-type "man" 'org-man-open)
-(add-hook 'org-store-link-functions 'org-man-store-link)
-
-(defcustom org-man-command 'man
- "The Emacs command to be used to display a man page."
- :group 'org-link
- :type '(choice (const man) (const woman)))
-
-(defun org-man-open (path)
- "Visit the manpage on PATH.
-PATH should be a topic that can be thrown at the man command."
- (funcall org-man-command path))
-
-(defun org-man-store-link ()
- "Store a link to a README file."
- (when (memq major-mode '(Man-mode woman-mode))
- ;; This is a man page, we do make this link
- (let* ((page (org-man-get-page-name))
- (link (concat "man:" page))
- (description (format "Manpage for %s" page)))
- (org-store-link-props
- :type "man"
- :link link
- :description description))))
-
-(defun org-man-get-page-name ()
- "Extract the page name from the buffer name."
- ;; This works for both `Man-mode' and `woman-mode'.
- (if (string-match " \\(\\S-+\\)\\*" (buffer-name))
- (match-string 1 (buffer-name))
- (error "Cannot create link to this man page")))
-
-(provide 'org-man)
-
-;;; org-man.el ends here