From: Richard Kim <emacs18@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: org-link-set-parameters missing in ELPA version
Date: Sun, 11 Sep 2016 11:55:01 -0700 [thread overview]
Message-ID: <qtmoa3unu62.fsf@gmail.com> (raw)
In-Reply-To: CAK=ukcaDHe0ukSB3p2bJ6iVQAmF+WxeGhED35u9UxGiri9GzgQ@mail.gmail.com
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 <heikki.lehvaslaiho@gmail.com> 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 <rduncan@tesla.com> 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 <jkitchin@andrew.cmu.edu> 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 <jkitchin@andrew.cmu.edu<mailto:jkitchin@andrew.cmu.edu>> 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<http://kitchingroup.cheme.cmu.edu/>
>> >>
>> >>
>> >> On Sat, Aug 20, 2016 at 2:45 PM, Rob Duncan <rduncan@tesla.com<mailto:rduncan@tesla.com>> 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
>>
prev parent reply other threads:[~2016-09-11 18:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-20 18:45 org-link-set-parameters missing in ELPA version Rob Duncan
2016-08-20 18:56 ` John Kitchin
2016-08-20 20:57 ` Rob Duncan
2016-08-24 3:22 ` Anthony Lander
2016-08-26 1:15 ` John Kitchin
2016-08-26 1:31 ` Rob Duncan
2016-09-02 9:34 ` Heikki Lehvaslaiho
2016-09-11 18:55 ` Richard Kim [this message]
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=qtmoa3unu62.fsf@gmail.com \
--to=emacs18@gmail.com \
--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).