From mboxrd@z Thu Jan 1 00:00:00 1970 From: vdyadov@elvees.com (=?utf-8?B?0JTRj9C00L7QsiDQktCw0YHQuNC7INCh0YI=?= =?utf-8?B?0L7Rj9C90L7Qsg==?=) Subject: Bug: Patch for org-docview: make normal links from docview: links on export from org to html [7.9.3d (release_7.9.3d-1-g115bd7 @ /home/vdyadov/Work/Tools/emacs/share/emacs/24.2/lisp/org/)] Date: Thu, 17 Jan 2013 11:56:16 +0400 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([208.118.235.92]:32964) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvkKW-0006bc-Sf for emacs-orgmode@gnu.org; Thu, 17 Jan 2013 02:56:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TvkKU-0005iG-9l for emacs-orgmode@gnu.org; Thu, 17 Jan 2013 02:56:08 -0500 Received: from mail.elvees.com ([80.90.126.250]:57196) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvkKT-0005iA-TO for emacs-orgmode@gnu.org; Thu, 17 Jan 2013 02:56:06 -0500 Received: from canopus-pc.elvees.com.elvees.com (horse.elvees.com [80.90.126.253]) (authenticated bits=0) by mail.elvees.com (8.14.3/8.14.2) with ESMTP id r0H7tsAN005640 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT) for ; Thu, 17 Jan 2013 11:55:54 +0400 (MSK) (envelope-from vdyadov@elvees.com) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Remember to cover the basics, that is, what you expected to happen and what in fact did happen. You don't know how to make a good report? See http://orgmode.org/manual/Feedback.html#Feedback Your bug report will be posted to the Org-mode mailing list. ------------------------------------------------------------------------ Pathch for org-docview.el is attached. Emacs : GNU Emacs 24.2.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.18.9) of 2012-12-25 on canopus-pc.elvees.com Package: Org-mode version 7.9.3d (release_7.9.3d-1-g115bd7 @ /home/vdyadov/Work/Tools/emacs/share/emacs/24.2/lisp/org/) --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=org-docview.patch Content-Description: Patch for org-docview.el diff -Naur a/org-docview.el b/org-docview.el --- a/org-docview.el 2013-01-17 11:45:13.389208433 +0400 +++ b/org-docview.el 2013-01-17 11:47:43.881896241 +0400 @@ -51,9 +51,20 @@ (autoload 'doc-view-goto-page "doc-view") -(org-add-link-type "docview" 'org-docview-open) +(org-add-link-type "docview" 'org-docview-open 'org-docview-link-export) (add-hook 'org-store-link-functions 'org-docview-store-link) +(defun org-docview-link-export (link description format) + "Export a docview link from Org files." + (let* ((path (when (string-match "\\(.+\\)::.+" link) + (match-string 1 link))) + (desc (or description link))) + (cond + ((eq format 'html) + (format "%s" + path desc)) + (t path)))) + (defun org-docview-open (link) (when (string-match "\\(.*\\)::\\([0-9]+\\)$" link) (let* ((path (match-string 1 link)) Diff finished. Thu Jan 17 11:49:46 2013 --=-=-=--