.emacs-my
changeset 56 7cb8a2dc4a53
parent 55 7faba42a825d
parent 54 d8b07256d33c
child 57 635e1a8a3ed9
--- a/.emacs-my	Fri Jul 04 11:16:02 2008 +0300
+++ b/.emacs-my	Tue Jul 08 18:08:06 2008 +0300
@@ -1,7 +1,6 @@
 ;; -*- mode: lisp; coding: cp1251 -*-
 ;;
-;; Copyright (C) 2008 by Gavenko Oleksandr
-;; Copyright (C) 2008 by Гавенко Алескандр
+;; Copyright (C) 2008 by Oleksandr Gavenko <gavenkoa@gmail.com>
 ;;
 ;; ~/.emacs file for GNU Emacs 21.
 
@@ -52,9 +51,9 @@
     ;; Для X-window и Win
     (progn
       ;; size of emacs area and position
-      (set-frame-height (selected-frame) 52)
-      (set-frame-width (selected-frame) 130)
-      (set-frame-position (selected-frame) 30 15)
+      (set-frame-height (selected-frame) 60)
+      (set-frame-width (selected-frame) 120)
+      (set-frame-position (selected-frame) 10 25)
 
       ;;установка цветов экрана
       (set-background-color "white")
@@ -135,7 +134,10 @@
 ;; ======================================================================
 ;; Keyboard, mouse and selection
 
-(setq default-input-method 'cyrillic-jcuken)
+;; cyrillic-jcuken  for 567 is :,.
+;; russian-computer for 567 is %^&
+(setq default-input-method 'russian-computer)
+
 ;; (pc-bindings-mode) ; Myself define keybinding, see
 ;; Настройка выделения "как в Windows"
 (setq pc-select-selection-keys-only t)  ; to avoid some key bindings as F6, etc
@@ -203,8 +205,9 @@
 (codepage-setup 866)
 (codepage-setup 1251)
 
-;; (setq-default coding-system-for-read  'cp1251-dos) ; comment because prefer-coding-system will be ignored
-;; (setq-default coding-system-for-write 'cp1251-dos) ;
+;; Comment because prefer-coding-system will be ignored.
+;; (setq-default coding-system-for-read  'cp1251-dos)
+;; (setq-default coding-system-for-write 'cp1251-dos)
 
 ;; (setq locale-coding-system  'cp1251-dos)
 ;; (set-terminal-coding-system 'cp1251)
@@ -238,16 +241,12 @@
 ;; To open from command line file, which names has extended opcode
 ;; (set-file-name-coding-system 'cp1251)
 
-;; (set-language-environment "Russian")
+;; (set-language-environment "Russian") ; XXX not used as set default coding system to koi8-r.
 
 ;; ======================================================================
 ;;
 ;; NON-STANDARD VARIABLES
 
-(defvar emacs-base-dir
-  (expand-file-name "~/emacs")
-  "*Name of directory where emacs instaled.")
-
 ;; ======================================================================
 ;;
 ;; STANDARD VARIABLES
@@ -261,9 +260,6 @@
 ;; Don't beep in my headphones!
 ;; (setq visible-bell t) ; XXX in text terminal revert screen if press [end] or [home]
 
-(setq ange-ftp-generate-anonymous-password
-      user-mail-address)
-
 ;; Prompt before evaluating local bits of lisp.  This stops people
 ;; putting things at the end of files which delete all your files!
 (setq enable-local-variables t
@@ -346,8 +342,8 @@
 ;; (setq all-christian-calendar-holidays t)
 ;; (setq calendar-date-display-form (quote ((format "%04s-%02d-%02d" year (string-to-int month) (string-to-int day)))))
 ;; (setq calendar-time-display-form (quote (24-hours ":" minutes (if time-zone " (") time-zone (if time-zone ")"))))
-;; (setq calendar-week-start-day 1)
-;; (setq european-calendar-style t)
+(setq calendar-week-start-day 1)
+(setq european-calendar-style t)
 
 ;; ======================================================================
 ;;
@@ -387,27 +383,14 @@
 ;; (desire 'bbdb "bbdb")
 
 ;; ----------------------------------------------------------------------
-;; Appointments, diary, calendar.
-;;
-;; Use "M-x calendar RET" to display the calendar and start
-;; appointment warnings.
-
-;; (desire 'appt)
-;; (desire 'calendar)
-;; (desire 'todo-mode)
-;; (desire 'diary "diary-lib")
-
-;; ----------------------------------------------------------------------
 
 ;; These provide options for the various message handling packages.
 ;; (desire 'browse-url)
 ;; (desire 'mailcrypt)
-;; (desire 'supercite)
 
 ;; Message handing packages.
 ;; (desire 'gnus)
 ;; (desire 'message)
-;; (desire 'vm)
 ;; (desire 'sendmail)
 
 ;; ----------------------------------------------------------------------
@@ -599,6 +582,56 @@
 ;; )
 
 ;; ======================================================================
+;; Organize, todo mode.
+
+;; ----------------------------------------------------------------------
+;; org-mode
+
+(if (featurep 'org)
+    (progn
+      (add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
+      (setq org-agenda-files "~/todo.org"
+            org-default-notes-file "~/notes.org"
+            org-agenda-ndays 20
+            org-deadline-warning-days 14
+            org-agenda-show-all-dates t
+            org-agenda-skip-deadline-if-done t
+            org-agenda-skip-scheduled-if-done t
+            org-agenda-start-on-weekday nil
+            org-reverse-note-order t
+            org-todo-keywords '((sequence "TODO" "START" "|" "DONE"))
+            org-remember-store-without-prompt t)))
+
+;; ----------------------------------------------------------------------
+;; TODO, XXX, FIXME highlight.
+;; Show blanks and FIXME
+;; http://www.emacswiki.org/cgi-bin/wiki/EightyColumnRule
+
+(defface my-tab-face
+  '((t :background "gray"))
+  "Face for showing TABs."
+  :group 'basic-faces)
+
+(defface my-todo-face
+  '((t :foreground "red" :weight bold))
+  "Font for showing TODO words."
+  :group 'basic-faces)
+
+(defface my-conflict-face
+  '((t :background "pink" :foreground "red" :weight bold))
+  "Font for showing conflicts."
+  :group 'basic-faces)
+
+(add-hook 'font-lock-mode-hook (function (lambda ()
+  (unless (or (eq 'diff-mode major-mode) (eq 'script-mode major-mode))
+    (font-lock-add-keywords nil
+     '(
+       ("\t+" 0 'my-tab-face t)
+       ("\\<\\(FIXME:?\\|XXX:?\\|TODO:?\\)\\>" 1 'my-todo-face t)
+       ("\\(=\\{7,\\}\\|<\\{7,\\}\\|>\\{7,\\}\\)" 1 'my-conflict-face t)
+       ))))))
+
+;; ======================================================================
 ;; VCS, version control, cvs, svn.
 
 (if (equal window-system 'w32)
@@ -631,42 +664,9 @@
 
 (add-to-list 'auto-mode-alist '("\\.cu$" . c-mode))
 
-(setq-default show-trailing-whitespace t)
-;; (add-hook 'c-mode-hook '(lambda ()
-;;                           (setq show-trailing-whitespace t)))
-
-;; ----------------------------------------------------------------------
-;; TODO, XXX, FIXME highlight.
-;; Show blanks and FIXME
-;; http://www.emacswiki.org/cgi-bin/wiki/EightyColumnRule
-
-(defface my-tab-face
-  '((t :background "gray"))
-  "Face for showing TABs."
-  :group 'basic-faces)
+(setq comment-style (quote indent))
 
-(defface my-todo-face
-  '((t :foreground "red" :weight bold))
-  "Font for showing TODO words."
-  :group 'basic-faces)
-
-(defface my-conflict-face
-  '((t :background "pink" :foreground "red" :weight bold))
-  "Font for showing conflicts."
-  :group 'basic-faces)
-
-(add-hook 'font-lock-mode-hook (function (lambda ()
-  (unless (or (eq 'diff-mode major-mode) (eq 'script-mode major-mode))
-    (font-lock-add-keywords nil
-     '(
-       ("\t+" 0 'my-tab-face t)
-       ("\\<\\(FIXME:?\\|XXX:?\\|TODO:?\\)\\>" 1 'my-todo-face t)
-       ("\\(=\\{7,\\}\\|<\\{7,\\}\\|>\\{7,\\}\\)" 1 'my-conflict-face t)
-       ))))))
-
-;; ----------------------------------------------------------------------
-;; org-mode
-(setq org-agenda-skip-scheduled-if-done t)
+(setq-default show-trailing-whitespace t)
 
 ;; ----------------------------------------------------------------------
 ;; Diff, patch
@@ -684,10 +684,9 @@
 (setq-default tab-width 4)
 (setq-default indent-tabs-mode nil)     ; t - будут вставляться \t
 (setq tab-always-indent t)
-(setq tab-stop-list (quote (0 4 8 12 16 20 24 28 32 36 40)))
 (setq c-tab-always-indent t)
-
-(setq comment-style (quote indent))
+(loop for x downfrom 40 to 1 do
+      (setq tab-stop-list (cons (* x 4) tab-stop-list)))
 
 ;; ----------------------------------------------------------------------
 ;; Diff.
@@ -703,12 +702,10 @@
 ;; My funny error messages.
 ;; XXX нужно реализовать через hook.
 (require 'compile)
-(add-to-list 'compilation-error-regexp-alist-alist '(nant "^\\( +\\[csc\\] \\|\\)\\(.*\\)(\\([0-9]*\\),\\([0-9]*\\)):" 2 3 4))
-(add-to-list 'compilation-error-regexp-alist 'nant)
-(add-to-list 'compilation-error-regexp-alist-alist '(msvc "^ *\\(.*\\)(\\([0-9]*\\)) +:" 1 2))
-(add-to-list 'compilation-error-regexp-alist 'msvc)
-(add-to-list 'compilation-mode-font-lock-keywords '("\\(/[Oo][Uu][Tt]:[^ 	]+\\)" . 1))
-(add-to-list 'compilation-mode-font-lock-keywords '("[ 	]\\(/F[oe][^ 	]+\\)" . 1))
+(add-to-list 'compilation-error-regexp-alist '("^\\( +\\[csc\\] \\|\\)\\(.*\\)(\\([0-9]*\\),\\([0-9]*\\)):" 2 3 4))
+(add-to-list 'compilation-error-regexp-alist '("^ *\\(.*\\)(\\([0-9]*\\)) +:" 1 2))
+;; (add-to-list 'compilation-mode-font-lock-keywords '("\\(/[Oo][Uu][Tt]:[^ 	]+\\)" . 1))
+;; (add-to-list 'compilation-mode-font-lock-keywords '("[ 	]\\(/F[oe][^ 	]+\\)" . 1))
 
 ;; ----------------------------------------------------------------------
 ;; asm
@@ -762,9 +759,6 @@
 ;;   ;; add my personal style and set it for the current buffer
 ;;   (c-add-style "PERSONAL" my-c-style t)
 ;;   ;; other customizations
-;;   (setq tab-width 8
-;;         ;; this will make sure spaces are used instead of tabs
-;;         indent-tabs-mode nil)
 ;;   ;; we like auto-newline and hungry-delete
 ;;   (c-toggle-auto-hungry-state 1)
 ;;   ;; key bindings for all supported languages.  We can put these in
@@ -917,11 +911,12 @@
 
 
 ;; ======================================================================
+;; Setup user info.
 
 (cd "~/")
-(setq my-author-name (getenv "USER"))
-(setq user-full-name (getenv "USER"))
-(setenv "ORGANIZATION" "Oleksandr Gavenko <gavenkoa@gmail.com>")
+(setq user-full-name "Oleksandr Gavenko")
+(setq user-mail-address "gavenkoa@gmail.com")
+(setenv "ORGANIZATION" (concat user-full-name " <" user-mail-address  ">"))
 
 (message ".emacs loaded OK.")