From mboxrd@z Thu Jan 1 00:00:00 1970 From: torys.anderson@gmail.com (Tory S. Anderson) Subject: [DONE] Re: Org Linking to Bookmark [+] Date: Wed, 11 Feb 2015 11:45:59 -0500 Message-ID: <87r3tw8khk.fsf_-_@gmail.com> References: <8761b8acrq.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35885) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YLaQR-000491-5X for emacs-orgmode@gnu.org; Wed, 11 Feb 2015 11:46:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YLaQM-0001xh-7m for emacs-orgmode@gnu.org; Wed, 11 Feb 2015 11:46:07 -0500 Received: from mail-qc0-x233.google.com ([2607:f8b0:400d:c01::233]:34504) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YLaQM-0001xb-48 for emacs-orgmode@gnu.org; Wed, 11 Feb 2015 11:46:02 -0500 Received: by mail-qc0-f179.google.com with SMTP id r5so3826203qcx.10 for ; Wed, 11 Feb 2015 08:46:01 -0800 (PST) In-Reply-To: (Drew Adams's message of "Wed, 11 Feb 2015 06:46:50 -0800 (PST)") 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: Drew Adams Cc: orgmode list Thanks, Drew; I have it now. To all concerned, it's easy to add bookmark+ link support to org-mode with the following: --8<---------------cut here---------------start------------->8--- ;;; * bmkp links http://orgmode.org/manual/Adding-hyperlink-types.html (org-add-link-type "bmkp" 'org-bmkp-open) (add-hook 'org-store-link-functions 'org-bmkp-store-link) (defcustom org-bmkp-command 'bookmark-jump "The Emacs command to be used to display a bmkp page." :group 'org-link :type '(choice (const bookmark-jump) (const bookmark-jump-other-window))) (defun org-bmkp-open (path) "Visit the bmkppage on PATH. PATH should be a bookmark name that can be thrown at the `bookmark-jump' function." (funcall org-bmkp-command path)) (defun org-bmkp-store-link () "Store a link to a bmkp bookmark." (when (memq major-mode '(bookmark-bmenu-mode)) (let* ((bookmark (bookmark-bmenu-bookmark)) (link (concat "bmkp:" bookmark)) (description (format "Bookmark: %s" bookmark))) (org-store-link-props :type "bmkp" :link link :description description)))) --8<---------------cut here---------------end--------------->8--- Drew Adams writes: >> (defun org-bmkp-store-link () >> "Store a link to a bmkp bookmark." >> (when (memq major-mode '(bookmark-bmenu-mode)) >> (let* ((bookmark (org-bmkp-get-bookmark-name)) > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > | > v > (bookmark-bmenu-bookmark) > > It looks like you are trying to get the name of the bookmark at > point in buffer `*Bookmark List*'. To do that, just evaluate > (bookmark-bmenu-bookmark). > > For Bookmark+, if you pass that function a non-nil arg then you > get the full bookmark record, not just the name. (But anyway, > most bookmark functions accept either the name or the bookmark.) > > (No relation with Org links, but you can also create simple, > non-persistent bookmark links using `bmkp-insert-bookmark-link'. > Dunno whether that will help with what you want to do. > http://www.emacswiki.org/emacs/BookmarkPlus#BookmarkLinks)