emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-install not defining org-mode-map?
@ 2012-05-15  5:13 Eric Abrahamsen
  2012-05-15  6:19 ` Achim Gratz
  2012-05-15  6:26 ` Christopher Schmidt
  0 siblings, 2 replies; 4+ messages in thread
From: Eric Abrahamsen @ 2012-05-15  5:13 UTC (permalink / raw)
  To: emacs-orgmode

I must have done something odd here, but…

On emacs startup, org-mode-map is not getting defined for some reason,
so a bunch of `eval-after-load' forms are throwing errors. I'm using
org from git, and the following is the first offending section:

--8<---------------cut here---------------start------------->8---
(require 'org-install)
(eval-after-load 'org
; don't let org steal this key
  (define-key org-mode-map (kbd "C-'") nil))
--8<---------------cut here---------------end--------------->8---

There are more such forms later on, they all throw the same error.
Specifically:

--8<---------------cut here---------------start------------->8---
Debugger entered--Lisp error: (void-variable org-mode-map)
  (define-key org-mode-map (kbd "C-'") nil)
  (eval-after-load (quote org) (define-key org-mode-map (kbd "C-'") nil))
  eval-buffer(#<buffer  *load*> nil "/home/eric/.emacs" nil t)  ; Reading at buffer position 13869
  load-with-code-conversion("/home/eric/.emacs" "/home/eric/.emacs" t t)
  load("~/.emacs" t t)
  #[0 "\b\205\262	\306=\203\0\307\b\310Q\202;	\311=\204\0\307\b\312Q\202;\313\307\314\315#\203*\316\202;\313\307\314\317#\203:\320\nB\321\202;\316\322\323\322\211#\210\v\322=\203a\324\325\326\307\b\327Q!\"\323\322\211#\210\v\322=\203`\x01\210\v\203\243\330\v!\331\232\203\243\332\v!\211\333P\334!\203}\211\202\210\334!\203\207\x01\202\210\314\262\x01\203\241\335\v\"\203\237\336\337\v#\210\340\341!\210\x13\266\f?\205\260\314\323\342\322\211#)\262\207" [init-file-user system-type delayed-warnings-list user-init-file inhibit-default-init inhibit-startup-screen ms-dos "~" "/_emacs" windows-nt "/.emacs" directory-files nil "^\\.emacs\\(\\.elc?\\)?$" "~/.emacs" "^_emacs\\(\\.elc?\\)?$" (initialization "`_emacs' init file is deprecated, please use `.emacs'") "~/_emacs" t load expand-file-name "init" file-name-as-directory "/.emacs.d" file-name-extension "elc" file-name-sans-extension ".el" file-exists-p file-newer-than-file-p message "Warning: %s is newer than %s" sit-for 1 "default"] 7 "\n\n(fn)"]()
  command-line()
  normal-top-level()
--8<---------------cut here---------------end--------------->8---

I thought org-install was meant to handle this sort of thing? Or at
least the eval-after-load? Still, org-mode-map is undefined until I've
opened my first org file and org is properly loaded.

No one else is complaining, so probably I'm doing something wrong, but
this used to work fine! I'm also running emacs from git -- perhaps
something has changed in the way eval-after-load works?

Thanks for any hints,
Eric

-- 
GNU Emacs 24.1.50.5 (i686-pc-linux-gnu, GTK+ Version 2.24.10)
 of 2012-05-12 on pellet
7.8.09

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: org-install not defining org-mode-map?
  2012-05-15  5:13 org-install not defining org-mode-map? Eric Abrahamsen
