emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Invalid function: org-with-silent-modifications
@ 2013-09-26 12:22 Sebastien Vauban
  0 siblings, 0 replies; only message in thread
From: Sebastien Vauban @ 2013-09-26 12:22 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ; +Cc: Bastien

Hello,

Trying to provide batch Emacs/Org scripts to colleagues, I must ensure that
they have Org 8.

I wrote the following code so that users which have a default (Cygwin) Emacs
24.3.1 (with the default Org 7.9.3f) are proposed an upgrade through the
`package' manager:

--8<---------------cut here---------------start------------->8---
(require 'package)
(add-to-list 'package-archives '("org" . "http://orgmode.org/elpa/"))
(package-initialize)

;; version info
(let ((org-dir (file-name-directory (locate-library "org"))))
  (message "Org mode version %s (org @ %s)" (org-version) org-dir))

(unless (string-match "^8" (org-version))
  (message "This version of Org mode is no longer supported")
  (if (yes-or-no-p (format "Install package `%s'? " 'org))
      (ignore-errors
        (package-install 'org))
    (setq debug-on-error nil)
    (error "Please upgrade to 8 or later")))
--8<---------------cut here---------------end--------------->8---

Problem experienced by colleagues: "Invalid function:
org-with-silent-modifications".

Looking on the web, I find a post [1] where Bastien tells:

    When installing from ELPA, please do so from a fresh Emacs session where no
    Org function has been called.

That wasn't the case in the above code, as I first had to call `org-version' to
check for their current version, then install from ELPA if they don't have an
Org 8...

So,

- Is there a way to unload Org before installing from ELPA?  (= workaround)

or better:

- Is there a way to fix the problem?  (= solution)

Best regards,
  Seb

[1] http://comments.gmane.org/gmane.emacs.orgmode/70880

--
Sebastien Vauban

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-09-26 12:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-26 12:22 Invalid function: org-with-silent-modifications Sebastien Vauban

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).