From: M <Elwood151@web.de>
To: emacs orgmode-mailinglist <Emacs-orgmode@gnu.org>
Subject: FW: How to load .el file during startup and execute its commands (Win7/org8)
Date: Wed, 12 Mar 2014 10:55:56 +0100 [thread overview]
Message-ID: <CF45EDBC.1BBAC%Elwood151@web.de> (raw)
In-Reply-To: <loom.20140210T102350-891@post.gmane.org>
Sorry for asking again, but this issue is still a big problem for me, as I
have to load my settings file manually (open, eval-buffer, close) at each
startup...
I'm trying to use a custom setup for `org-mode 8.2` on `Windows 7`, but it
does not work as expected.
Sorry for pushing that, but is very annoying to have to load the file
manually at each startup.
Could anyone tell me if I'm doing something wrong here?
My ´Emacs`version: GNU Emacs 24.2.1 (i386-mingw-nt6.1.7601) of 2012-08-29
on MARVIN
What I tried:
## ~/.emacs
in the file `~/.emacs` I have (among others) those lines:
(if (boundp 'org-mode-user-lisp-path)
(add-to-list 'load-path org-mode-user-lisp-path)
(add-to-list 'load-path (expand-file-name
"~/org-mode/org_current/lisp")))
(setq default-directory "C:/Users/mypath/" )
(if (boundp 'org-mode-user-contrib-lisp-path)
(add-to-list 'load-path org-mode-user-contrib-lisp-path)
(add-to-list 'load-path (expand-file-name
"~/org-mode/org_current/contrib/lisp/"))
(add-to-list 'load-path (expand-file-name "~/org-mode/morelisp/")))
(require 'icicles)
(require 'dired+)
(require 'org)
(require 'bookmark+)
(load "org")
and later
(load "C:/Users/mypath/org-config/myname_orgmodeconfig.el")
## C:/Users/mypath/org-config/myname_orgmodeconfig.el
contains
(add-to-list 'auto-mode-alist '("\\.\\(org\\|org_archive\\|txt\\)$" .
org-mode))
;; Standard key bindings
(global-set-key "\C-cl" 'org-store-link)
(global-set-key "\C-ca" 'org-agenda)
(if (boundp 'org-user-agenda-files)
(setq org-agenda-files org-user-agenda-files)
(setq org-agenda-files (quote ("~/org"
))))
So I try to use all org-files in the path `~/org` as agenda files.
When I launch `emacs`, I get the following result in the `*Messages`
buffer:
Turning OFF Icicle mode...done
Turning ON Icicle mode...done
Turning OFF Icicle mode...done
Turning ON Icicle mode...done
Turning ON Icicle mode...done
Turning OFF Icicle mode...done
Loading c:/Users/mypath/org-mode/org_current/lisp/org.el
(source)...done
Loading c:/Users/mypath/org-config/myname_orgmodeconfig.el
(source)...done
Loading paren...done
For information about GNU Emacs and the GNU system, type C-h C-a.
# The Problem
So I assume, as the file `myname_orgmodeconfig.el` has been loaded, all
the elisp code inside should have been executed and it should have also set
my agenda files.
**However, the list of agenda files is empty after startup.
When I then _manually_ ofen the file `myname_orgmodeconfig.el` and execute
the command `eval-buffer`, everything is fine.**
How can I fix that?
Kind regards
Martin
next prev parent reply other threads:[~2014-03-12 9:56 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-21 12:54 How to load .el file during startup and execute its commands (Win7/org8) elwood151
2014-02-10 9:28 ` Martin Beck
2014-03-12 9:55 ` M [this message]
2014-03-12 11:06 ` FW: " Jambunathan K
2014-03-15 7:32 ` Martin Beck
2014-03-12 15:17 ` Bastien
2014-03-12 15:29 ` John Hendy
2014-03-12 16:14 ` Bastien
2014-03-12 18:08 ` John Hendy
2014-03-15 7:35 ` Martin Beck
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=CF45EDBC.1BBAC%Elwood151@web.de \
--to=elwood151@web.de \
--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).