From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Kitchin Subject: transitioning links defined in packages from pre org-9 to org-9 Date: Fri, 04 Nov 2016 08:15:08 -0400 Message-ID: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51666) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c2dOt-0004SS-Gk for emacs-orgmode@gnu.org; Fri, 04 Nov 2016 08:15:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c2dOq-0007dF-C2 for emacs-orgmode@gnu.org; Fri, 04 Nov 2016 08:15:15 -0400 Received: from mail-qt0-x231.google.com ([2607:f8b0:400d:c0d::231]:34908) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c2dOq-0007c6-5J for emacs-orgmode@gnu.org; Fri, 04 Nov 2016 08:15:12 -0400 Received: by mail-qt0-x231.google.com with SMTP id c47so46577994qtc.2 for ; Fri, 04 Nov 2016 05:15:12 -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 m129sm7282733qkb.48.2016.11.04.05.15.09 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 04 Nov 2016 05:15:09 -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" Hi, I am working through a transition from org8 to org9, and trying to figure out how to update packages that define links in way that doesn't break people not ready to update org. For example, in mu4e there is an mu4e link defined that needs to be updated so I can store links in emails. Also, org-ref will get an overhaul on links, but a lot of my students will still be on org-8. Is something like this robust? Any other suggestions? (if (string-prefix-p "9" (org-release)) (org-link-set-parameters "mu4e" :follow 'org-mu4e-open :store 'org-mu4e-store-link) ;; org versions less than 9 (org-add-link-type "mu4e" 'org-mu4e-open) (add-hook 'org-store-link-functions 'org-mu4e-store-link)) Would it make sense to have some macros to facilitate this? e.g. something like (org-9 (org-link-set-parameters "mu4e" :follow 'org-mu4e-open :store 'org-mu4e-store-link)) (org-8 (org-add-link-type "mu4e" 'org-mu4e-open) (add-hook 'org-store-link-functions 'org-mu4e-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