@ 2012-05-15  6:19 ` Achim Gratz
  2012-05-15  9:41   ` Eric Abrahamsen
  2012-05-15  6:26 ` Christopher Schmidt
  1 sibling, 1 reply; 4+ messages in thread
From: Achim Gratz @ 2012-05-15  6:19 UTC (permalink / raw)
  To: emacs-orgmode

Eric Abrahamsen writes:
> (require 'org-install)
> (eval-after-load 'org
> ; don't let org steal this key
>   (define-key org-mode-map (kbd "C-'") nil))
>
> There are more such forms later on, they all throw the same error.

I'm out of my depth here, but I'd think that this sort of thing really
belongs into a mode hook.

> I thought org-install was meant to handle this sort of thing?

No.  It sets up all autoload forms so that the public interfaces of org
become visible without actually loading all of org.

> Or at least the eval-after-load? Still, org-mode-map is undefined
> until I've opened my first org file and org is properly loaded.

How long have you been using Emacs24, specifically has it ever worked
there?  The scoping rules for global dynamic variables have changed for
Emacs24 and the exact details seem not to be fully documented yet.  Does
it start working again if you add a

(defvar org-mode-map)

after the require form?


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptation for Waldorf rackAttack V1.04R1:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: org-install not defining org-mode-map?
  2012-05-15  5:13 org-install not defining org-mode-map? Eric Abrahamsen
  2012-05-15  6:19 ` Achim Gratz
@ 2012-05-15  6:26 ` Christopher Schmidt
  1 sibling, 0 replies; 4+ messages in thread
From: Christopher Schmidt @ 2012-05-15  6:26 UTC (permalink / raw)
  To: emacs-orgmode

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> I must have done something odd here, but…

Yes.

> On emacs startup, org-mode-map is not getting defined for some reason,
> so a bunch of `eval-after-load' forms are throwing errors. I'm using
> org from git, and the following is the first offending section:
> (require 'org-install)
> (eval-after-load 'org
> ; don't let org steal this key
>   (define-key org-mode-map (kbd "C-'") nil))

You have to quote the inner form.

        Christopher

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: org-install not defining org-mode-map?
  2012-05-15  6:19 ` Achim Gratz
@ 2012-05-15  9:41   ` Eric Abrahamsen
  0 siblings, 0 replies; 4+ messages in thread
From: Eric Abrahamsen @ 2012-05-15  9:41 UTC (permalink / raw)
  To: emacs-orgmode

On Tue, May 15 2012, Achim Gratz wrote:

> Eric Abrahamsen writes:
>> (require 'org-install)
>> (eval-after-load 'org
>> ; don't let org steal this key
>>   (define-key org-mode-map (kbd "C-'") nil))
>>
>> There are more such forms later on, they all throw the same error.
>
> I'm out of my depth here, but I'd think that this sort of thing really
> belongs into a mode hook.
>
>> I thought org-install was meant to handle this sort of thing?
>
> No.  It sets up all autoload forms so that the public interfaces of org
> become visible without actually loading all of org.
>
>> Or at least the eval-after-load? Still, org-mode-map is undefined
>> until I've opened my first org file and org is properly loaded.
>
> How long have you been using Emacs24, specifically has it ever worked
> there?  The scoping rules for global dynamic variables have changed for
> Emacs24 and the exact details seem not to be fully documented yet.  Does
> it start working again if you add a
>
> (defvar org-mode-map)
>
> after the require form?

I've been using emacs 24 for several months, and it's only in the past
few weeks that this has stopped working. Christopher's solution seems to
be the right one -- probably I should have been quoting that form the
whole time, but I'm quite certain it's worked, unquoted, for a while
now.

I'm assuming it does have something to with changes in how emacs 24
handles variables… Using your defvar suggestion didn't do it, though.

Thanks to you both,

Eric

-- 
GNU Emacs 24.1.50.5 (i686-pc-linux-gnu, GTK+ Version 2.24.10)
 of 2012-05-12 on pellet
7.8.09

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-05-15  9:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-15  5:13 org-install not defining org-mode-map? Eric Abrahamsen
2012-05-15  6:19 ` Achim Gratz
2012-05-15  9:41   ` Eric Abrahamsen
2012-05-15  6:26 ` Christopher Schmidt

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