emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[nongnu] elpa/org-contrib 23cd791 1/2: lisp/ol-man.el: Delete


From: ELPA Syncer
Subject: [nongnu] elpa/org-contrib 23cd791 1/2: lisp/ol-man.el: Delete
Date: Wed, 13 Oct 2021 05:57:47 -0400 (EDT)

branch: elpa/org-contrib
commit 23cd791431a18437c0344ef196587c5b29d78b75
Author: Bastien Guerry <bzg@gnu.org>
Commit: Bastien Guerry <bzg@gnu.org>

    lisp/ol-man.el: Delete
    
    Moving this file to org-contrib was a mistake, fixed in upstream Org.
---
 README.md      |  1 -
 README.org     |  1 -
 lisp/ol-man.el | 85 ----------------------------------------------------------
 3 files changed, 87 deletions(-)

diff --git a/README.md b/README.md
index 5df1622..10ff6ee 100644
--- a/README.md
+++ b/README.md
@@ -113,7 +113,6 @@ find after the "Homepage:" keyword in the files themselves:
 -   **ol-bookmark.el:** Links to bookmarks
 -   **ol-elisp-symbol.el:** Links to Emacs-lisp symbols
 -   **ol-git-link.el:** Links to specific file version
--   **ol-man.el:** Links to man pages
 -   **ol-mew.el:** Links to Mew messages
 -   **ol-notmuch.el:** Links to notmuch messages
 -   **ol-vm.el:** Support for links to VM messages
diff --git a/README.org b/README.org
index d451778..9c06ccf 100644
--- a/README.org
+++ b/README.org
@@ -105,7 +105,6 @@ find after the "Homepage:" keyword in the files themselves:
 - ol-bookmark.el :: Links to bookmarks
 - ol-elisp-symbol.el :: Links to Emacs-lisp symbols
 - ol-git-link.el :: Links to specific file version
-- ol-man.el :: Links to man pages
 - ol-mew.el :: Links to Mew messages
 - ol-notmuch.el :: Links to notmuch messages
 - ol-vm.el :: Support for links to VM messages
diff --git a/lisp/ol-man.el b/lisp/ol-man.el
deleted file mode 100644
index 2be8ec9..0000000
--- a/lisp/ol-man.el
+++ /dev/null
@@ -1,85 +0,0 @@
-;;; ol-man.el --- Links to man pages
-;;
-;; Author: Carsten Dominik <carsten.dominik@gmail.com>
-;; Keywords: outlines, hypermedia, calendar, wp
-;; Homepage: https://orgmode.org
-;; Version: 1.0
-;;
-;; This file is not part of GNU Emacs.
-;;
-;; This program 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.
-
-;; This program 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.  If not, see <https://www.gnu.org/licenses/>.
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-
-(require 'ol)
-
-(org-link-set-parameters "man"
-                        :follow #'org-man-open
-                        :export #'org-man-export
-                        :store #'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.
-If PATH contains extra ::STRING which will use `occur' to search
-matched strings in man buffer."
-  (string-match "\\(.*?\\)\\(?:::\\(.*\\)\\)?$" path)
-  (let* ((command (match-string 1 path))
-        (search (match-string 2 path)))
-    (funcall org-man-command command)
-    (when search
-      (with-current-buffer (concat "*Man " command "*")
-       (goto-char (point-min))
-       (search-forward search)))))
-
-(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-link-store-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")))
-
-(defun org-man-export (link description format)
-  "Export a man page link from Org files."
-  (let ((path (format "http://man.he.net/?topic=%s&section=all"; link))
-       (desc (or description link)))
-    (cond
-     ((eq format 'html) (format "<a target=\"_blank\" href=\"%s\">%s</a>" path 
desc))
-     ((eq format 'latex) (format "\\href{%s}{%s}" path desc))
-     ((eq format 'texinfo) (format "@uref{%s,%s}" path desc))
-     ((eq format 'ascii) (format "%s (%s)" desc path))
-     ((eq format 'md) (format "[%s](%s)" desc path))
-     (t path))))
-
-(provide 'ol-man)
-
-;;; ol-man.el ends here



reply via email to

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