From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Kitchin Subject: :store for new link model Date: Sun, 03 Jul 2016 16:39:44 -0400 Message-ID: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50266) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bJoBJ-0006LS-FU for emacs-orgmode@gnu.org; Sun, 03 Jul 2016 16:39:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bJoBG-0003nM-7Z for emacs-orgmode@gnu.org; Sun, 03 Jul 2016 16:39:57 -0400 Received: from mail-qt0-x22c.google.com ([2607:f8b0:400d:c0d::22c]:34716) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bJoBG-0003nA-3o for emacs-orgmode@gnu.org; Sun, 03 Jul 2016 16:39:54 -0400 Received: by mail-qt0-x22c.google.com with SMTP id m2so80293134qtd.1 for ; Sun, 03 Jul 2016 13:39:53 -0700 (PDT) Received: from Johns-MacBook-Air.local (c-67-171-67-30.hsd1.pa.comcast.net. [67.171.67.30]) by smtp.gmail.com with ESMTPSA id o52sm917973qta.8.2016.07.03.13.39.50 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 03 Jul 2016 13:39:50 -0700 (PDT) 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" To: "emacs-orgmode@gnu.org" I was looking through all the changes needed to centralize the link code we have been discussing. One point we didn't discuss yet is the org-store-link-functions. These could be stored in a :store property in `org-link-parameters'. Instead of a variable for org-store-link-functions we could generate it on demand from org-link-parameters. Changing this isn't difficult, we just remove the add-hook lines below, and add :store 'func to the link definition. Right now, I expect this will look something like this: (org-add-link-type "bbdb" 'org-bbdb-open 'org-bbdb-export :store 'org-bbdb-store-link) I listed the places impacted by this below. As you can see, some are "core" and some are "contrib". Is there a protocol for modifying the contrib code? While thinking about this, would it be desirable for each of these changes to each file be a separate commit? Thanks, ./lisp/org-bbdb.el::200:(add-hook 'org-store-link-functions 'org-bbdb-store-link) ./lisp/org-bibtex.el:456:(add-hook 'org-store-link-functions 'org-bibtex-store-link) ./lisp/org-docview.el:53:(add-hook 'org-store-link-functions 'org-docview-store-link) ./lisp/org-eshell.el:31:(add-hook 'org-store-link-functions 'org-eshell-store-link) ./lisp/org-gnus.el:78:(add-hook 'org-store-link-functions 'org-gnus-store-link) ./lisp/org-id.el:636:;; so we do have to add it to `org-store-link-functions'. ./lisp/org-info.el:44:(add-hook 'org-store-link-functions 'org-info-store-link) ./lisp/org-irc.el:74:(add-to-list 'org-store-link-functions 'org-irc-store-link) ./lisp/org-mhe.el:78:(add-hook 'org-store-link-functions 'org-mhe-store-link) ./lisp/org-rmail.el:47:(add-hook 'org-store-link-functions 'org-rmail-store-link) ./lisp/org-w3m.el:49:(add-hook 'org-store-link-functions 'org-w3m-store-link) ./contrib/lisp/org-bookmark.el:51:(add-hook 'org-store-link-functions 'org-bookmark-store-link) ./contrib/lisp/org-ebib.el:27:(add-hook 'org-store-link-functions 'org-ebib-store-link) ./contrib/lisp/org-elisp-symbol.el:82:(add-hook 'org-store-link-functions 'org-elisp-symbol-store-link) ./contrib/lisp/org-eww.el:51:(add-hook 'org-store-link-functions 'org-eww-store-link) ./contrib/lisp/org-git-link.el:193:(add-hook 'org-store-link-functions 'org-git-store-link) ./contrib/lisp/org-mairix.el:86:(add-hook 'org-store-link-functions 'org-mairix-store-gnus-link) ./contrib/lisp/org-man.el:29:(add-hook 'org-store-link-functions 'org-man-store-link) ./contrib/lisp/org-mew.el:152:(add-hook 'org-store-link-functions 'org-mew-store-link) ./contrib/lisp/org-notmuch.el:69:(add-hook 'org-store-link-functions 'org-notmuch-store-link) ./contrib/lisp/org-notmuch.el:102:(add-hook 'org-store-link-functions 'org-notmuch-search-store-link) ./contrib/lisp/org-velocity.el:558: "Function for `org-store-link-functions'." ./contrib/lisp/org-velocity.el:563:(add-hook 'org-store-link-functions 'org-velocity-store-link) ./contrib/lisp/org-vm.el:60:(add-hook 'org-store-link-functions 'org-vm-store-link) ./contrib/lisp/org-wl.el:113:(add-hook 'org-store-link-functions 'org-wl-store-link) -- Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu