(setq kill-whole-line t)
(define-key global-map (kbd "S-C-SPC") 'mark-whole-buffer)
(global-unset-key "\M-l")
(global-set-key "\M-l" 'goto-line)
; (global-set-key "\M-i" 'previous-line)
(global-set-key "\M-j" 'backward-char)
; (global-set-key "\M-k" 'forward-line)
(global-set-key "\M-l" 'forward-char)
(setq org-agenda-window-setup 'current-window)
(fset 'yes-or-no-p 'y-or-n-p)
(add-to-list 'load-path
(concat dotfiles-dir "martyn/cscope"))
(require 'cscope)
(setq cscope-do-not-update-database t)
(setq confirm-kill-emacs 'y-or-n-p)
- State “TODO” from “” [2011-03-15 Tue 15:03]
(global-set-key [C-f1] 'help-for-help-internal)
(global-set-key [S-C-f1] 'mj-cycle-helps)
(global-set-key [f1] 'mj-cycle-helps)
(put 'upcase-region 'disabled nil)
(add-to-list 'load-path
(concat dotfiles-dir "martyn/bbdb-2.35/lisp"))
(require 'bbdb)
(bbdb-initialize)
(setq bbdb-north-american-phone-numbers-p nil
)
Since I don’t like either the beep or the flashing white square (visible bell) the following is required to silence both (from here)
;; (setq visible-bell nil)
;; (setq ring-bell-function nil)
(defun my-bell-function ()
;; (unless (memq this-command
;; '(isearch-abort abort-recursive-edit exit-minibuffer
;; keyboard-quit mwheel-scroll down up next-line previous-line
;; backward-char forward-char next prior))
;; (ding))
)
(setq ring-bell-function 'my-bell-function)
(add-to-list 'load-path
(concat dotfiles-dir "martyn/smooth-scrolling"))
(require 'smooth-scrolling)
(setq smooth-scroll-margin 3)
(add-to-list 'load-path
(concat dotfiles-dir "martyn/color-theme-6.6.0"))
(add-to-list 'load-path
(concat dotfiles-dir "martyn/color-theme-6.6.0/themes"))
(require 'color-theme)
(eval-after-load "color-theme"
'(progn
(color-theme-initialize)))
;; (color-theme-hober)))
;; (color-theme-tangotango)))
github]]
(add-to-list 'load-path
(concat dotfiles-dir "martyn/martyn/theme-faves"))
(require 'theme-faves)
(add-hook 'window-setup-hook 'theme-faves-init)
(global-set-key [C-f7] 'theme-faves-audition-cycle-up)
(global-set-key [S-C-f7] 'theme-faves-audition-cycle-down)
(global-set-key [f7] 'theme-faves-cycle-up)
(global-set-key [S-f7] 'theme-faves-cycle-down)
;;(add-to-list 'load-path
;; (concat dotfiles-dir "martyn/maxframe"))
;; (require 'maxframe)
;; (add-hook 'window-setup-hook 'maximize-frame t)
;; (maximize-frame)
(defun toggle-fullscreen ()
(interactive)
(if (string= system-name "martyn-laptop")
(x-send-client-message nil 0 nil "_NET_WM_STATE" 32
'(2 "_NET_WM_STATE_MAXIMIZED_VERT" 0))
(x-send-client-message nil 0 nil "_NET_WM_STATE" 32
'(2 "_NET_WM_STATE_MAXIMIZED_HORZ" 0))
(add-hook 'window-setup-hook 'toggle-fullscreen)))
(setq initial-scratch-message nil)
(turned on by emacs starter kit)
(remove-hook 'emacs-lisp-mode-hook 'turn-on-paredit nil)
| hs-minor-mode | ert–activate-font-lock-keywords | ac-emacs-lisp-mode-setup | run-coding-hook | esk-remove-elc-on-save | turn-on-eldoc-mode |
(add-to-list 'load-path
(concat dotfiles-dir "martyn/martyn"))
(require 'my-load-init-files)
(require 'my-load-drill-files)
(require 'my-load-org-files)
These are already defined in Starter Kit but are re-adjusted here to keep under my revision control…
(setq autoload-file (concat dotfiles-dir "martyn/loaddefs.el"))
Customisations made using emacs Customizations go here…
(setq custom-file (concat dotfiles-dir "martyn/custom.el"))
(when (string= "darwin" system-type)
(add-to-list 'load-path
(concat dotfiles-dir "martyn/todochiku"))
(require 'todochiku)
(setq todochiku-icons-directory
(concat dotfiles-dir "martyn/todochiku/todochiku-icons"))
(defun mj-notify-pomodoro-done ()
(todochiku-message "Pomodoro"
"
This Pomodoro Session is Complete
Release Concentration
Take a Break
" (todochiku-icon 'bell)))
(add-hook 'org-timer-done-hook 'mj-notify-pomodoro-done))
(setq org-return-follows-link t)(add-to-list 'load-path "~/org-mode/contrib/lisp")
(setq org-directory "~/.emacs-config/OrgData")
(setq org-agenda-files (quote (
"~/.emacs-config/OrgData/diary.org"
"~/ngpod/dev/ngpod.dev")))
(require 'org-drill)
(setq org-learn-always-reschedule t)
(setq org-drill-use-visible-cloze-face-p t)
(setq org-drill-add-random-noise-to-intervals-p t)
(put 'scroll-left 'disabled nil)
(setq org-todo-keywords (quote ((sequence "TODO(t!)" "|" "DONE(d!/!)")
(sequence "WAITING(w@/!)"
"SOMEDAY(s!)"
"IGNORED"
"FAIL"
"PASS"
"MISSING"
"DEPRECATED"
"|" "CANCELLED(c@/!)"))))
(setq org-todo-keyword-faces
(quote (("TODO" :foreground "red" :weight bold)
("DONE" :foreground "forest green" :weight bold)
("WAITING" :foreground "yellow" :weight bold)
("SOMEDAY" :foreground "goldenrod" :weight bold)
("CANCELLED" :foreground "orangered" :weight bold)
("EXPIRED" :foreground "olivedrab1" :weight bold)
("IGNORED" :foreground "yellow" :weight bold)
("FAIL" :foreground "red" :weight bold)
("MISSING" :foreground "olivedrab1" :weight bold)
("PASS" :foreground "forest green" :weight bold)
("DEPRECATED":foreground "orangered" :weight bold))))
(add-to-list 'load-path
(concat dotfiles-dir "martyn/lilypond"))
(autoload 'LilyPond-mode "lilypond-mode" "LilyPond Editing Mode" t)
(add-to-list 'auto-mode-alist '("\\.ly$" . LilyPond-mode))
(add-to-list 'auto-mode-alist '("\\.ily$" . LilyPond-mode))
(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
(setq load-path (cons "~/org-mode" load-path))
(org-babel-do-load-languages
'org-babel-load-languages
'((sh . t)(org . t)))
Configured for…
- Org
- Ruby
- Python
- C
- emacs-lisp
- shell
- graphviz
- clojure
- ditaa
- lilypond
(org-babel-do-load-languages
'org-babel-load-languages
'((org . t)
(ruby . t)
(python . t)
(R . t)
(C . t)
(emacs-lisp . t)
(sh . t)
(dot . t)
(clojure . t)
(ditaa . t)
(lilypond . t)
(plantuml . t)
))
(setq org-src-fontify-natively t) ;; color blocks
(setq org-confirm-babel-evaluate nil) ;; display images
(local-set-key "\M-I" 'org-toggle-iimage-in-org)
;; -- Display images in org mode
;; enable image mode first
(iimage-mode)
;; add the org file link format to the iimage mode regex
(add-to-list 'iimage-mode-image-regex-alist
(cons (concat "\\[\\[file:\\(~?" iimage-mode-image-filename-regex "\\)\\]") 1))
;; add a hook so we can display images on load
(add-hook 'org-mode-hook '(lambda () (org-turn-on-iimage-in-org)))
;; function to setup images for display on load
(defun org-turn-on-iimage-in-org ()
"display images in your org file"
(interactive)
(turn-on-iimage-mode)
(set-face-underline-p 'org-link nil))
;; function to toggle images in a org bugger
(defun org-toggle-iimage-in-org ()
"display images in your org file"
(interactive)
(if (face-underline-p 'org-link)
(set-face-underline-p 'org-link nil)
(set-face-underline-p 'org-link t))
(call-interactively 'iimage-mode))
(setq org-attach-directory "~/.emacs-config/OrgData/attach-directory")(setq org-blank-before-new-entry nil)
M-x load-file RET file to load: ~/.emacs.d/martyn/auto-complete/etc/install.el destination: ~/.emacs.d/martyn/auto-complete/installation
(add-to-list 'load-path "~/.emacs.d/martyn/auto-complete/installation")
(require 'auto-complete-config)
(add-to-list 'ac-dictionary-directories "~/.emacs.d/martyn/auto-complete/installation/ac-dict")
(ac-config-default)
This appears to be an upgrade of redo (although I never had any problems with redo). I shall monitor this!
(add-to-list 'load-path (concat dotfiles-dir "martyn/redoplus"))
(require 'redo+)
(define-key global-map (kbd "M-z") 'redo)
(define-key global-map (kbd "C-z") 'undo)
(add-to-list 'load-path
(concat dotfiles-dir "martyn/yasnippet-read-only"))
(require 'yasnippet) ;; not yasnippet-bundle
(yas/initialize)
(setq yas/root-directory
'(
;; "~/.emacs.d/martyn/martyn/unity-mode/snippets"
"~/.emacs.d/martyn/martyn/snippets"
"~/.emacs.d/martyn/martyn/snippets/yasnippet-org-mode-fork/snippets"
;; "~/.emacs.d/martyn/yasnippets-rails/rails-snippets"
"~/.emacs.d/martyn/yasnippet-read-only/snippets"))
;; Load the snippets (NOTE: the mapc required for multiple directories)
;; (Map `yas/load-directory' to every element)
(mapc 'yas/load-directory yas/root-directory)
(add-hook 'c-mode-common-hook 'hs-minor-mode)
(add-hook 'emacs-lisp-mode-hook 'hs-minor-mode)
(add-hook 'java-mode-hook 'hs-minor-mode)
(add-hook 'lisp-mode-hook 'hs-minor-mode)
(add-hook 'perl-mode-hook 'hs-minor-mode)
(add-hook 'sh-mode-hook 'hs-minor-mode)
(defun me-toggle-hiding-all()
"Fast cycling of all folded all unfolded utilising
hideshow minor mode hs-minor-mode"
(interactive)
(defvar me-hideshow-active nil)
(setq me-hideshow-active
(if me-hideshow-active
(progn (hs-show-all) nil)
(progn (hs-hide-all) t))))
; add hook for hideshow minor mode
(add-hook 'lisp-mode-hook 'hs-minor-mode)
(global-set-key [f3] 'hs-toggle-hiding)
(global-set-key [C-f3] 'me-toggle-hiding-all)
(add-to-list 'load-path (concat dotfiles-dir "martyn/hideshow-org"))
(require 'hideshow-org)
(add-to-list 'load-path
(concat dotfiles-dir "martyn/lusty-emacs"))
(require 'lusty-explorer)
(define-key global-map (kbd "C-x C-d") 'lusty-file-explorer)
NOTE: lusty-explorer.el doesn’t want to compile
(global-set-key [C-x-o] 'other-window)
(add-to-list 'load-path
(concat dotfiles-dir "martyn/lua-mode/testing/lisp"))
(add-to-list 'load-path
(concat dotfiles-dir "martyn/lua-mode/lisp"))
(add-to-list 'load-path
(concat dotfiles-dir "martyn/lua-mode/testing/examples"))
(autoload 'lua-mode "lua-mode" "Lua editing mode." t)
(add-to-list 'auto-mode-alist '("\\.lua$" . lua-mode))
(add-to-list 'interpreter-mode-alist '("lua" . lua-mode))
(setq lua-default-application "/opt/local/bin/lua")(if (string= "darwin" system-type)
(setq browse-url-browser-function 'browse-url-generic
browse-url-generic-program "open")
(setq browse-url-browser-function 'browse-url-generic
browse-url-generic-program "conkeror"))
(when (string= "darwin" system-type)
(setq epg-gpg-program "/usr/local/MacGPG2/bin/gpg2")
(message "MacGPG2 set up"))
(add-to-list 'load-path
(concat dotfiles-dir "martyn/make-password"))
(require 'make-password)
(defalias 'mj-generate-password 'make-password)
(defalias 'generate-password 'make-password)
(add-to-list 'load-path
(concat dotfiles-dir "martyn/martyn/mj-versions"))
(require 'mj-versions)
(add-to-list 'load-path
(concat dotfiles-dir "martyn/martyn/my-org-test-setup"))
(require 'my-org-test-setup)
(add-to-list 'load-path
(concat dotfiles-dir "martyn/martyn/my-header-arguments"))
(require 'my-header-arguments)
(add-to-list 'load-path
(concat dotfiles-dir "martyn/martyn/help-page"))
(require 'help-page)
(defalias 'hp 'help-page)
(setq erc-header-line-format nil)
(setq erc-hide-list '("JOIN" "PART" "QUIT"))
(setq erc-log-channels-directory t)
(setq erc-log-file-name-function "~/erc")
(setq erc-truncate-buffer-on-save t)
(setq erc-nick "mjago")(add-to-list 'load-path
(concat dotfiles-dir "martyn/boxquote"))
(require 'boxquote)(add-to-list 'load-path
(concat dotfiles-dir "martyn/lorem-ipsum"))
(require 'lorem-ipsum)(setq magit-hide-diffs t)
(setq ispell-program-name "/opt/local/bin/ispell")
(require 'ispell)
(add-to-list
'load-path
(concat dotfiles-dir "martyn/ess-5.14/lisp/"))
(require 'ess-site)
(setq message-log-max 2000)
(setq mpc-mode-map
(let ((map (make-keymap)))
(suppress-keymap map)
;; (define-key map "\e" 'mpc-stop)
(define-key map "q" 'mpc-quit)
(define-key map "\r" 'mpc-select)
(define-key map [(shift return)] 'mpc-select-toggle)
(define-key map [mouse-2] 'mpc-select)
(define-key map [S-mouse-2] 'mpc-select-extend)
(define-key map [C-mouse-2] 'mpc-select-toggle)
(define-key map [drag-mouse-2] 'mpc-drag-n-drop)
;; We use `always' because a binding to t is like a binding to nil.
(define-key map [follow-link] 'always)
;; Doesn't work because the first click changes the buffer, so the second
;; is applied elsewhere :-(
;; (define-key map [(double mouse-2)] 'mpc-play-at-point)
(define-key map "x" 'mpc-play)
(define-key map "X" 'mpc-play-at-point)
(define-key map "s" 'mpc-pause)
(define-key map "S" 'mpc-stop)
(define-key map "n" 'mpc-next)
(define-key map "p" 'mpc-prev)
(define-key map "f" 'mpc-ffwd)
(define-key map "b" 'mpc-rewind)
map))
(defalias 'music 'mpc) (defun mj-split-four-ways ()
(interactive)
(delete-other-windows)
(split-window-horizontally)
(split-window-vertically 15)
(other-window 2)
(split-window-vertically 15)
(other-window -1))
;; key defined in `map C-t to my configs'(global-unset-key "\C-t")
(defun mj-org-todo-list ()
(interactive)
(when (boundp 'org-agenda-sticky)
(setq org-agenda-sticky t))
(org-todo-list 0))
(global-set-key "\C-tt" 'mj-org-todo-list)
(global-set-key "\C-t\C-t" 'mj-org-todo-list)
(defun mj-touch ()
(interactive)
(shell-command "touch ~/ngpod/test/touch.c"))
(global-set-key "\C-tz" 'mj-touch)
(mj-touch)
(global-set-key "\C-ts" 'mj-split-four-ways)
(defun mj-other-window ()
(interactive)
(other-window 1 nil))
(global-set-key "\C-co" 'mj-other-window)
(setq gnus-use-full-window nil)(global-auto-revert-mode 1)
(setq auto-revert-interval 1)(defalias 'dired-edit 'wdired-change-to-wdired-mode)(setq org-plantuml-jar-path "~/plantuml/plantuml.jar")
(add-to-list
'load-path
(concat dotfiles-dir "martyn/ansi-color"))
(require 'ansi-color)(setq grep-scroll-output t)(defun mj-date-time()
(interactive)
(message "%S" (shell-command "date" t )))
Generate sha1 of selected region
(load-file (concat dotfiles-dir "martyn/martyn/sha1/sha1.el"))
(setq org-babel-python-command "python2.6")(require 'org-export)ref: Bernt Hansen (Re: Capitalisation and good taste ?)
(setq org-babel-results-keyword "results")
(setq org-structure-template-alist
(quote (("s" "#+begin_src ?\n\n#+end_src" "<src lang=\"?\">\n\n</src>")
("e" "#+begin_example\n?\n#+end_example" "<example>\n?\n</example>")
("q" "#+begin_quote\n?\n#+end_quote" "<quote>\n?\n</quote>")
("v" "#+begin_verse\n?\n#+end_verse" "<verse>\n?\n/verse>")
("c" "#+begin_center\n?\n#+end_center" "<center>\n?\n/center>")
("l" "#+begin_latex\n?\n#+end_latex" "<literal style=\"latex\">\n?\n</literal>")
("L" "#+latex: " "<literal style=\"latex\">?</literal>")
("h" "#+begin_html\n?\n#+end_html" "<literal style=\"html\">\n?\n</literal>")
("H" "#+html: " "<literal style=\"html\">?</literal>")
("a" "#+begin_ascii\n?\n#+end_ascii")
("A" "#+ascii: ")
("i" "#+index: ?" "#+index: ?")
("I" "#+include %file ?" "<include file=%file markup=\"?\">"))))
- State “TODO” from “” [2011-12-17 Sat 15:24]
(load-file (concat dotfiles-dir "martyn/martyn/continuous-testing/lib/continuous-testing.el"))(add-to-list
'load-path
(concat dotfiles-dir "martyn/shen-mode"))
(setq org-use-speed-commands nil)(add-hook 'org-shiftup-final-hook 'windmove-up)
(add-hook 'org-shiftleft-final-hook 'windmove-left)
(add-hook 'org-shiftdown-final-hook 'windmove-down)
(add-hook 'org-shiftright-final-hook 'windmove-right)
; Targets complete in steps so we start with filename, TAB shows the next level of targets etc (setq org-outline-path-complete-in-steps t)
; Allow refile to create parent tasks with confirmation (setq org-refile-allow-creating-parent-nodes (quote confirm))
; Use IDO only for buffers ; set ido-mode to buffer and ido-everywhere to t via the customize interface ; ‘(ido-mode (quote both) nil (ido)) ; ‘(ido-everywhere t)
Not sure this is of any benefit anymore!
;; fix tab
(local-set-key "\C-y" 'yank)
(setq org-treat-S-cursor-todo-selection-as-state-change nil)
(setq org-mobile-directory "~/.emacs-config/MobileOrg")
(setq org-mobile-files org-agenda-files)
(setq org-mobile-inbox-for-pull "~/.emacs-config/OrgData/inbox.org")(defun my-run-drills ()
"Function to run all drills that exist in agenda files"
(interactive)
(org-drill 'agenda))
(provide 'my-run-drills)
(setq org-default-notes-file "~/.emacs-config/OrgData/capture.org")
(define-key global-map "\C-cc" 'org-capture)
(setq org-capture-templates
'(("t" "Agenda Todo" entry
(file+datetree+prompt "~/.emacs-config/OrgData/diary.org")
;; "\n\n** TODO %?\n%T\n\n%i\n%a\n\n\n"
"\n\n** TODO %?\n%t\n\n"
:empty-lines 1)))
;; ("n" "Agenda Notes" entry
;; (file+headline "~/.emacs-config/OrgData/diary.org" "Agenda")
;; "\n\n** %?\n%T\n%i\n%a\n\n\n"
;; :empty-lines 1))
; Use IDO for target completion
(setq org-completion-use-ido t)
; Targets include this file and any file contributing to the agenda - up to 5 levels deep
(setq org-refile-targets (quote ((org-agenda-files :maxlevel . 5) (nil :maxlevel . 5))))
; Targets start with the file name - allows creating level 1 tasks
;; TESTING (setq org-refile-use-outline-path (quote file))
(defun run-todo-unscheduled ()
"agenda of unscheduled todos"
(interactive)
(setq org-agenda-todo-ignore-scheduled t)
(org-todo-list '("t"))
(setq org-agenda-todo-ignore-scheduled nil))
(provide 'run-todo-unscheduled)
(setq org-agenda-custom-commands
'(("e" todo "-SCHEDULED")
("W" todo-tree "WAITING")
("u" tags "+boss-urgent")
("v" tags-todo "+boss-urgent")
("U" tags-tree "+boss-urgent")
("f" occur-tree "\\<FIXME\\>")
("hl" tags "+home+Lisa")
("hp" tags "+home+Peter")
("hk" tags "+home+Kim")))
(setq org-agenda-custom-commands
(quote (("w" "Tasks waiting on something" tags "WAITING/!"
((org-use-tag-inheritance nil)
(org-agenda-todo-ignore-scheduled nil)
(org-agenda-todo-ignore-deadlines nil)
(org-agenda-todo-ignore-with-date nil)
(org-agenda-overriding-header "Waiting Tasks")))
("r" "Refile New Notes and Tasks" tags "LEVEL=1+REFILE"
((org-agenda-todo-ignore-with-date nil)
(org-agenda-todo-ignore-deadlines nil)
(org-agenda-todo-ignore-scheduled nil)
(org-agenda-overriding-header "Tasks to Refile")))
("N" "Notes" tags "NOTE"
((org-agenda-overriding-header "Notes")))
("p" "Projects" tags-todo "LEVEL=2-REFILE|LEVEL=1+REFILE/!-DONE-CANCELLED"
((org-agenda-skip-function 'bh/skip-non-projects)
(org-agenda-overriding-header "Projects")))
("o" "Other (Non-Project) tasks" tags-todo "LEVEL=2-REFILE|LEVEL=1+REFILE/!-DONE-CANCELLED"
((org-agenda-skip-function 'bh/skip-projects)
(org-agenda-overriding-header "Other Non-Project Tasks")))
("A" "Tasks to be Archived" tags "LEVEL=2-REFILE/DONE|CANCELLED"
((org-agenda-overriding-header "Tasks to Archive")))
("h" "Habits" tags "STYLE=\"habit\""
((org-agenda-todo-ignore-with-date nil)
(org-agenda-todo-ignore-scheduled nil)
(org-agenda-todo-ignore-deadlines nil)
(org-agenda-overriding-header "Habits")))
("#" "Stuck Projects" tags-todo "LEVEL=2-REFILE|LEVEL=1+REFILE/!-DONE-CANCELLED"
((org-agenda-skip-function 'bh/skip-non-stuck-projects)
(org-agenda-overriding-header "Stuck Projects")))
("c" "Select default clocking task" tags "LEVEL=2-REFILE"
((org-agenda-skip-function
'(org-agenda-skip-subtree-if 'notregexp "^\\*\\* Organization"))
(org-agenda-overriding-header "Set default clocking task with C-u C-u I"))))))
(add-to-list
'load-path
(concat dotfiles-dir "martyn/martyn/unity-mode"))
(require 'unity-mode)
;(add-hook 'c-mode-hook 'unity-mode)
(global-set-key [f5] 'unity-find-and-open-a-primative-match-forward)
(global-set-key [S-f5] 'unity-find-and-open-a-primative-match-reverse)
(global-set-key [C-f5] 'unity-cycle-MCH-buffer)
(global-set-key [f6] 'unity-cycle-alpha-ascending)
(global-set-key [S-f6] 'unity-cycle-alpha-descending)
(defun unity-project ()
(interactive)
(find-file "~/.emacs.d/martyn/martyn/unity-mode/unity-parse-project-file.el")
(find-file "~/.emacs.d/martyn/martyn/unity-mode/unity-auto-config.el")
(delete-other-windows)
(split-window-horizontally)
(windmove-right)
(find-file "~/.emacs.d/martyn/martyn/unity-mode/unity-mode.el")
(windmove-left)
;; (find-file "~/.emacs.d/martyn/martyn/unity-mode/unity-mode-tests.el")
(switch-to-buffer "#emacs")
(split-window-vertically)
(switch-to-buffer "*ert*")
(windmove-down)
(switch-to-buffer "#emacs"))
(defun unity-eval-src-and-tests ()
(interactive)
(let ((original-buffer buffer-file-name)
(original-window (selected-window)))
(if(string-match "^unity-" (file-name-nondirectory original-buffer))
(progn
(eval-buffer "unity-mode-tests.el")
(eval-buffer "unity-mode.el")
(ert t)))
(select-window original-window)))
;; (error "%s" (windmove-find-other-window 'right))
;; (if(equal original-buffer (windmove-find-other-window 'right))
;; (windmove-right)
;; (windmove-down))))
Moved to unity-mode.el
; (global-set-key [f4] 'unity-eval-src-and-tests)
; (global-set-key [C-f4] 'unity-switch-src-control-file)
; (global-set-key [C-c C-v] 'eval-region)
- NOTE: remember ubuntu requires texlive-latex-extra for this
- NOTE: also required ttf-marvosym
- For missing packages try searching here and apt-get install package
- Useful latex prettifying link
;; remember ubuntu requires texlive-latex-extra for this
(require 'org-latex)
(setq org-export-latex-listings t)
(add-to-list 'org-export-latex-packages-alist '("" "listings"))
(add-to-list 'org-export-latex-packages-alist '("" "color"))
;; Setup gleaned from here ;; #+begin_src emacs-lisp :results silent ;; ;; ;; AUCTeX ;; (setq TeX-auto-save t) ;; (setq TeX-parse-self t) ;; ;set up AUCTeX to deal with multiple file documents. ;; (setq-default TeX-master nil) ;; ;turn on pdf-mode. AUCTeX will call pdflatex to compile instead of latex. ;; (add-hook ‘LaTeX-mode-hook ‘TeX-PDF-mode) ;; ;turn on flyspell mode - this will automatically spell check the document in LaTex-mode ;; (add-hook ‘LaTeX-mode-hook ‘flyspell-mode) ;; ;; ; allow for export=>beamer by placing ;; ;; #+LaTeX_CLASS: beamer in org files ;; (unless (boundp ‘org-export-latex-classes) ;; (setq org-export-latex-classes nil)) ;; (add-to-list ‘org-export-latex-classes ;; ;; beamer class, for presentations ;; ‘(“beamer” ;; “\documentclass[11pt]{beamer}\n ;; \mode<{{{beamermode}}}>\n ;; \usetheme{{{{beamertheme}}}}\n ;; \usecolortheme{{{{beamercolortheme}}}}\n ;; \beamertemplateballitem\n ;; \setbeameroption{show notes} ;; \usepackage[utf8]{inputenc}\n ;; \usepackage[T1]{fontenc}\n ;; \usepackage{hyperref}\n ;; \usepackage{color} ;; \usepackage{listings} ;; \lstset{numbers=none,language=[ISO]C++,tabsize=4, ;; frame=single, ;; basicstyle=\small, ;; showspaces=false,showstringspaces=false, ;; showtabs=false, ;; keywordstyle=\color{blue}\bfseries, ;; commentstyle=\color{red}, ;; }\n ;; \usepackage{verbatim}\n ;; \institute{{{{beamerinstitute}}}}\n ;; \subject{{{{beamersubject}}}}\n” ;; org-beamer-sectioning ;; (“\section{%s}” . “\section*{%s}”) ;; (“\begin{frame}[fragile]\frametitle{%s}” ;; “\end{frame}” ;; “\begin{frame}[fragile]\frametitle{%s}” ;; “\end{frame}”) ;; )) ;; ;; ;; Set up skeletons (see below) in a menu in ORG MODE mode ;; (defvar org-org-menu) ;; (add-hook ‘org-mode-hook ;; (lambda () (easy-menu-add-item org-org-menu nil [“Skeletons” nil t]) ;; (easy-menu-add-item org-org-menu ‘(“Skeletons”) [“Beamer Theme” orgmode-beamer-my-skeleton t]))) ;; (define-skeleton orgmode-beamer-my-skeleton ;; “inserts a simple orgmode-beamer template skeleton - use C-c C-e d to build the pdf” ;; nil ;; “#+LaTeX_CLASS: beamer\n” ;; “#+MACRO: BEAMERMODE presentation\n” ;; “#+MACRO: BEAMERCOLORTHEME dove\n” ;; “#+MACRO: BEAMERSUBJECT RMRF\n” ;; “#+BEAMER_FRAME_LEVEL: 2\n” ;; “#+COLUMNS: %35ITEM %10BEAMER_env(Env) %10BEAMER_envargs(Env Args) %4BEAMER_col(Col) %8BEAMER_extra(Extra)\n” ;; “#+OPTIONS: tags:nil\n” ;; “#+MACRO: BEAMERINSTITUTE My Affiliation\n” ;; “#+AUTHOR: Tudor-Ioan Salomie\n” ;; “\n” ;; “#+TITLE: Presentation title\n” ;; “\n” ;; “\n” ;; “* My Section\n” ;; “\n” ;; “** Frame 1 \\ with a subtitle\n” ;; “\n” ;; “*** Idea\n” ;; “\n” ;; “#+begin_LaTeX\n” ;; “\n” ;; “#+end_LaTeX\n” ;; “\n\n\n” ;; ) ;; ;; ;; #+end_src ;; ;; #+results: ;; : orgmode-beamer-my-skeleton ;;
(setq org-clock-persist 'history)
(org-clock-persistence-insinuate)
(defun mj-diary-org()
"Fast route to diary.org"
(interactive)
(find-file "~/.emacs-config/OrgData/diary.org"))
(defun mj-ng-pod-dev()
"Fast route to ng-pod.dev"
(interactive)
(find-file "~/ngpod/dev/ng-pod.dev"))
(defun mj-init-org()
"Fast route to init.org"
(interactive)
(find-file "~/.emacs.d/martyn/init.org"))
(defun mj-org-agenda ()
(interactive)
(org-agenda nil "a"))
(defun mj-cycle-helps()
(interactive)
(unless (boundp 'mj-current-help)
(setq mj-current-help nil))
(cond
((equal (buffer-name) "diary.org")
(bury-buffer "diary.org")
(setq mj-current-help 'mj-ng-pod-dev))
((equal (buffer-name) "ng-pod.dev")
(bury-buffer "ng-pod.dev")
(setq mj-current-help 'mj-org-agenda))
((equal (buffer-name) "*Org Agenda*")
(org-agenda-quit)
(setq mj-current-help 'help-page))
((equal (buffer-name) "help.org")
(bury-buffer "help.org")
(setq mj-current-help 'mj-init-org))
(t (setq mj-current-help 'mj-diary-org)))
(message "%S" mj-current-help)
(funcall mj-current-help))
;; (require ‘ispell) ;; (setq-default ispell-program-name “/usr/local/lib/aspell-0.60.6/aspell”) ;; (setq ispell-really-aspell t) ;; (setq ispell-dictionary “/usr/local/lib/aspell6-en-7.1-0/english”) ;; ;;# sudo rm /usr/share/emacs/site-lisp/dictionaries-common/debian-ispell.el ;;# sudo rm /usr/share/emacs/site-lisp/dictionaries-common/flyspell.el ;;# sudo rm /usr/share/emacs/site-lisp/dictionaries-common/ispell.el ;;# cd /usr/share/emacs23/site-lisp/dictionaries-common ;;# sudo rm *.el *.elc ;; the above didn’t work for me so…
(unload-feature ‘flyspell-mode) ;;neither did this! (not loaded)
##+end_src
#
#
(load-file (concat dotfiles-dir "martyn/graphviz-dot-mode/graphviz-dot-mode.el"))
(require 'org-contacts)
(custom-set-variables
'(org-contacts-files '("~/.emacs-config/OrgData/contacts.org")))
;; ("c" "Contacts" entry (file "~/Org/contacts.org")
;; "* %(org-contacts-template-name)
;; :PROPERTIES:
;; :EMAIL: %(org-contacts-template-email)
;; :END:")
;; (add-to-list 'load-path
;; (concat dotfiles-dir "/martyn/yasnippets-rails"))
;; (add-hook 'ruby-mode-hook ; or rails-minor-mode-hook ?
;; '(lambda ()
;; (make-variable-buffer-local 'yas/trigger-key)
;; (setq yas/trigger-key [tab])))
;; (require 'yasnippet)
;; ;;(add-to-list 'yas/extra-mode-hooks
;; ;; 'ruby-mode-hook)
;; (yas/initialize)
;; (setq yas/window-system-popup-function 'yas/x-popup-menu-for-template)
;; ;;(yas/load-directory
;; ;; (concat
;; ;; dotfiles-dir "/martyn/snippets/yasnippets-rails/rails-snippets/"))
;; ;;(make-variable-buffer-local 'yas/trigger-key)
;; ;; yasnippet-org-mode
;; (yas/load-directory
;; (concat
;; dotfiles-dir "/martyn/snippets/yasnippet-org-mode/"))
;; yasnippet (allow yasnippet to do it's thing in org files)
;; (make-variable-buffer-local 'yas/trigger-key)
;; (setq yas/trigger-key [tab])
;; (define-key yas/keymap [tab] 'yas/next-field-group)))
(add-to-list 'load-path (concat dotfiles-dir
"martyn/highlight-parentheses"))
(require 'highlight-parentheses)
(global-set-key [C-S-d] 'backward-delete-char)
(defun mj-backward-kill-line ()
(interactive)
(if (bolp)
(progn (previous-line)
(org-kill-line))
(let ((here (point)))
(beginning-of-line)
(kill-region (point) here))))
(global-set-key (kbd "C-M-k") 'mj-backward-kill-line)
(global-set-key "\M-k" 'comment-or-uncomment-region)
Re: emacs and gnome-terminal (Anonymous) 2008-05-20 04:51 am UTC (link) Not a bug fix, but this seems to make the problem go away.
Turn on column-number-mode.
You can put the following into your ~/.emacs to have it on on loading
(setq-default column-number-mode t)
(setq cursor-type 'hbar)
(set-cursor-color "white")
;; function here
;;#+begin_src emacs-lisp :results silent ;;(setq package-user-dir (concat dotfiles-dir “martyn/elpa”)) ;;#+end_src
Setup Mode-compile (emacs-wiki)
;;mode-compile
(autoload 'mode-compile "mode-compile"
"Command to compile current buffer file based on the major mode" t)
;; (global-set-key "\C-cc" 'mode-compile)
(autoload 'mode-compile-kill "mode-compile"
"Command to kill a compilation launched by `mode-compile'" t)
;; (global-set-key "\C-ck" 'mode-compile-kill)
(add-to-list 'load-path (concat dotfiles-dir "martyn/rvm/rvm.el/"))
(require 'rvm)
(rvm-activate-corresponding-ruby)
(rvm-autodetect-ruby)
(rvm-use "1.9.2" "default")
(add-to-list 'load-path (concat dotfiles-dir "martyn/rspec-mode"))
(defun mj-kill-to-start-of-line ()
"kill from point to start of line"
(interactive)
(kill-line 0)
)
(global-set-key [C-j] 'mj-kill-to-start-of-line)
; sane path
(setq path "/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/mysql/bin:/usr/texbin/")
(setenv "PATH" path)
- NOTE: Currently loads ALL org files - might consider just “tracked” org files
- Switch to diary.org
- Bring up schedule agenda in other window
(defun me-startup-in-agenda ()
(if (string= system-name "martyn-laptop")
(progn
(split-window-horizontally)
(my-load-org-files)
(switch-to-buffer "diary.org")
(org-agenda-list))))
(add-hook 'window-setup-hook 'me-startup-in-agenda)
(delete-file "~/.emacs.d/martyn/init.el")
(setq org-export-directory "~/.emacs-config/OrgData/html")
