Org-mode mailing list
 help / color / mirror / Atom feed
* 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/)]
@ 2013-01-17  7:56 Дядов Васил Стоянов
  2013-01-24 15:12 ` Bastien
  0 siblings, 1 reply; 2+ messages in thread
From: Дядов Васил Стоянов @ 2013-01-17  7:56 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 610 bytes --]


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/)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Patch for org-docview.el --]
[-- Type: text/x-patch, Size: 953 bytes --]

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 "<a href=\"%s\">%s</a>"
+              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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: 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/)]
  2013-01-17  7:56 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/)] Дядов Васил Стоянов
@ 2013-01-24 15:12 ` Bastien
  0 siblings, 0 replies; 2+ messages in thread
From: Bastien @ 2013-01-24 15:12 UTC (permalink / raw)
  To: Дядов
	Васил
	Стоянов
  Cc: emacs-orgmode

vdyadov@elvees.com (Дядов Васил Стоянов) writes:

> Pathch for org-docview.el is attached.

I applied a slightly more general version of it:
http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=6f3cb7

Please add a proper ChangeLog for further patches.

Thanks!

-- 
 Bastien

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-01-24 15:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-17  7:56 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/)] Дядов Васил Стоянов
2013-01-24 15:12 ` Bastien

Org-mode mailing list

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://orgmode.org/list/0 list/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 list list/ https://orgmode.org/list \
		emacs-orgmode@gnu.org
	public-inbox-index list

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.emacs.orgmode
	nntp://news.gmane.io/gmane.emacs.orgmode


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git