.Emacs for Windows 29 Jun 2009
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 | (setq load-path (cons "C:/Documents and Settings/csnyder/Desktop/My Dropbox/emacs_org/org-6.27a/" load-path)) (add-to-list 'load-path "C:/Documents and Settings/csnyder/Desktop/My Dropbox/emacs_org/remember/") (require 'org) (require 'remember) (require 'org-install) (add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode)) (global-set-key "\C-cl" 'org-store-link) (global-set-key "\C-ca" 'org-agenda) (global-set-key "\C-cb" 'org-iswitchb) (global-font-lock-mode 1) ; for all buffers (add-hook 'org-mode-hook 'turn-on-font-lock) ; Org buffers only (defalias 'list-buffers 'ibuffer) (defconst cls-tmp-dir "~/.emacs.tmp") (setq org-log-done t) (setq org-directory "C:/Documents and Settings/csnyder/Desktop/My Dropbox/emacs_org") (setq org-default-notes-file "C:/Documents and Settings/csnyder/Desktop/My Dropbox/emacs_org/notes.org") (setq remember-annotation-functions '(org-remember-annotation)) (setq remember-handler-functions '(org-remember-handler)) (add-hook 'remember-mode-hook 'org-remember-apply-template) (define-key global-map "\C-cr" 'org-remember) (setq org-remember-templates '(("Todo" ?t "* TODO %? %T %^g\n %i\n " "C:/Documents and Settings/csnyder/Desktop/My Dropbox/emacs_org/personal.org" ) ("Journal" ?j "\n* %^{topic} %T \n%i%?\n" "C:/Documents and Settings/csnyder/Desktop/My Dropbox/emacs_org/journal.org") ("Reference" ?r "\n* %^{topic} %T \n%i%?\n" "C:/Documents and Settings/csnyder/Desktop/My Dropbox/emacs_org/reference.org") ("Notes" ?n "\n* %^{topic} %T \n%i%?\n" "C:/Documents and Settings/csnyder/Desktop/My Dropbox/emacs_org/notes.org") ("Contact" ?c "\n* %^{Name} :CONTACT:\n%[C:/Documents and Settings/csnyder/Desktop/My Dropbox/emacs_org/contacts.txt]\n" "C:/Documents and Settings/csnyder/Desktop/My Dropbox/emacs_org/") )) (require 'org-publish) (setq org-publish-project-alist '( ("org-notes" :base-directory "~/org/" :base-extension "org" :publishing-directory "~/public_html/" :recursive t :publishing-function org-publish-org-to-html :headline-levels 4 ; Just the default for this project. :auto-preamble t :auto-index t ; Generate index.org automagically... :index-filename "sitemap.org" ; ... call it sitemap.org ... :index-title "Sitemap" ; ... with title 'Sitemap'. ) ("org-static" :base-directory "~/org/" :base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf" :publishing-directory "~/public_html/" :recursive t :publishing-function org-publish-attachment ) ("org" :components ("org-notes" "org-static")) )) (setq org-agenda-custom-commands '(("p" . "Priorities") ("pa" "A items" tags-todo "+PRIORITY=\"A\"") ("pb" "B items" tags-todo "+PRIORITY=\"B\"") ("pc" "C items" tags-todo "+PRIORITY=\"C\"") ;; ...other commands here )) ;; To change the location of the annotation file: (setq org-annotate-file-storage-file "C:/Documents and Settings/csnyder/Desktop/My Dropbox/emacs_org/annotated.org") (setq org-annotate-file-add-search t) (custom-set-variables ;; custom-set-variables was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(cua-mode t nil (cua-base)) '(inhibit-startup-screen t) '(org-agenda-files (quote ("C:/Documents and Settings/csnyder/Desktop/My Dropbox/emacs_org/personal.org"))) '(show-paren-mode t) '(text-mode-hook (quote (turn-on-auto-fill text-mode-hook-identify))) '(transient-mark-mode t)) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. ) (defun wc () (interactive) (message "Word count: %s" (how-many "\\w+" (point-min) (point-max)))) (defun run-current-file () (interactive) (let (ext-map file-name file-ext prog-name cmd-str) ; get the file name ; get the program name ; run it (setq ext-map '( ("pl" . "perl") ("py" . "python") ("sh" . "bash") ("rb" . "ruby") ) ) (setq file-name (buffer-file-name)) (setq file-ext (file-name-extension file-name)) (setq prog-name (cdr (assoc file-ext ext-map))) (setq cmd-str (concat prog-name " " file-name)) (shell-command cmd-str))) (define-key global-map "\C-c9" 'run-current-file) (global-set-key (kbd "M-S-<f1>") ;; open my personal.org file (lambda()(interactive)(find-file "C:/Documents and Settings/csnyder/Desktop/My Dropbox/emacs_org/personal.org"))) ;; backups (setq cls-backup-dir (concat cls-tmp-dir "/backups")) (setq make-backup-files t ;; do make backups backup-by-copying t ;; and copy them here backup-directory-alist '(("." . "~/.emacs.tmp/backups")) ;; FIXME version-control t kept-new-versions 2 kept-old-versions 5 delete-old-versions t) |
About this entry
You’re currently reading “.Emacs for Windows 29 Jun 2009,” an entry on C L Snyder
- Published:
- Monday, June 29th, 2009 at 1:55 pm
- Author:
- clsnyder
- Category:
- Emacs
Comments are closed
Comments are currently closed on this entry.