emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Tokuya Kameshima <kames@fa2.so-net.ne.jp>
To: emacs-orgmode@gnu.org
Cc: kames@fa2.so-net.ne.jp
Subject: org-bookmark.el
Date: Thu, 28 Feb 2008 00:39:53 +0900	[thread overview]
Message-ID: <uzltmpfw6.wl%kames@fa2.so-net.ne.jp> (raw)

Hi,

I wrote an emacs code, org-bookmark.el, which supports for orgmode
links to Emacs bookmarks.  You can store the links in the Bookmark
List buffer by running M-x org-store-link.

Not sure it's useful, but I regularly uses this bookmark links to
follow daily or weekly changing file links.

Thanks,
--Tokuya

\f
;;; org-bookmark.el - Support for links to Emacs bookmark
;; Carstens outline-mode for keeping track of everything.
;; Copyright (C) 2008 Free Software Foundation, Inc.
;;
;; Author: Tokuya Kameshima <kames AT fa2.so-net.ne.jp>
;; Version: 1.0
;; Keywords: outlines, hypermedia, calendar, wp
;;
;; This file is part of GNU Emacs.
;;
;; 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.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(require 'org)
(require 'bookmark)

(org-add-link-type "bookmark" 'org-bookmark-open)
(add-hook 'org-store-link-functions 'org-bookmark-store-link)

(defun org-bookmark-open (bookmark)
  "Visit the bookmark BOOKMARK."
  (bookmark-jump bookmark))

(defun org-bookmark-store-link ()
  "Store a link to the current line's bookmark in Emacs bookmark list window."
  (if (eq major-mode 'bookmark-bmenu-mode)
      (let ((bookmark (bookmark-bmenu-bookmark)))
	(if bookmark
	    (org-store-link-props :link (org-make-link "bookmark:" bookmark)
				  :description bookmark)))))

(provide 'org-bookmark)

;;; org-bookmark.el ends here

             reply	other threads:[~2008-02-27 15:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-27 15:39 Tokuya Kameshima [this message]
2008-02-27 16:06 ` org-bookmark.el Carsten Dominik
2008-02-27 16:21 ` org-bookmark.el Bastien Guerry
2008-02-28 14:20   ` org-bookmark.el Tokuya Kameshima
2008-02-28 15:04     ` org-bookmark.el Bastien
2008-02-28 16:02       ` org-bookmark.el Phil Jackson
2008-02-28 19:54         ` org-bookmark.el Bastien
2008-02-28 20:53           ` org-bookmark.el Phil Jackson
2008-02-29  1:14             ` org-bookmark.el Bastien Guerry
2008-02-29 14:25               ` org-bookmark.el Tokuya Kameshima
2008-02-29 18:47                 ` org-bookmark.el Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=uzltmpfw6.wl%kames@fa2.so-net.ne.jp \
    --to=kames@fa2.so-net.ne.jp \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).