;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Time-stamp: "2014-07-05 13:42:35 dieter" ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; (setq warning-suppress-types nil) ;; got an error in Emacs 23.2.1 when using C-x m: compose-mail ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; `important-bindings' and commands ;;new in E23 shift-selection-mode ;; --- search --- ;; C-g -- when search fails: go back to last found expression ;; C-y -- yank rest of line ;; C-w -- yank word (or char) to search string ;; C-M-y -- yank char to s-string ;; M-TAB -- complete from search ring ;; C-M-w -- delete char from search string ;; M-y -- Yank kill to search string ;; M-x info-apropos ;; ;; M-c -- toggle Case sensitivity ;; M-r -- toggle regexp search (SPACE matches here any whitespace! C-q SPACE) ;; M-s -- switch to word mode (M-s w) ;; M-% -- query-replace ;; C-M-% ;; M-o -- occur (display occurance in another window) ;; --- replace & macro execution --- ;; C-r -- recursive edit ;; C-M-c -- exit recursive edit ;; C-q -- quoted insert, helpful for avoiding abbrevs ;; --- Keyboard macros --- ;; C-x e eeee -- kmacro-end-and-call-macro, there is no need to do C-x C-) ;; C-x e eeee -- with zero argument repeate until error ;; C-x q -- kbd-macro-query while defining macro: query user during execution ;; C-x q -- kbd-macro-query (C-x C-q is toggle-read-only ;-)) ;; --- Tags --- ;; M-. -- find tag ;; M-* -- pop tag mark (go back from where you came from) ;; C-x 4 . -- find-tag-other-window ;; tags-search -- find all regexp in files mentioned in TAGS ;; tags-query-replace ;; M-, -- tags-loop-continue (of search) ;; --- coding system --- ;; C-x 8 C-h -- shows the key translations for special characters! ;; C-x 8 RET -- prompts for the names! ;; C-u C-x = -- encoding of letter (describe-char?) ;; C-h I -- describe-coding-system ;; --- input methods --- ;; C-x RET C-\ -- set-input-method ;; C-\ -- toggle-input-method ;; M-x list-input-methods ;; --- buffer window management ;; C-x - -- shrink-window-if-larger-than-buffer ;; C-x + -- balance-windows ;; C-x }{ -- resize width (enlarge/shrink horizontally) ;; C-x 4 c -- clone INDIRECT buffer other window ;; M-n -- clone *info* buffer ;; M-x clone-buffer -- clones buffers not visiting files ;; C-x 4 C-o -- display buffer in another window but don't select it ;; C-x C-SPC -- pop global mark (spanning files) ;; M-s -- now prefix for the occur family ;; M-s w -- search `isearch-forward-word' ;; M-s h -- higlight family ;; --- cursor positioning --- ;; C-l -- `recenter': E23 toogles to centre, top, bottom view ;; M-r -- position cursor in buffer ;; C-M-l -- reposition window, make the (function) definition visible ;; M-g M-g -- `goto-line' with C-u arg search in recent buffer ;; M-= -- count lines and characters ;; C-x = -- cursor position ;; --- dired and dired-x ;; C-x C-j -- jump to the current buffer-file in dired ;; but be cautious with omit-mode, e.g. with hidden file ;; M-o -- omit-mode ;: k -- kill (undisplay marked) lines ;; a -- dired-find-alternate-file ;; j -- jump to file (not interactive ;-) ;; mark stuff, prefix argument: unmark ;; *( -- mark predicate (string-match "Feb *1" time), (< 500 size) size ;; int in bytes ;; *. -- mark extensions (now also a list, without parens of extensions) ;; %l/u -- dired-downcase/upcase ;; `ibuffer' mixture of buffer menu and dired ;; s m -- sort acc. to mode ;; * / -- mark buffers in dired mode ;; x -- kill the buffers marked for deletion ;; D -- kill the marked buffers ;; `rectangle' ;; C-x r t -- string-rectangle, exchange rectangle with string ;; `register' ;; C-x r s -- copy-to-register ;; C-x r i -- insert-register ;; C-x r SPC -- point to register ;; C-x r j -- jump to register ;; --- miscellaneous -- ;; C-S backspace -- `kill-whole-line' ;; M-o M-s -- E23 `center-line' ;; C-x C-v -- `find-alternate-file' ;; C-M-o -- `split-line' ;; C-c C-SPACE -- change to next active erc buffer ;; M-end -- goto end of other window ;; C-M-w -- append to kill ;; C-M-x -- evaluate defun ;; M-SPC -- just one space (how could I forget!) & deactivate mark M-SPC SPC!! ;; M-\ -- delete-horizontal-space ;; C-x z zzzz -- repeat ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; `todo' ;; change delete-char to kill-char? ;; C-x C-o with C-u prefix should remove all empty lines, with repetiton? ;; C-o with neg. args should open line above current line ;; drag-chars: should point return to end of word? Change direction? ;; C-y, M-y: yank, yank-poping of multiple digits with prefix ;; arguments not possible they did something for this case: M-5 C-u 3 ;; M-^ should remove empty lines as well ;; move to the text's center (C-m is: `newline') ;; C-c C-m 8-) or sequence of C-a: left C-a: centre C-a: right ;; beginning of words, end of words select whole word like select ;; paragraph, move point below paragraph, behind word bbdb completion ;; also of surnames (in gnus?) M-z should be case sensitive ;; independend of (toggle-case-fold-search) ;; copy to global mark (like in CUA mode) ;; enable-recursive-minibuffers t ;; (ffap-bindings) ;; (setq ffap-require-prefix t) ;; delete-pair ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; `startup' ;; --- switch bars off --- (defun switch-off-menu-bars (arglist) (let* ((mode-string-list (mapcar 'symbol-name arglist)) (function-list (mapcar '(lambda (x) (intern (concat x "-bar-mode"))) mode-string-list))) (mapcar '(lambda (x) (funcall x -1)) function-list))) (switch-off-menu-bars '(tool scroll)) ;menu ;; ---switch on stuff --- (server-start) (load-theme 'deeper-blue) ;; edit-server ;; (add-to-list 'load-path "~/.emacs.d/") ;; (require 'edit-server) ;; (edit-server-start) (defun switch-on-modes (arglist) (let* ((mode-string-list (mapcar 'symbol-name arglist)) (function-list (mapcar '(lambda (x) (intern (concat x "-mode"))) mode-string-list))) (mapcar '(lambda (x) (funcall x 1)) function-list))) (setq display-time-day-and-date t) (switch-on-modes '( recentf blink-cursor column-number transient-mark ido ; delete-selection show-paren display-time electric-pair )) ;(require 'midnight); cleaning buffers (setq inhibit-startup-message t inhibit-startup-echo-area-message t parens-require-spaces nil) ;(setq initial-scratch-message nil) (put 'narrow-to-region 'disabled nil) ;; (toggle-indicate-empty-lines) (setq default-indicate-buffer-boundaries 'left) ;; deleting with delete-selection-mode does not copy to kill-ring! ;; delete = delete (without storing chars) ;; kill = cut (do a cut-selection-mode?) ;; (delete-selection-mode t) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; `window_layout' ;; split-window-preferred-function ;(setq split-height-threshold 40) ;nil would not allow splitting vertically! ;(setq split-width-threshold 140) ;when window is wider then 140 chars: split it! ;(setq split-width-threshold nil) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; `asymptote-mode' (add-to-list 'load-path "/usr/share/emacs/site-lisp") (require 'asy-mode) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; `gnuplot-mode' ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; `ibuffer' (global-set-key (kbd "C-x C-b") 'ibuffer) ;(autoload 'ibuffer "ibuffer" "List buffers." t) ;(autoload 'bla "bla") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; `iswitchb' ;(iswitchb-mode t) ;(setq iswitchb-default-method 'samewindow) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; `ido' ;; does now fancy fuzzy stuff 8-) ;; (require 'ido) (setq ido-default-buffer-method 'maybe-frame) ;(ido-mode t) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; `dict' ;; (require 'dict) ;; (setq dict-enable-key-bindings t ;; dict-database "deu-eng") ;; (defun dict-set-database () ;; (interactive) ;; (setq dict-database ;; (completing-read "database [deu-fra]: " ;; '(("vera" . "v") ("moby-thes" . "m") ("wn" . "w") ;; ( "fd" . "fra-deu") ("deu-fra" . "df") ;; ("eng-deu" . "ed") ("deu-eng" . "de")) ;; nil nil "deu-eng"))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; `ffap' (ffap-bindings) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; `info' ;; ;; git repo ;; (setq Info-additional-directory-list '("/appl/org-mode/doc")) ;; (add-to-list 'load-path "/appl/org-mode/lisp") ;; 8.2 (add-to-list 'Info-default-directory-list "/appl/org-8.2.5h/doc") (add-to-list 'load-path "/appl/org-8.2.5h/lisp") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; `ispell' (setq ispell-dictionary "de") ;default global dictionary (add-hook 'message-mode-hook 'flyspell-mode) ;; (setq ispell-program-name "aspell") ;;(setq ispell-program-name "hunspell") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; `erc' ;(defalias 'erc-encode-coding-string 'identity) ;; (require 'erc) ;; (setq erc-server "bitlbee.extreme-players.de" ;; erc-port 6667) ;messenger 7 (setq ;; erc-notify-list () ;; erc-track-remove-disconnected-buffers t erc-track-shorten-start 2 erc-track-showcount t ;; erc-track-when-inactive t erc-track-visibility 'selected-visible ;look to the selected frame if channel is there invisible erc-track-exclude '("&bitlbee") erc-track-exclude-server-buffer t ) ;; (setq erc-track-exclude '("&bitlbee")) ;; (setq erc-track-exclude-server-buffer t) ;; (setq erc-track-when-inactive t) ;; (setq erc-autoaway-idle-seconds 600) ;; (add-to-list 'erc-modules 'autoaway) ;; (erc-update-modules) ;; (setq erc-server-coding-system '(utf-8 . iso-8859-1)) ;incoming: car, outbound: cdr ;; (setq erc-encoding-coding-alist '()) ;; (add-to-list 'erc-encoding-coding-alist '("&bitlbee" . iso-8859-1)) ;; (add-to-list 'erc-encoding-coding-alist '("vik" . iso-8859-1)) ;; (add-to-list 'erc-encoding-coding-alist '("sil" . iso-8859-1)) ;; (add-to-list 'erc-encoding-coding-alist '("mojgi" . iso-8859-1)) ;; (add-to-list 'erc-encoding-coding-alist '("semi" . iso-8859-1)) ;; (add-to-list 'erc-encoding-coding-alist '("mahin" . iso-8859-1)) ;(require 'erc-services) ;(erc-services-mode -1) ;(erc-nickserv-identify-mode 'nil) ;; or use erc-nickserv-identify-mode ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; gnugo (require 'gnugo) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; `w3m' ;; (add-to-list 'load-path "/appl/emacs-w3m/") ;; (require 'w3m-load) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; `lisp' ;; (setq set-mark-command-repeat-pop t) ;; (setq parens-require-spaces nil) ;; (show-paren-mode t) ;; C-x o kills now (with Emachs23) one empty line ;; and C-S+backspace does this anyway ;(setq kill-whole-line t) ;C-k now kills also '\n' ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; `Modelica' ;; (autoload 'modelica-mode "modelica-mode" "Modelica Editing Mode" t) ;; (setq auto-mode-alist (cons '("\.mo$" . modelica-mode) auto-mode-alist)) ;; (setq auto-mode-alist (cons '("\.mos$" . modelica-mode) auto-mode-alist)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; `Ansys-mode' (setq load-path (cons "~/ansys-mode/trunk" load-path)) ;(setq ansys-current-ansys-version "140") (setq ansys-current-ansys-version "130") (setq ansys-highlighting-level 2) ;; ANSYS installation directory (cond ((string= window-system "x") ;; This is the default installation directory on Unix (setq ansys-install-directory "/usr/local/")) (t ;; the default is "C:\\Program Files" on Windows (setq ansys-install-directory "C:\\Program Files"))) (autoload 'ansys-mode "ansys-mode" nil t) (autoload 'ansys-customise-ansys "ansys-mode" "Activate the Ansys customisation buffer." 'interactive) (autoload 'ansys-abort-file "ansys-mode" "Activate Ansys abort file function." 'interactive) (autoload 'ansys-display-error-file "ansys-mode" "Activate Ansys display error file function." 'interactive) (autoload 'ansys-start-ansys-help "ansys-mode" "Activate Ansys start help function." 'interactive) ;; TODO: -license-file, -license-program variables (autoload 'ansys-license-status "ansys-mode" "Activate Ansys license status function." 'interactive) (setq auto-mode-alist (cons '("\\.mac" . ansys-mode) auto-mode-alist)) (auto-insert-mode 1) (setq auto-insert-query t) (add-hook 'find-file-hook 'auto-insert) (add-to-list 'auto-insert-alist '(ansys-mode . [ansys-skeleton-outline-template])) (add-hook 'ansys-mode-hook 'ansys-outline-minor-mode) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; `maxima' ;; (add-to-list 'load-path "/usr/local/src") ;; (autoload 'maxima-mode "maxima" "Maxima mode" t) ;; (autoload 'maxima "maxima" "Maxima interaction" t) ;; (setq auto-mode-alist (cons '("\\.max" . maxima-mode) auto-mode-alist)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; `bbdb' (require 'bbdb-loaddefs "/appl/bbdb-3.1.1/lisp/bbdb-loaddefs.el") ;; (add-to-list 'load-path "/usr/local/src/bbdb-2.35/lisp") ;; (require 'bbdb) ;; (define-key bbdb-mode-map "\M-s" 'bbdb-sms) ;(setq load-path (cdr load-path)) ;; ;(add-to-list 'load-path (expand-file-name "/appl/emacs/bbdb-2.35/lisp")) ;; (bbdb-initialize 'gnus 'message) ;; (setq bbdb-north-american-phone-numbers-p nil ;; bbdb-default-country "Germany" ;; bbdb-electric-p nil ;space restores window layout ;; bbdb-use-pop-up nil ;do not display pop up window ;; ) ;; phone related functions are placed in ~/.gnus ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; `org-mode' ;; TODO ;; auto-sitemap t ;; (setq org-capture-templates ;; '( ;; ("h" "hewi table entry" table-line (function (lambda ())) ;; "|bla|"))) (define-skeleton pic-tab-ent "Prompt the user for two variables, and use them in a skeleton." "" "| | [[file:img/" (setq v1 (skeleton-read "picture? ")) ".jpg][file:img/thumb/" v1 ".jpg]] " "| *" (capitalize (replace-regexp-in-string "_" " " v1)) "* " "| " (skeleton-read "date? ") "| " (skeleton-read "comment? ") "| " (skeleton-read "width? ") "\\times" (skeleton-read "height? ") "| " \n ) ;(require 'org-loaddefs) ;(load "org-loaddefs") ;(load "/appl/org-7.9.4/lisp/org-loaddefs") (setq org-use-property-inheritance t) (require 'org) (setq org-latex-tables-booktabs t) ;; (require 'org-beamer) ;; (add-to-list 'org-beamer-environments-extra ;; '("onlyenv" "O" "\\begin{onlyenv}%a" "\\end{onlyenv}")) ;; (add-to-list 'org-export-backends 'beamer) (setq org-link-abbrev-alist '(("att" . org-attach-expand-link))) (setq org-use-speed-commands t) ;; #+ATTR_HTML: target="_blank" for
Letzte Änderung: %C
\nErzeugt von %c
\n") ("en" " \nModification date: %C
\nGenerated by %c
\n") ("fr" " \nDate de la modification: %C
\nProduit par %c
\n") ;; ("de" " \nLetzte Änderung: %C
\nErzeugt von %c
\n") )) ;; (("en" " \nDate: %d
\nGenerated by %c
\n%v
\n")) ;;(require 'org-publish) ;(require 'ox-publish) ; :publishing-function org-html-publish-to-html ; #+style -> #+html_head (setq org-publish-project-alist '( ;; that are the tranlated files ("org-files" :sitemap-title "Die Dünenhof-Seite" :auto-sitemap t :base-directory "~/org/www/" ; :base-extension "org" ; org is the default :publishing-directory "~/www.duenenhof-wilhelm4.de/" :recursive t :headline-levels 4 ; Just the default for this project. :auto-preamble nil :exclude "template.*\\|navigation.*" :completion-function (lambda ()(compile "make -f /home/dieter/org/www/makefile")) :publishing-function org-html-publish-to-html ) ;; images ("images" :base-directory "~/org/www/" :base-extension "png\\|jpg\\|gif\\|swf\\|ico" :publishing-directory "~/www.duenenhof-wilhelm4.de/" :recursive t :publishing-function org-publish-attachment ) ;; static components except images ("other" :base-directory "~/org/www/" :base-extension "css\\|js\\|pdf\\|mp3\\|ogg\\|htm\\|dote" :publishing-directory "~/www.duenenhof-wilhelm4.de/" :recursive t :include ("dotemacs") :publishing-function org-publish-attachment ) ;; publish these components with C-c C-e X, C-c C-e P ("duenenhof" :components ("org-files" "other" "images")) )) ; org-latex-preview-ltxpng-directory ".emacs.d" (setq ; org-export-allow-BIND t org-export-allow-bind-keywords t org-confirm-babel-evaluate nil org-attach-directory "~/script/") ;(setq org-mobile-directory "~/Dropbox/MobileOrg" ; org-directory; ["~/org"] ; org-mobile-inbox-for-pull;["~/org/from-mobile.org"] ; org-mobile-files ;[(org-agenda-files]) ; ) ;(setq org-after-todo-state-change-hook 'org-clock-out-if-current) ;; (add-hook 'org-after-todo-state-change-hook 'org-auto-repeat-maybe) ;; (setq org-confirm-shell-link-function nil) ;; (setq org-confirm-elisp-link-function nil) ;; (setq org-agenda-include-diary t) ;; (setq org-agenda-start-on-weekday nil) ;nil: start on current day ;; (setq org-agenda-files (quote ("~/dieter.org.gz"))) (define-key global-map "\C-ca" 'org-agenda) (define-key global-map "\C-cc" 'org-capture) ; [NO-DEFAULT-PACKAGES] (setq org-beamer-outline-frame-options "") ;; test (require 'ox-latex) ;(setq org-latex-classes nil) (add-to-list 'org-latex-classes '("beamer" "\\documentclass[presentation]{conti} [PACKAGES] [EXTRA]" ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}") ("\\paragraph{%s}" . "\\paragraph*{%s}") ("\\subparagraph{%s}" . "\\subparagraph*{%s}") )) ;; test ;; (add-to-list 'org-export-latex-classes ;; '("koma-report" ;; "\\documentclass[a4paper]{scrreprt} ;; [PACKAGES] ;; [EXTRA]" ;; ("\\section{%s}" . "\\section*{%s}") ;; ("\\subsection{%s}" . "\\subsection*{%s}") ;; ("\\subsubsection{%s}" . "\\subsubsection*{%s}") ;; ("\\paragraph{%s}" . "\\paragraph*{%s}") ;; ("\\subparagraph{%s}" . "\\subparagraph*{%s}") ;; )) ;; test ;; (add-to-list 'org-export-latex-classes ;; '("scrreprt" ;; "\\documentclass[pagesize]{scrreprt} ;; [PACKAGES] ;; [EXTRA]" ;; ("\\section{%s}" . "\\section*{%s}") ;; ("\\subsection{%s}" . "\\subsection*{%s}") ;; ("\\subsubsection{%s}" . "\\subsubsection*{%s}") ;; ("\\paragraph{%s}" . "\\paragraph*{%s}") ;; ("\\subparagraph{%s}" . "\\subparagraph*{%s}") ;; )) ;; test ;; (add-to-list 'org-export-latex-classes ;; '("scrartcl" ;; "\\documentclass[pagesize]{scrartcl} ;; [PACKAGES] ;; [EXTRA]" ;; ("\\section{%s}" . "\\section*{%s}") ;; ("\\subsection{%s}" . "\\subsection*{%s}") ;; ("\\subsubsection{%s}" . "\\subsubsection*{%s}") ;; ("\\paragraph{%s}" . "\\paragraph*{%s}") ;; ("\\subparagraph{%s}" . "\\subparagraph*{%s}") ;; )) ;; test ;; (setq org-link-mailto-program '(compose-mail "%a" "%s")) ;; ;(require 'org-babel-R) (org-babel-do-load-languages 'org-babel-load-languages '((emacs-lisp . t) (calc . t) (R . t) (sh . t) ; (maxima . t) )) ;; test ;; (add-to-list 'org-babel-tangle-lang-exts '("ansys" . "mac")) ;; (add-to-list 'org-src-lang-modes '("ANSYS" . ansys)) ;; (setq org-confirm-babel-evaluate nil) ; (require 'org-latex) ; (add-to-list 'org-export-latex-packages-alist '("" "listings")) ; (add-to-list 'org-export-latex-packages-alist '("" "color")) ;; test ;; (setq org-export-latex-listings t) ;; (setq org-src-fontify-natively t) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; `ess' (add-to-list 'load-path "/usr/share/emacs23/site-lisp/ess") (require 'ess-site) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; `dired' (require 'dired) (require 'dired-x) (setq wdired-allow-to-change-permissions t) (add-to-list 'dired-guess-shell-alist-default '("\\.xcf\\'" "gimp") ) (require 'image-dired) (setq image-dired-external-viewer "/usr/bin/gimp") (setq image-dired-thumb-size 150) (eval-after-load "image-dired" '(progn (setq image-dired-cmd-create-thumbnail-options (replace-regexp-in-string "-strip" "-auto-orient -strip" image-dired-cmd-create-thumbnail-options) image-dired-cmd-create-temp-image-options (replace-regexp-in-string "-strip" "-auto-orient -strip" image-dired-cmd-create-temp-image-options)))) ;; (if (boundp 'dired-auto-revert-buffer) ;emacs 23.2 ;; (setq dired-auto-revert-buffer t)) ;; display directories at the top ;; history: ;; (require 'ls-lisp) ;; (setq ls-lisp-use-insert-directory-program nil ;; ls-lisp-dirs-first t) ;; distinguish dired buffers in the mode-line (defun ensure-buffer-name-ends-in-slash () "change buffer name to end with slash" (let ((name (buffer-name))) (if (not (string-match "/$" name)) (rename-buffer (concat name "/") t)))) (add-hook 'dired-mode-hook 'ensure-buffer-name-ends-in-slash) ;; ommit also the "hidden" files, starting with a dot ;; but leave .. in for using it as the alternative dired buffer (setq dired-omit-files "^\\.?#\\|^\\.$\\|^\\.[[:alnum:]].+$") (setq dired-recursive-copies 'always dired-recursive-deletes 'top ;; ask for the top directories dired-listing-switches "-hal --group-directories-first" ;; -G -- no Group information ;; -X -- sort extensions ;; -B -- ingnore Backups ending in ~, unecessary with omitt-mode `M-o' dired-dwim-target t ;; use other dired window subdir as default target (e.g. for file operations) ) ;; Enable toggling of uninteresting files. (add-hook 'dired-mode-hook '(lambda () (dired-omit-mode))) (define-key dired-mode-map "j" 'dired-isearch-filenames) ;; I want an interactive dired-goto-file `j', the default keymap for ;; this is `M-s f C-s' ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; `key-bindings' (define-key global-map "\C-x\C-j" 'dired-jump) ;; diredit the buffer-file :-) (add-to-list 'insert-pair-alist '(?* ?*)) (add-to-list 'insert-pair-alist '(?$ ?$)) (global-set-key [?\M-\"] 'insert-pair) (global-set-key [?\M-\[] 'insert-pair) (global-set-key [?\M-\?] 'insert-pair) (global-set-key "\C-c*" 'insert-pair) (global-set-key "\C-c{" 'insert-pair) (global-set-key "\C-c'" 'insert-pair) (global-set-key "\C-cl" 'org-store-link) (global-set-key "\C-c[" 'insert-pair) (global-set-key "\C-c$" 'insert-pair) (global-set-key "\C-c<" 'insert-pair) (global-set-key "\C-x4k" 'delete-other-window) ;; C-cd is reserved for dict! ;; (global-set-key "\C-ci" 'erc-nickserv-identify) ;; (global-set-key "\C-cl" 'longlines-mode) ;; (global-set-key "\C-m" 'copy-whole-line) this is return! (global-set-key "\C-cm" '(lambda () (interactive) (shell-command "from") (sit-for 6 t) (gnus-group-get-new-news))) ;(global-set-key "\C-cm" (lambda () "Switch to *Group*" (interactive) (switch-to-buffer "*Group*"))) ;test (global-set-key [?\C-\-] (lambda () (interactive) (message "do nothing"))) (global-set-key "\C-cg" (lambda () (interactive) (ispell-change-dictionary "de_DE"))) (global-set-key "\C-cb" (lambda () (interactive) (ispell-change-dictionary "british"))) (global-set-key "\C-cf" (lambda () "french" (interactive) (ispell-change-dictionary "fr_FR"))) ;; (global-set-key "\C-cc" 'copy-whole-line) ;(global-set-key "\C-cd" (lambda () (interactive) (dict-database))) ;; (global-set-key "\C-cy" '(lambda () (interactive) (popup-menu 'yank-menu))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; `calendar' ;;; Ulrich Müller, Inst. für Kernphysik, Univ. Mainz, D-55099 Mainz ;;; ulm@kph.uni-mainz.de, Tel. +49 6131 39-5812, Fax -2964 ;; (setq calendar-week-start-day 1) ; Monday ;; (setq european-calendar-style t) ;; (setq calendar-time-display-form ;; '(24-hours ":" minutes (and time-zone (concat " (" time-zone ")")))) ;; (setq calendar-day-name-array ;; ["Sonntag" "Montag" "Dienstag" "Mittwoch" ;; "Donnerstag" "Freitag" "Samstag"]) ;; (setq calendar-month-name-array ;; ["Januar" "Februar" "März" "April" "Mai" "Juni" ;; "Juli" "August" "September" "Oktober" "November" "Dezember"]) ;; (setq solar-n-hemi-seasons ;; '("Frühlingsanfang" "Sommeranfang" "Herbstanfang" "Winteranfang")) ;; (setq general-holidays ;; '((holiday-fixed 1 1 "Neujahr") ;; (holiday-fixed 5 1 "1. Mai") ;; (holiday-fixed 10 3 "Tag der Deutschen Einheit"))) ;; (setq christian-holidays ;; '( ;; ; (holiday-float 12 0 -4 "1. Advent" 24) ;; ; (holiday-float 12 0 -3 "2. Advent" 24) ;; ; (holiday-float 12 0 -2 "3. Advent" 24) ;; ; (holiday-float 12 0 -1 "4. Advent" 24) ;; (holiday-fixed 12 25 "1. Weihnachtstag") ;; (holiday-fixed 12 26 "2. Weihnachtstag") ;; ; (holiday-fixed 1 6 "Heilige Drei Könige") ;; ;; Date of Easter calculation taken from holidays.el. ;; (let* ((century (1+ (/ displayed-year 100))) ;; (shifted-epact (% (+ 14 (* 11 (% displayed-year 19)) ;; (- (/ (* 3 century) 4)) ;; (/ (+ 5 (* 8 century)) 25) ;; (* 30 century)) ;; 30)) ;; (adjusted-epact (if (or (= shifted-epact 0) ;; (and (= shifted-epact 1) ;; (< 10 (% displayed-year 19)))) ;; (1+ shifted-epact) ;; shifted-epact)) ;; (paschal-moon (- (calendar-absolute-from-gregorian ;; (list 4 19 displayed-year)) ;; adjusted-epact)) ;; (easter (calendar-dayname-on-or-before 0 (+ paschal-moon 7)))) ;; (filter-visible-calendar-holidays ;; (mapcar ;; (lambda (l) ;; (list (calendar-gregorian-from-absolute (+ easter (car l))) ;; (nth 1 l))) ;; '( ;; ;;(-48 "Rosenmontag") ;; ( -2 "Karfreitag") ;holiday in germany ;; ( 0 "Ostersonntag") ;; ( +1 "Ostermontag") ;; (+39 "Christi Himmelfahrt") ;holiday ;; (+49 "Pfingstsonntag") ;; (+50 "Pfingstmontag") ;; (+60 "Fronleichnam") ;holiday in hessen ;; )))) ;; ;;(holiday-fixed 8 15 "Mariä Himmelfahrt") ;not for hessen ;; ;;(holiday-fixed 11 1 "Allerheiligen") ;not for hessen ;; ;;(holiday-float 11 3 1 "Buß- und Bettag" 16) ;Sachsen ;; ;;(holiday-float 11 0 1 "Totensonntag" 20);no holiday ;; )) ;; (setq calendar-holidays ;; (append general-holidays ;; ;local-holidays other-holidays ;; christian-holidays)) ;; ;solar-holidays ;; ;;; adapt this to your location ;; (setq calendar-latitude 52.3) ;; (setq calendar-longitude -13.2) ;; (setq calendar-location-name "Berlin") ;; (add-hook 'diary-display-hook 'fancy-diary-display) ;; (setq mark-diary-entries-in-calendar t) ;; (setq mark-holidays-in-calendar t) ;; ;(setq calendar-mark-today "<") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; `abbrevs' ;; dynamically expand words and symbols ;; (setq dabbrev-abbrev-char-regexp "\\sw\\|\\s_") ;; (setq-default abbrev-mode t) (define-abbrev-table 'global-abbrev-table '( ; ("geehrter\ frau" "geehrte\ frau") ; ("geehrter\ Frau" "geehrte\ Frau") ; multi word abbrevs not yet possible ; and non word thingies like `usw.' ... ("altd" "altdeutsch") ("alu" "aluminium") ("Alu" "Aluminium") ("diter" "dieter") ("deiter" "dieter") ("Diter" "Dieter") ("Deiter" "Dieter") ("dt" "deutsch") ("eigtl" "eigentlich") ("ggf" "gegebenenfalls") ("Ggs" "Gegensatz") ("Ggf" "Gegebenenfalls") ("iA" "im Allgemeinen") ("iO" "in Ordnung") ("Jh" "Jahrhundert") ("jmd" "jemanden") ("mdal" "mundartlich") ("mfg" "Mit freundlichem Gruß") ("MfG" "Mit freundlichen Grüßen") ("oÄ" "oder Ähnliches") ("offz" "offiziell") ("svw" "so viel wie") ("teh" "the") ("Teh" "The") ("udn" "und") ("Udn" "Und") ("usw" "und so weiter") ("Usw" "Und so weiter") ("uA" ("unter Anderem")) ("uÄ" "und Ähnliches") ("ugs" "umgangssprachlich") ("vgl" "vergleiche") )) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; miscellaneous `stuff' ;; (setq next-line-add-newlines t) ;; (setq kill-read-only-ok t) ;; (setq scroll-preserve-screen-position t) ;(setq split-window-preferred-function (lambda (window) (split-window window nil (quote horiz)))) (setq user-mail-address "dieter@duenenhof-wilhelm.de") ;; default-input-method "french-prefix") ;; (setq safe-local-variable-values '((time-stamp-active . t) ;; (show-trailing-whitespace . t) ;; (indicate-empty-lines . t))) ;; shells ;; (add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on) ; needed for fancy colouring in bashrc ;; (add-hook 'shell-mode-hook ;; (lambda () ;; (set-process-query-on-exit-flag ;; (get-buffer-process (current-buffer)) nil))) (add-hook 'before-save-hook 'time-stamp) ;; (setq mark-even-if-inactive t) (setq visible-bell t) ;(setq display-time-format "%R %Y-%m-%d") ;need the date as well (setq display-time-24hr-format t display-time-use-mail-icon t ; display-time-mail-directory "/home/dieter/Mail/mail/misc" ) (defvar frame-no-initialised nil) (when (not frame-no-initialised) ; run only at emacs startup. (modify-frame-parameters (selected-frame) '((acm-no . 0)))) (defun assign-acm-no (frame) "FRAME is a (typically newly created) frame. Give it an acm-no frame-parameter if there is one free (in the range 0..11). Return that number or nil." (let ((assigned (make-bool-vector 12 nil)) (f (frame-list)) n) (while f (if (setq n (frame-parameter (car f) 'acm-no)) (aset assigned n t)) (setq f (cdr f))) (setq n 0) (while (and (< n 12) (aref assigned n)) (setq n (1+ n))) (if (= n 12) nil (modify-frame-parameters frame `((acm-no . ,n))) n))) (defun find-acm-no-frame (n) "Return the frame with parameter (acm-no . N), or nil." (let ((f (frame-list))) (while (and f (not (eq (frame-parameter (car f) 'acm-no) n))) (setq f (cdr f))) (car f))) (add-hook 'after-make-frame-functions 'assign-acm-no) (defun select-frame-acm-no (n) "Select the frame with acm-no frame-parameter N, or do nothing." (let ((frame (find-acm-no-frame n))) (if frame (select-frame-set-input-focus frame)))) (global-set-key [f1] (lambda () "Switch to frame F1" (interactive) (select-frame-acm-no 0))) (global-set-key [f2] (lambda () "Switch to frame F2" (interactive) (select-frame-acm-no 1))) (global-set-key [f3] (lambda () "Switch to frame F3" (interactive) (select-frame-acm-no 2))) (global-set-key [f4] (lambda () "Switch to frame F4" (interactive) (select-frame-acm-no 3))) (global-set-key [f5] (lambda () "Switch to frame F5" (interactive) (select-frame-acm-no 4))) (global-set-key [f6] (lambda () "Switch to frame F6" (interactive) (select-frame-acm-no 5))) (global-set-key [f7] (lambda () "Switch to frame F7" (interactive) (select-frame-acm-no 6))) (global-set-key [f8] (lambda () "Switch to frame F8" (interactive) (select-frame-acm-no 7))) (global-set-key [f9] (lambda () "Switch to frame F9" (interactive) (select-frame-acm-no 8))) ;; ;(global-set-key [f10] (lambda () "Switch to frame F10" (interactive) (select-frame-acm-no 9))) ;; ;(global-set-key [f11] (lambda () "Switch to frame F11" (interactive) (select-frame-acm-no 10))) ;; ;(global-set-key [f12] (lambda () "Switch to frame F12" (interactive) (select-frame-acm-no 11))) ;; (defun dieters_shells () ;; (interactive) ;; (shell "*Sdefault*") ;; ; (split-window-horizontally) ;; ; (other-window 1) ;; ; (term "/bin/bash") ;; ) ;; ;; (let ((font "-Misc-Fixed-Medium-R-Normal--14-130-75-75-C-70-ISO8859-1")) ;; ;; (setq initial-frame-alist ;; ;; (cons `(font . ,font) initial-frame-alist)) ;; ;; (setq default-frame-alist ;; ;; (cons `(font . ,font) default-frame-alist))) (if (string= "x" window-system) (let () ;; ; ((font "-Misc-Fixed-Medium-R-Normal--14-130-75-75-C-70-ISO8859-1")) ;; ; (setq mode-line-frame-identification '("-%F ")) ;; ;; (add-to-list 'default-frame-alist ;; ;; '(fullscreen . fullboth)) ;; ;; (add-to-list 'default-frame-alist ;; ;; '(reverse . t)) ;; ;; (add-to-list 'initial-frame-alist ;; ;; '(fullscreen . fullboth)) ;; ;; (add-to-list 'initial-frame-alist ;; ;; '(reverse . t)) ;; ;; (setq truncate-partial-width-windows nil) ;; ;; (global-hl-line-mode 0) ; higlights cursor line if > 0 ;; ;; annoying with table-recognize ;; ;; ------------------------------------------------------------ ;; ;; --- shells ; (select-frame-acm-no 0) (set-frame-name "Shell") ;; (split-window-horizontally) ;otherwise to wide for reading in fullscrenn mode (shell) ;; (other-window 1) ;; (shell "*shell2*") ;; ------------------------------------------------------------ ;; --- work (make-frame-command) ;Work (select-frame-acm-no 1) (find-file "~/dieter.org.gz") (set-frame-name "Work") ;; ------------------------------------------------------------ ;; --- eww (make-frame-command) ; w3m, create new frame but do not select it (select-frame-acm-no 2) (set-frame-name "eww") ; (split-window-horizontally) ;otherwise to wide for reading in fullscrenn mode ;; ------------------------------------------------------------ ;; --- dired (make-frame-command) ;dired create new frame but do not select it (select-frame-acm-no 3) (set-frame-name "dired") (dired "~") ;; (split-window-horizontally) ;; (other-window 1) ;; (dired "/media") ;; ------------------------------------------------------------ ;; image-dired (make-frame-command) (select-frame-acm-no 4) (set-frame-name "image-dired") ;; (split-window-horizontally) ;; (other-window 1) ;; (erc) ;; ------------------------------------------------------------ ;; --- info (make-frame-command) (select-frame-acm-no 5) (set-frame-name "Info") ;; (split-window-horizontally) (info) ;; ------------------------------------------------------------ ;; --- Programming (make-frame-command) ;programming (select-frame-acm-no 6) (set-frame-name "Lisp") ; (find-file "~/.gnus.el") (find-file "~/.emacs") ;; (split-window-horizontally) ;; (other-window 1) ;; (pop-to-buffer "*scratch*") ; (find-file "~/.bashrc") ; (split-window-horizontally) ; (pop-to-buffer "*scratch*" 'other-window 'norecord) ;; ------------------------------------------------------------ ;; --- gnus (make-frame-command) ;gnus (select-frame-acm-no 7) (set-frame-name "Gnus") (gnus) ;; ------------------------------------------------------------ ;; --- Calendar, calc ; (appt-activate 1) (make-frame-command) (select-frame-acm-no 8) (set-frame-name "Calc") (find-file "~/diary") (calendar) (calc) )) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; function definitions (defun mark-paragraph (&optional arg allow-extend) "Put mark at beginning of this paragraph, point at end. The paragraph marked is the one that contains point or follows point. With argument ARG, puts point at end of a following paragraph, so that the number of paragraphs marked equals ARG. If ARG is negative, point is put at the beginning of this paragraph, mark is put at the end of this or a previous paragraph. Interactively, if this command is repeated or (in Transient Mark mode) if the mark is active, it marks the next ARG paragraphs after the ones already marked." (interactive "p\np") (unless arg (setq arg 1)) (when (zerop arg) (error "Cannot mark zero paragraphs")) (cond ((and allow-extend ;we already called this function (or (and (eq last-command this-command) (mark t)) (and transient-mark-mode mark-active))) (forward-paragraph arg)) ((and (bolp) (eolp)) ;we are in an empty line (push-mark nil t t) (forward-paragraph arg)) (t ;we are within a paragraph (backward-paragraph arg) (push-mark nil t t) (forward-paragraph arg)))) (defun transpose-chars (arg) "Interchange characters around point. With prefix arg ARG interchange adjacent characters ARG characters before point (ARG characters after point if ARG is negative). If no argument and at end of line, the previous two characters are exchanged." (interactive "*P") (when (null arg) (if (eolp) (setq arg 1) (setq arg 0))) (if (eq ?\C-u (aref (this-command-keys) 0)) (drag-chars arg) (let* ((p (point)) (p1 (- p (prefix-numeric-value arg) 1)) (p2 (1+ p1))) (when (< p1 (point-min)) (error "Beginning of buffer or narrowed region")) (when (> p2 (point-max)) (error "End of buffer or narrowed region")) (setq c (delete-and-extract-region p1 p2)) (goto-char p2) (insert c) (goto-char p)))) (defun drag-chars (arg) "Interchange characters around point, moving forward one character. With prefix arg ARG, effect is to take character before point and drag it forward past ARG other characters (backward if ARG negative). If no argument and at end of line, the previous two chars are exchanged." (interactive "*P") (and (null arg) (eolp) (forward-char -1)) (transpose-subr 'forward-char (prefix-numeric-value arg))) (defun delete-other-window (&optional win) "Delete the other, not selected Emacs window." (interactive "p") (unless win (setq win 1)) (other-window win) (delete-window)) ;; (defun copy-whole-line () ;; (interactive) ;; (save-excursion ;; (let (b1 b2) ;; (beginning-of-line) ;; (setq b1 (point)) ;; (forward-line) ;; (setq b2 (point)) ;; (copy-region-as-kill b1 b2) ;; (message "%s" "Copied whole line.")))) ;; (defun move-centre-of-line () ;; (interactive) ;; ) (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. ;; '(canlock-password "47c14f464fdea92e787420b6b278c266dc354d54") ;; '(newsticker-url-list (quote (("dw-fr" "http://rss.dw-world.de/rdf/rss-fre-all") ("planet emacsen" "http://planet.emacsen.org/atom.xml") ("heise open" "http://www.heise.de/open/news/news-atom.xml") ("boxing" "http://newsrss.bbc.co.uk/rss/sportonline_uk_edition/boxing/rss.xml")))) ;; '(newsticker-url-list-defaults (quote (("Debian Security Advisories - Long format" "http://www.debian.org/security/dsa-long.en.rdf")))) '(org-agenda-files (quote ("~/org/private.org"))) '(safe-local-variable-values (quote ((indicate-empty-lines . t) (word-wrap . t) (set-input-method . french-prefix) (time-stamp-active . t) (before-save-hook . time-stamp))))) (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. ) (put 'dired-find-alternate-file 'disabled nil)