Mercurial > emacs
comparison lisp/org/org-docview.el @ 111506:5cb272c831e8
Install org-mode version 7.3
author | Carsten Dominik <carsten.dominik@gmail.com> |
---|---|
date | Thu, 11 Nov 2010 22:10:19 -0600 |
parents | 6452d50492bb |
children | a7740098b594 |
comparison
equal
deleted
inserted
replaced
111505:62aa3653746a | 111506:5cb272c831e8 |
---|---|
3 ;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. | 3 ;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. |
4 | 4 |
5 ;; Author: Jan Böcker <jan.boecker at jboecker dot de> | 5 ;; Author: Jan Böcker <jan.boecker at jboecker dot de> |
6 ;; Keywords: outlines, hypermedia, calendar, wp | 6 ;; Keywords: outlines, hypermedia, calendar, wp |
7 ;; Homepage: http://orgmode.org | 7 ;; Homepage: http://orgmode.org |
8 ;; Version: 7.01 | 8 ;; Version: 7.3 |
9 ;; | 9 ;; |
10 ;; This file is part of GNU Emacs. | 10 ;; This file is part of GNU Emacs. |
11 ;; | 11 ;; |
12 ;; GNU Emacs is free software: you can redistribute it and/or modify | 12 ;; GNU Emacs is free software: you can redistribute it and/or modify |
13 ;; it under the terms of the GNU General Public License as published by | 13 ;; it under the terms of the GNU General Public License as published by |
43 | 43 |
44 ;;; Code: | 44 ;;; Code: |
45 | 45 |
46 | 46 |
47 (require 'org) | 47 (require 'org) |
48 (eval-when-compile (require 'doc-view)) ; doc-view-current-page macro | 48 |
49 (declare-function doc-view-goto-page "ext:doc-view" (page)) | |
50 (declare-function image-mode-window-get "ext:image-mode" | |
51 (prop &optional winprops)) | |
49 | 52 |
50 (autoload 'doc-view-goto-page "doc-view") | 53 (autoload 'doc-view-goto-page "doc-view") |
51 | 54 |
52 (org-add-link-type "docview" 'org-docview-open) | 55 (org-add-link-type "docview" 'org-docview-open) |
53 (add-hook 'org-store-link-functions 'org-docview-store-link) | 56 (add-hook 'org-store-link-functions 'org-docview-store-link) |
64 (defun org-docview-store-link () | 67 (defun org-docview-store-link () |
65 "Store a link to a docview buffer." | 68 "Store a link to a docview buffer." |
66 (when (eq major-mode 'doc-view-mode) | 69 (when (eq major-mode 'doc-view-mode) |
67 ;; This buffer is in doc-view-mode | 70 ;; This buffer is in doc-view-mode |
68 (let* ((path buffer-file-name) | 71 (let* ((path buffer-file-name) |
69 (page (doc-view-current-page)) | 72 (page (image-mode-window-get 'page)) |
70 (link (concat "docview:" path "::" (number-to-string page))) | 73 (link (concat "docview:" path "::" (number-to-string page))) |
71 (description "")) | 74 (description "")) |
72 (org-store-link-props | 75 (org-store-link-props |
73 :type "docview" | 76 :type "docview" |
74 :link link | 77 :link link |