From mboxrd@z Thu Jan 1 00:00:00 1970 From: Richard Kim Subject: Re: org-link-set-parameters missing in ELPA version Date: Sun, 11 Sep 2016 11:55:01 -0700 Message-ID: References: <38E5F957-E52C-406F-98E4-BDA05D4A41A4@tesla.com> <9A7CFB81-FD91-4644-B4B1-A2B040091FB8@tesla.com> Reply-To: emacs18@gmail.com Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49725) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bj9ue-0001yt-FN for emacs-orgmode@gnu.org; Sun, 11 Sep 2016 14:55:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bj9ua-0007Vo-8L for emacs-orgmode@gnu.org; Sun, 11 Sep 2016 14:55:31 -0400 Received: from [195.159.176.226] (port=43496 helo=blaine.gmane.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bj9uZ-0007To-Tv for emacs-orgmode@gnu.org; Sun, 11 Sep 2016 14:55:28 -0400 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1bj9uJ-0004fM-Ri for emacs-orgmode@gnu.org; Sun, 11 Sep 2016 20:55:11 +0200 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 added the following elisp code at the start of my ~/.emacs to deal with this problem. My analysis of the problem is described in the comments. In short the root cause seems to be loading built-in org.el during initialization rather than org.el from either org-plus-contrib or org add-on packages. Symbols such as org-link-set-parameters are not defined in built-in org.el of emacs 25. They are defined only in newer versions of org package. I use my own build of the following which is re-built once a week or two: - emacs 25 from 'emacs-25' git branch - org and org-plus-contribute packages from git source files - spacemacs from 'develop' git branch If I have erred in my analysis of the root cause, please let me know. What I know is that before I started using the code below, I would get emacs startup error every time after I removed all installed packages. With this code, I no longer see any failure. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Bootstrap `org-plus-contrib' and/or `org' packages ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; The purpose of this section is to make sure that org-mode package(s) are ;; installed and setup early on so as to prevent built-in org-mode files from ;; getting loaded. The built-in org-mode commands are autoloaded so that none ;; of the built-in org files are actually loaded when emacs starts up. However ;; it is easy to get one or more org files to get loaded directly or indirectly ;; by using one or more org mode functions. Once that happens, then it is ;; nearly impossible to fix this. For example if built-in org.el gets loaded, ;; then subsequent (require 'org) will not reload org.el even if an org package ;; was installed which provided newer org.el! A workaround is to make sure that ;; the org package(s) are not only installed, but also activated (i.e., ;; `load-path' setup) so that the first time (require 'org) is done, it will ;; cause the newer org.el to be loaded rather than the built in one. ;; Where to find packages to install from. If spacemacs is loaded, then it is ;; important that `package-archives' value here is the same as the one embedded ;; in spacemacs. Otherwise strange errors may pop up. (if (file-directory-p "/u/me/public_html/elpa/elpa/") (custom-set-variables `(package-archives `(("my-elpa" . ,(expand-file-name "/u/me/public_html/elpa/elpa/")) ("my-orgmode" . ,(expand-file-name "/u/me/public_html/elpa/orgmode/"))))) (custom-set-variables `(package-archives `(("melpa" . "https://melpa.org/packages/") ("orgmode" . "http://orgmode.org/elpa/")))) ) ;; Where to install packages to. Spacemacs honors this as of about Aug 2016. (setq package-user-dir "/u/me/opt/elpa25/") ;; Do not activate all installed packages at the end of startup processing. ;; I activate packages as needed. (setq package-enable-at-startup nil) ;; We must initialize packages before we can call `package-installed-p'. ;; However just do minimal setup (via 'no-activate optional argument), i.e., do ;; not activate any packages. Without `no-activate', all installed packages are ;; activated. (unless (bound-and-true-p package--initialized) (package-initialize 'no-activate) (package-refresh-contents) ;; I use `use-package' to install and setup all packages except `use-pacakge' ;; itself. You can't use it if it is not already installed and activated. So ;; make sure that it is installed and setup using only built-in package.el ;; functions. (if (package-installed-p 'use-package) (package-activate 'use-package) ; just activate if already installed (package-install 'use-package)) ;; We *must* install `org-plus-contrib' or `org' package very early on so that ;; these shadow the built-in org-mode files. If this is not done early, and one ;; or more of the built-in org-mode files are loaded during emacs startup, then ;; failures may arise later on while installing `org-plus-contrib' or `org' ;; packages. Typical errors in such case are "void-function ;; org-link-set-parameters" or "void-function org-link-types". Such errors ;; started popping up with spacemacs around August 2016 when emacs is started ;; after removing all installed packages which forced installation of all ;; needed packages. ;; ;; The need to install this early on is the reason for all the setup done so far. (use-package org-plus-contrib :ensure t :defer t) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Setup spacemacs ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (setq spacemacs-start-directory "/u/me/opt/spacemacs/") (load-file (expand-file-name "init.el" spacemacs-start-directory)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Setup my stuff ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (load "/u/me/Private/elisp/init.el") Heikki Lehvaslaiho writes: > I've been experiencing similar problems with increasing annoyance > level for over a month. Thanks to these comments I think I got to the > bottom of it! > > The MELPA package org-mac-link (latest is org-mac-link-20160808.220) > has clearly continued being updated with new code that include calls > to org-link-set-parameters. The org-mac-link.el in package > org-plus-contrib has the code that works with org v8. Everyone who has > been using MELPA, especially with use-package, to load org-mac-link.el > has not been using the code in org-plus-contrib. > > I removed the downloaded org-mac-link package files and the > corresponding depends-on line from my Cask file, and reverted to old > require syntax to load org-mac-link . Problem solved. > > -Heikki > > Heikki Lehväslaiho - skype:heikki_lehvaslaiho cell: +358 40 850 6640 > http://about.me/heikki > > On 26 August 2016 at 04:31, Rob Duncan wrote: >> >> Hi John, >> >> I deleted my existing packages and installed org-plus-contrib-20160822 and everything works again. >> >> Thanks very much! >> >> Rob. >> >> > On Aug 25, 2016, at 6:15 PM, John Kitchin wrote: >> > >> > I haven't been able to reproduce this in org-plus-contrib-20160822. >> > >> > Rob Duncan writes: >> > >> >> Hi John, >> >> >> >> My org is claiming to be version 8.3.5: >> >> >> >> Org-mode version 8.3.5 (8.3.5-elpa @ /Users/rduncan/.emacs.d/elpa/org-20160815/) >> >> >> >> Rob. >> >> >> >> On Aug 20, 2016, at 11:56 AM, John Kitchin > wrote: >> >> >> >> that seems weird, I thought that should only be in org 9. Is that on ELPA somehow? >> >> >> >> John >> >> >> >> ----------------------------------- >> >> 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 >> >> >> >> >> >> On Sat, Aug 20, 2016 at 2:45 PM, Rob Duncan > wrote: >> >> I just installed org-mac-link version 20160808.220 from ELPA and I’m no longer able to insert links from Mail.app and other applications. It used to work… >> >> >> >> When I try to manually load org-mac-link.el I get this error message: >> >> >> >> eval-buffer: Symbol’s function definition is void: org-link-set-parameters >> >> >> >> Did I mess up the install, or is the package broken somehow? >> >> >> >> Thanks, >> >> >> >> Rob. >> > >> > >> > -- >> > 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 >>