(menu-bar-mode 0) (setq inhibit-startup-message t) (setq c-basic-offset 4) (setq tab-width 4) (setq indent-tabs-mode nil) (require 'color-theme) (require 'yaml-mode) (setq auto-mode-alist (append '(("\.yml\'" . yaml-mode)) auto-mode-alist)) (setq calendar-latitude -34.59849) (setq calendar-longitude -58.43666) (setq calendar-location-name "Argentina, Buenos Aires") (add-to-list 'auto-mode-alist '("\\.org$" . org-mode)) (global-set-key (kbd "") 'org-agenda) (global-set-key (kbd "") 'set-truncate-lines) (global-set-key (kbd "") 'org-cycle-agenda-files) (global-set-key (kbd " c") 'calendar) (global-set-key (kbd " r") 'org2rem-combine-agenda-files) (global-set-key (kbd " f") 'boxquote-insert-file) (global-set-key (kbd " g") 'gnus) (global-set-key (kbd " h") 'bh/hide-other-tasks) (defun bh/hide-other-tasks () (interactive) (org-shifttab) (org-reveal) (org-cycle)) (global-set-key (kbd " i") 'bh/org-info) (defun bh/org-info () (interactive) (info "~/git/org-mode/doc/org.info")) (global-set-key (kbd " I") 'bh/clock-in) (global-set-key (kbd " O") 'bh/clock-out) (global-set-key (kbd " s") 'bh/go-to-scratch) (defun bh/go-to-scratch () (interactive) (switch-to-buffer "*scratch*") (delete-other-windows)) (global-set-key (kbd " t") 'bh/insert-inactive-timestamp) (global-set-key (kbd " u") 'bh/untabify) (defun bh/untabify () (interactive) (untabify (point-min) (point-max))) (global-set-key (kbd " v") 'visible-mode) (global-set-key (kbd " SPC") 'bh/clock-in-interrupted-task) (global-set-key (kbd "C-") 'previous-buffer) (global-set-key (kbd "C-x n r") 'narrow-to-region) (global-set-key (kbd "C-") 'next-buffer) (global-set-key (kbd "") 'org-clock-goto) (global-set-key (kbd "C-") 'org-clock-in) (global-set-key (kbd "C-s-") 'bh/save-then-publish) (global-set-key (kbd "M-") 'org-resolve-clocks) (global-set-key (kbd "M-") (lambda () (interactive) (unless (buffer-modified-p) (kill-buffer (current-buffer))) (delete-frame))) (global-set-key "\C-c L" 'org-insert-link-global) (global-set-key "\C-c o" 'org-open-at-point-global) (global-set-key "\C-ca" 'org-agenda) (setq org-log-done t) (setq org-log-into-drawer t) (setq org-todo-keywords (quote ( (sequence "TODO(t)" "NEXT(n)" "TODAY(y)" "|" "DONE(d!/!)") (sequence "WAITING(w@/!)" "DELEGATED(g)" "SOMEDAY(s!)" "|" "CANCELLED(c@/!)") (sequence "QUOTE(q!)" "QUOTED(Q!)" "|" "APPROVED(A@)" "EXPIRED(E@)" "REJECTED(R@)") (sequence "OPEN(O)" "|" "CLOSED(C)") ) ) ) (setq org-agenda-skip-deadline-if-done t) (setq org-agenda-skip-scheduled-if-done t) (setq org-agenda-skip-timestamp-if-done t) (setq org-agenda-columns-add-appointments-to-effort-sum t) (setq org-columns-default-format "%60ITEM(Tarea) %10TAGS(Tag) %10Effort(Estimado){:} %10CLOCKSUM(Real) %10COST(Costo){$}") (setq org-global-properties (quote (("Effort_ALL" . "1:00 2:00 3:00 4:00 5:00 6:00 7:00 8:00")))) (setq org-agenda-files '("~/org")) (setq org-agenda-ndays 1) (global-set-key (kbd "") 'org-todo) (defun org-todo () (interactive) (org-narrow-to-subtree) (org-show-todo-tree nil)) (global-set-key (kbd "") 'widen) (defun widen () (interactive) (widen) (org-reveal)) (setq calendar-week-start-day 7 european-calendar-style t calendar-day-name-array ["Dom" "Lun" "Mar" "Mie" "Jue" "Vie" "Sab"] calendar-month-name-array ["Ene" "Feb" "Mar" "Abr" "May" "Jun" "Jul" "Ago" "Sep" "Oct" "Nov" "Dic"] ) (org-remember-insinuate) (setq org-directory "~/org/") (setq org-attach-directory "~/org/attach/") (setq org-default-notes-file "~/org/notas.org") (define-key global-map "\C-cr" 'org-remember) (setq org-remember-templates '( ("Todo" ?t "* TODO %?%^g\n" "~/org/notas.org" "Tareas") ("Nota" ?n "* %?%^g\n" "~/org/notas.org" "Notas") ("Link" ?l "* %?%^g\n" "~/org/notas.org" "Links") ) ) (setq appt-message-warning-time '15) (setq appt-display-interval '5) (setq appt-display-mode-line t) (add-hook 'org-finalize-agenda-hook 'org-agenda-to-appt) (when window-system (setq appt-display-format 'window) (defun org-display (min-to-app new-time msg) (shell-command (concat "~/org/org-notify.sh " "'" msg "'")) ) (setq appt-disp-window-function (function org-display)) ) (require 'diary-lib) (add-hook 'diary-display-hook 'fancy-diary-display) (run-at-time nil 3600 'org-agenda-to-appt) (appt-activate t) (run-at-time "00:05" 300 'org-save-all-org-buffers) (setq org-remove-highlights-with-change nil) (setq org-return-follows-link t) (setq require-final-newline t) (require 'org-protocol) (setq global-auto-revert-mode t) (require 'org-crypt) (org-crypt-use-before-save-magic) (setq org-tags-exclude-from-inheritance (quote ("crypt"))) (setq org-crypt-key "74C8A3FE") (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. ) (setq org-agenda-clockreport-parameter-plist (quote (:link nil :maxlevel 6))) (setq org-completion-use-ido t) (setq org-refile-targets (quote ((org-agenda-files :maxlevel . 5) (nil :maxlevel . 5)))) (setq org-refile-use-outline-path (quote file)) (setq org-outline-path-complete-in-steps t) (setq org-refile-allow-creating-parent-nodes (quote confirm)) (setq org-agenda-custom-commands '( ("P" "Agenda Semanal" ( (agenda "" ( (org-agenda-ndays 10) ;; overview of appointments (org-deadline-warning-days 10) (org-agenda-start-on-weekday nil) ;; calendar begins today (org-agenda-repeating-timestamp-show-all t) (org-agenda-entry-types '(:timestamp :sexp)) ) ) (todo "NEXT" ;; todos sorted by context ( (org-agenda-prefix-format "[ ] %T: ") (org-agenda-sorting-strategy '(tag-up priority-down)) (org-agenda-todo-keyword-format "") (org-agenda-overriding-header "\nTareas NEXT\n-----------\n") ) ) (tags-todo "tareas" ( (org-agenda-prefix-format "[ ]") (org-agenda-todo-keyword-format "") (org-agenda-overriding-header "\nNotas\n-----\n") ) ) ) ( (org-agenda-with-colors nil) (org-agenda-compact-blocks t) (org-agenda-remove-tags t) (org-agenda-use-time-grid nil) (ps-number-of-columns 2) (ps-print-header nil) (ps-landscape-mode t) ) ("~/org/org.ps") ) ("d" "Próximas Entregas" agenda "" ((org-agenda-entry-types '(:deadline)) ;; a slower way to do the same thing ;; (org-agenda-skip-function '(org-agenda-skip-entry-if 'notdeadline)) (org-agenda-ndays 1) (org-deadline-warning-days 60) (org-agenda-time-grid nil)) ) ("W" "Revisión Semanal" ((agenda "" ((org-agenda-ndays 7))) ;; review upcoming deadlines and appointments ;; type "l" in the agenda to review logged items (todo "NEXT") ;; review someday/maybe items (tags-todo "notas") (todo "TODO") ;; review someday/maybe items (todo "MAYBE") ;; review someday/maybe items (todo "WAITING")) ) ;; review waiting items ("w" "Tareas en espera" todo "WAITING" ( (org-agenda-overriding-header "En Espera") ) ) ("r" "Rearchivar Tareas y Notas" 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 "Tareas a Rearchivar") ) ) ; http://www.gnu.org/software/emacs/manual/html_node/org/Sparse-trees.html ; http://orgmode.org/worg/org-tutorials/org-custom-agenda-commands.phpA ; ("p" . "Priorities") ; ("pa" "A items" tags-todo "+PRIORITY=\"A\"") ; ("pb" "B items" tags-todo "+PRIORITY=\"B\"") ; ("pc" "C items" tags-todo "+PRIORITY=\"C ;("b" "Bugs pendientes" tags-todo "bug" ; ( ; (occur-tree "NEW") ; ) ;) ;http://www.johnnyjacob.org/tools.html ("b" . "Bugs pendientes") ("ba" "Auditoria " tags-todo "auditoria+bug" ( (occur-tree "NEW") (org-agenda-remove-tags t) (org-agenda-sorting-strategy '(effort-down)) ) ) ("N" "Notas" tags "notas" ( (org-agenda-overriding-header "Notas") ) ) ("l" "Links" tags "link" ( (org-agenda-overriding-header "Links") ) ) ("t" "Tareas por rearchivar" tags "tareas" ( (org-agenda-overriding-header "tareas por rearchivas") ) ) ("n" "tareas NEXT" todo "NEXT" ( (org-agenda-overriding-header "tareas NEXT") ) ) ) ) (add-to-list 'load-path "/home/data/emacs/php-mode.el") (autoload 'php-mode "php-mode" "Major mode for editing php code." t) (add-to-list 'auto-mode-alist '("\\.php$" . php-mode)) (add-to-list 'auto-mode-alist '("\\.inc$" . php-mode)) (defun color-theme-subdued () "Subdued color theme for Emacs by Jason Blevins. Based on the Tango color palette." (interactive) (color-theme-install '(color-theme-subdued ((foreground-color . "#d3d7cf") (background-color . "#000") (background-mode . dark) (cursor-color . "#73d216") ; medium chameleon (mouse-color . "#73d216")) ;;; Standard font lock faces (default ((t (nil)))) (font-lock-comment-face ((t (:foreground "#61635e")))) ; dark aluminum (font-lock-comment-delimiter-face ((t (:foreground "#61635e")))) ; dark aluminum (font-lock-doc-face ((t (:foreground "#77507b")))) ; plum (font-lock-doc-string-face ((t (:foreground "#77507b")))) ; plum (font-lock-string-face ((t (:foreground "#77507b")))) ; plum (font-lock-keyword-face ((t (:foreground "#729fcf")))) ; light sky blue (font-lock-builtin-face ((t (:foreground "#855c1b")))) ; med-dark chocolate (font-lock-function-name-face ((t (:foreground "#c4a000")))) ; dark butter (font-lock-variable-name-face ((t (nil)))) (font-lock-preprocessor-face ((t (:foreground "#888a85")))) ; aluminum (font-lock-constant-face ((t (:foreground "#4e9a06")))) ; dark chameleon (font-lock-type-face ((t (:foreground "#ad7fa8")))) ; light plum (font-lock-warning-face ((t (:bold t :foreground "#cc0000")))) ; scarlet red ;; Search (isearch ((t (:foreground "#080808" :background "#edd400")))) (isearch-lazy-highlight-face ((t (:foreground "#080808" :background "#2e3436")))) ;; Emacs Interface (fringe ((t (:background "#0f0f0f")))) (border ((t (:background "#0f0f0f")))) (mode-line ((t (:background "#1f1f1f" :foreground "#eeeeec")))) (mode-line-buffer-id ((t (:background "#1f1f1f" :foreground "#eeeeec")))) (mode-line-inactive ((t (:background "#1f1f1f" :foreground "#888a85")))) (minibuffer-prompt ((t (:foreground "#729fcf")))) ; light sky blue (region ((t (:background "#2e3436")))) ;; Parenthesis matching (show-paren-match-face ((t (:foreground "#2e3436" :background "#73d216")))) (show-paren-mismatch-face ((t (:foreground "#2e3436" :background "#ef2929")))) ;; Line highlighting (highlight ((t (:background "#1f1f1f" :foreground nil)))) (highlight-current-line-face ((t (:background "#1f1f1f" :foreground nil)))) ;; Calendar (holiday-face ((t (:foreground "#cc0000")))) ; dark scarlet red ;; Info (info-xref ((t (:foreground "#729fcf")))) ; light sky blue (info-xref-visited ((t (:foreground "#ad7fa8")))) ; light plum ;;; AUCTeX (font-latex-sectioning-5-face ((t (:foreground "#c4a000" :bold t)))) ; dark butter (font-latex-bold-face ((t (:foreground "#4e9a06" :bold t)))) ; dark chameleon (font-latex-italic-face ((t (:foreground "#4e9a06" :italic t)))) ; dark chameleon (font-latex-math-face ((t (:foreground "#855c1b")))) ; med-dark chocolate (font-latex-string-face ((t (:foreground "#77507b")))) ; plum (font-latex-warning-face ((t (:foreground "#cc0000")))) ; dark scarlet red (font-latex-slide-title-face ((t (:foreground "#c4a000")))) ; dark butter ;;; post-mode (post-emoticon-face ((t (:background "#edd400" :foreground "#000000")))) ; medium butter (post-header-value-face ((t (:foreground "#4e9a06")))) ; dark chameleon (post-header-keyword-face ((t (:foreground "#4e9a06" :bold t)))) ; dark chameleon (post-signature-text-face ((t (:foreground "#cc0000")))) ; dark scarlet red (post-quoted-text-face ((t (:foreground "#855c1b" :slant normal)))) ; med-dark chocolate (post-double-quoted-text-face ((t (:foreground "#77507b" :slant normal)))) ; plum (post-multiply-quoted-text-face ((t (:foreground "#61635e" :slant normal)))) ; dark aluminum (post-email-address-text-face ((t (:foreground "#729fcf" :bold t)))) ; light sky blue (post-url-face ((t (:foreground "#729fcf" :bold t)))) ; light sky blue ))) (provide 'color-theme-subdued) (autoload 'php-mode "php-mode.el" "Php mode." t) (setq auto-mode-alist (append '(("/*.>php[345]?$" . php-mode)) auto-mode-alist)) (autoload 'python-mode "python-mode.el" "Python mode." t) (setq auto-mode-alist (append '(("/*.>py$" . python-mode)) auto-mode-alist)) (defun th-org-mode-init () (add-hook 'after-save-hook 'th-org-update-agenda-file t t)) (add-hook 'org-mode-hook 'th-org-mode-init) (defun th-org-update-agenda-file (&optional force) (interactive) (save-excursion (save-window-excursion (let ((file "~/org/org-agenda.txt")) (org-agenda-list) (org-write-agenda file))))) (th-org-update-agenda-file t)