Discussion:
C-v and M-v stopped to work
(too old to reply)
AndreLTR
2013-05-18 09:11:08 UTC
Permalink
Hello,

All of a sudden, C-v and M-v no longer work. I've just a few changes and cannot find where the actual error is. For instance, C-v makes paste. I use ubuntu 13.04. The .emacs and .bashrc are below. Any help greatly appreciated.

Sincerely,

Andre Luiz

-------------------------- .emacs -----------------------------------------
;; File name: ` ~/.emacs
;; ---------------------

;; If you need your own personal ~/.emacs
;; please make a copy of this file
;; an placein your changes and/or extension.

;; Copyright (c) 1997-2002 SuSE Gmbh Nuernberg, Germany.

;; Author: Werner Fink, <***@suse.de> 1997,98,99,2002

;; Test of Emacs derivates
;; -----------------------
(if (string-match "XEmacs\\|Lucid" emacs-version)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; XEmacs
;;; ------
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(progn
(if (file-readable-p "~/.xemacs/init.el")
(load "~/.xemacs/init.el" nil t))
)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; GNU-Emacs
;;; ---------
;;; load ~/.gnu-emacs or, if not exists /etc/skel/.gnu-emacs
;;; For a description and the settings see /etc/skel/.gnu-emacs
;;; ... for your private ~/.gnu-emacs your are on your one.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(if (file-readable-p "~/.gnu-emacs")
(load "~/.gnu-emacs" nil t)
(if (file-readable-p "/etc/skel/.gnu-emacs")
(load "/etc/skel/.gnu-emacs" nil t)))

;; Custum Settings
;; ===============
;; To avoid any trouble with the customization system of GNU emacs
;; we set the default file ~/.gnu-emacs-custom
(setq custom-file "~/.gnu-emacs-custom")
(load "~/.gnu-emacs-custom" t t)
)
;; end of test emacs derivatives

;; auto save and backup setup
;; disable backup
(setq backup-inhibited t)
;; disable auto save
(setq auto-save-default nil)
;; (define-minor-mode sensitive-mode
;; - "For sensitive files like password lists.
;; It disables backup creation and auto saving.
;; With no argument, this command toggles the mode.
;; Non-null prefix argument turns on the mode.
;; Null prefix argument turns off the mode."
;; ;; The initial value.
;; nil
;; ;; The indicator for the mode line.
;; " Sensitive"
;; ;; The minor mode bindings.
;; nil
;; (if (symbol-value sensitive-mode)
;; (progn
;; ;; disable backups
;; (set (make-local-variable 'backup-inhibited) t)
;; ;; disable auto-save
;; (if auto-save-default
;; (auto-save-mode -1)))
;; ;resort to default value of backup-inhibited
;; (kill-local-variable 'backup-inhibited)
;; ;resort to default auto save setting
;; (if auto-save-default
;; (auto-save-mode 1))))

;; (setq auto-mode-alist
;; (append '(("\\.tex$" . sensitive-mode) ("\\.bib$" . sensitive-mode))
;; auto-mode-alist))
;; I know that string is in my Emacs somewhere!

;; spell options
(setq ispell-program-name "aspell")
(setq-default ispell-program-name "aspell")
(setq-default ispell-extra-args '("--reverse"))
;; ;; dicionario brasileiro ispell
(setq ispell-dictionary "brasileiro")
(global-set-key (kbd "C-c C-x") 'ispell-buffer)
(defcustom search-all-buffers-ignored-files
(list (rx-to-string '(and bos (or ".bash_history" "TAGS") eos)))
"Files to ignore when searching buffers via \\[search-all-buffers]."
:type 'editable-list)
(require 'grep)
(defun search-all-buffers (regexp prefix)
"Searches file-visiting buffers for occurence of REGEXP. With prefix > 1 (i.e., if you type C-u \\[search-all-buffers]), searches all buffers."
(interactive (list (grep-read-regexp)
current-prefix-arg))
(message "Regexp is %s; prefix is %s" regexp prefix)
(multi-occur
(if (member prefix '(4 (4)))
(buffer-list)
(remove-if
(lambda (b) (some
(lambda (rx)
(string-match rx
(file-name-nondirectory (buffer-file-name b)))) search-all-buffers-ignored-files))
(remove-if-not 'buffer-file-name (buffer-list))))
regexp))
(defun query-replace-in-open-buffers (arg1 arg2)
"query-replace in open files"
(interactive "sQuery Replace in open Buffers: \nsquery with: ")
(mapcar
(lambda (x)
(find-file x)
(save-excursion
(beginning-of-buffer)
(query-replace arg1 arg2)))
(delq
nil
(mapcar
(lambda (x)
(buffer-file-name x))
(buffer-list)))))
;; keyword configuration
(global-set-key [f5] 'query-replace-in-open-buffers) ;; replace word(s) em todos buffers
(global-set-key [f6] 'search-all-buffers) ;; search word(s) em todos buffers
(global-set-key [f7] 'spell-buffer) ;; spell buffer
(global-set-key [f8] 'spell-region) ;; spell region
(global-set-key [f9] 'spell-word) ;; spell word
;; (global-set-key s-` `)
;; search multiple buffers
(defun my-multi-occur-in-matching-buffers (regexp &optional allbufs)
"Show all lines matching REGEXP in all buffers."
(interactive (occur-read-primary-args))
(multi-occur-in-matching-buffers ".*" regexp))
(global-set-key (kbd "M-s /") 'my-multi-occur-in-matching-buffers)
;; menu customization
(require 'easymenu)
;; (easy-menu-add-item nil '("tools") ["biblatex" biblatex t])
;; font size and type
(set-face-attribute 'default nil :font "Droid Sans Mono-13")
;;; line width
(setq-default fill-column 80)
(add-hook 'text-mode-hook 'turn-on-auto-fill)
;;; frame size and position
(defun arrange-frame (w h x y)
"Set the width, height, and x/y position of the current frame"
(let ((frame (selected-frame)))
(delete-other-windows)
(set-frame-position frame x y)
(set-frame-size frame w h)))
(arrange-frame 125 110 80 80)
;; maximize window
;; winner-mode
;; C-c left-right
;; (when (fboundp 'winner-mode)
;; (winner-mode 1))
;; General configuration
;; Text and the such
;; Use colors to highlight commands, etc.
(global-font-lock-mode t)
;; (setq font-lock-support-mode 'lazy-lock-mode) ;; METAPOST
;; Disable the welcome message
(setq inhibit-startup-message t)
;; Format the title-bar to always include the buffer name
(setq frame-title-format "emacs - %b")
;; Display date and time
(setq display-time-day-and-date 't)
;; Make the mouse wheel scroll Emacs
(mouse-wheel-mode t)
;; Always end a file with a newline
(setq require-final-newline t)
;; Stop emacs from arbitrarily adding lines to the end of a file when the
;; cursor is moved past the end of it:
(setq next-line-add-newlines nil)
;; Flash instead of that annoying bell
(setq visible-bell t)
;; Remove icons toolbar
(if (> emacs-major-version 20)
(tool-bar-mode -1))
;; Use y or n instead of yes or not
(fset 'yes-or-no-p 'y-or-n-p)
;;; color interface
;;;;;;;;;;;;Emacs customizations in general;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;(set-foreground-color "black")
(set-background-color "wheat")
(set-cursor-color "red")
;;; Permite usar font-lock sempre
(cond ((fboundp 'global-font-lock-mode)
;; turn on font-lock in all modes that support it
(global-font-lock-mode t)
;; maximum colors
(setq font-lock-maximum-decoration t)))
;; (standard-display-european-internal)
;; (standard-display-european t)
;; (require 'iso-syntax)
(set-input-mode (car (current-input-mode))
(nth 1 (current-input-mode)) 0)
;; (require 'iso-acc)
(setq line-number-mode t)
(setq column-number-mode t)
;; integrate paste between programs
(setq x-select-enable-clipboard t)
(setq interprogram-paste-function 'x-cut-buffer-or-selection-value)
;; (setq cua-mode t)
;; copy
;;(global-set-key (kbd "C-q") 'copy)
;; undo
(global-set-key (kbd "C-z") 'undo)
;; Syntax highlighting:
;; To get hilit19 support try adding:
;; (matlab-mode-hilit)
;; (add-to-list load-path "~/elisp")
;; Windows ALT-TAB
(defun switch-to-previous-buffer ()
(interactive)
(switch-to-buffer (other-buffer (current-buffer) 1)))

;; TeX
;; Configuracao de teclado
;; traducao automatica de acentos p/ LaTeX
(require 'iso-cvt)
;; TeX
(load "auctex.el" nil t t)
(load "preview-latex.el" nil t t)
;;; AUCTeX
(setq TeX-auto-save t) ; Enable parse on save
(setq TeX-parse-self t) ; Enable parse on load
;; (setq-default TeX-master nil) ; multi-document structure
(setq TeX-PDF-mode t) ; pdflatex default
(add-hook 'LaTeX-mode-hook 'LaTeX-math-mode) ; enable math mode default
;; (setq-default TeX-master "master") ; All master files called "master"
(setq TeX-view-program-list '(("Acrobat Reader" "acroread %o")))
(setq TeX-view-program-selection '((output-pdf "Acrobat Reader")))
;; ;; latexmk
(add-hook 'LaTeX-mode-hook (lambda ()
(push
'("Latexmk" "latexmk -pdf %(mode) %s" TeX-run-command nil t
:help "Run Latexmk on file")
TeX-command-list)))

;; beamer frames
(require 'latex-frame-mode)

;; C mode
(add-hook 'c-mode-common-hook
(lambda () (define-key c-mode-base-map (kbd "C-c C-l") 'compile)))
;; (c-mode . "gcc -02 -Wall -o %n %f")
;; (c-mode . "gcc -O2 -Wall -o %n %f")
;; Java mode
;; ("\\.java$" . "javac %f")
;; Protégé and Jess
;; Jess mode
;; where jess-mode is
;; (setq load-path
;; (cons "/usr/share/emacs/site-lisp" load-path))
;; "auto load" the functions jess-mode and run-jess
(autoload 'jess-mode "jess-mode" "Jess Editing Mode" t nil)
;; jess-mode font lock
(add-hook 'jess-mode-hook #'(lambda()
(turn-on-font-lock)))
;; start 'jess-mode' whenever you visit a Jess source file:
(setq auto-mode-alist
(append auto-mode-alist '(("\\.clp$" . jess-mode))))
;; running a Jess Process Within Emacs
;; jess via a shell script, do something like
(add-hook 'inferior-jess-load-hook #'(lambda ()
(setq inferior-jess-program "/usr/local/bin/jess.sh")))

;; ARDUINO MODE
(setq auto-mode-alist (cons '("\\.\\(pde\\|ino\\)$" . arduino-mode) auto-mode-alist))
(autoload 'arduino-mode "arduino-mode" "Major mode for editing Arduino." t)

;; SML/NJ MODE
;; path names will probably need to be changed
;; (setq load-path (cons "c:/.emacs.d/sml" load-path))
;; (setq sml-mode-info "c:/.emacs.d/sml/sml-mode")
(setq load-path (cons "~/.emacs.d/sml" load-path))
(setq sml-mode-info "~/.emacs.d/sml/sml-mode")
;; load sml-mode setup code
(load "/usr/share/emacs/site-lisp/sml-mode/sml-mode-startup")
(setq sml-mode-info "/usr/info/sml-mode")
(autoload 'sml-mode "sml-mode" "Major mode for editing ML programs." t)
(autoload 'sml "sml-proc" "Run an inferior ML process." t)
(autoload 'cpn-mode "cpn-mode" "CPN-ML interface" t)
(setq auto-mode-alist
(append '(("\\.sig$" . sml-mode)
("\\.cml$" . sml-mode)
("\\.sml$" . sml-mode)) auto-mode-alist))
(setq sml-load-hook
'(lambda() "Highlights." (require 'sml-hilite)))

;; SVN
(require 'psvn)

;; MATLAB mode
;; Replace path below to be where your matlab.el file is.
;; Add matlab location
(add-to-list 'load-path "/opt/matlab/bin")
;; Replace path below to be where your matlab.el file is.
;; (add-to-list 'load-path "/usr/share/emacs/site-lisp/matlab-emacs")
(add-to-list 'load-path "/usr/share/emacs/site-lisp/emacs-goodies-el")
;; (require 'matlab-load)
(autoload 'matlab-mode "matlab" "Enter MATLAB mode." t)
(setq auto-mode-alist
(cons '("\\.m\\'" . matlab-mode) auto-mode-alist))
(autoload 'matlab-shell "matlab" "Interactive MATLAB mode." t)
;; Turn off Matlab desktop
(setq matlab-shell-command-switches '("-nodesktop -nojvm"))
;; User Level customizations (You need not use them all):
(setq matlab-indent-function-body t) ; if you want function bodies indented
(setq matlab-verify-on-save-flag nil) ; turn off auto-verify on save
(defun my-matlab-mode-hook ()
(setq fill-column 76)) ; where auto-fill should wrap
(add-hook 'matlab-mode-hook 'my-matlab-mode-hook)
(defun my-matlab-shell-mode-hook ()
'())
(add-hook 'matlab-shell-mode-hook 'my-matlab-shell-mode-hook)
;; Enable CEDET feature support for MATLAB code. (Optional)
;; (matlab-cedet-setup)

;; (autoload 'tlc-mode "tlc" "tlc Editing Mode" t)
(add-to-list 'auto-mode-alist '("\\.tlc$" . tlc-mode))
(setq tlc-indent-function t)

;;; octave setup
;;; octave
;;; NEW
;; (autoload 'octave-mode "octave-mod" nil t)
;; (add-to-list 'auto-mode-alist '("\\.m\\'" . octave-mode))
;; ;;(setq auto-mode-alist
;; ;; (cons '("\\.m$" . octave-mode) auto-mode-alist))
;; (add-hook 'octave-mode-hook
;; (lambda ()
;; (abbrev-mode 1)
;; (auto-fill-mode 1)
;; (if (eq window-system 'x)
;; (font-lock-mode 1))))
;; (setq octave-help-files '("octave" "octave-LG"))
;; (add-hook 'inferior-octave-mode-hook
;; (lambda ()
;; (turn-on-font-lock)
;; (define-key inferior-octave-mode-map [up]
;; 'comint-previous-input)
;; (define-key inferior-octave-mode-map [down]
;; 'comint-next-input)))
;; (setq octave-auto-indent t)
;; (setq octave-auto-newline t)
;; (setq octave-send-echo-input t)
;; (setq octave-send-line-auto-forward t)
;; (autoload 'octave-help "octave-hlp" nil t)
;; (setq octave-send-echo-input t)

;; if `gnuserv' is installed, add the lines
;; (server-start)
;; (require 'gnuserv)
;; (gnuserv-start)

;; SLIME
;; SLIME setup
(setq inferior-lisp-program "/opt/cmucl/bin/lisp")
(add-to-list 'load-path "/usr/share/emacs/site-lisp/slime/")
(require 'slime)
(require 'slime-autoloads)
(add-hook 'lisp-mode-hook
(lambda ()
(slime-mode t)))
(add-hook 'inferior-lisp-mode-hook
(lambda ()
(inferior-slime-mode t)))

;; SQL Mode
(require 'sql)
(autoload 'sql-mode "sql-mode" "SQL Editing Mode" t)
(setq auto-mode-alist
(append '(("\\.sql$" . sql-mode)
("\\.tbl$" . sql-mode)
("\\.sp$" . sql-mode))
auto-mode-alist))
;; ignore user data
;; (defalias 'sql-get-login 'ignore)
;; save SQL history in ~/.emacs.d/sql/
(defun my-sql-save-history-hook ()
(let ((lval 'sql-input-ring-file-name)
(rval 'sql-product))
(if (symbol-value rval)
(let ((filename
(concat "~/.emacs.d/sql/"
(symbol-name (symbol-value rval))
"-history.sql")))
(set (make-local-variable lval) filename))
(error
(format "SQL history will not be saved because %s is nil"
(symbol-name rval))))))
(add-hook 'sql-interactive-mode-hook 'my-sql-save-history-hook)
;; just make db output look nice
(defun sql-add-newline-first (output)
"Add newline to beginning of OUTPUT for `comint-preoutput-filter-functions'"
(concat "\n" output))
(defun sqli-add-hooks ()
"Add hooks to `sql-interactive-mode-hook'."
(add-hook 'comint-preoutput-filter-functions
'sql-add-newline-first))
(add-hook 'sql-interactive-mode-hook 'sqli-add-hooks)

;; perl mode
;; Use cperl-mode instead of the default perl-mode
(add-to-list 'auto-mode-alist '("\\.\\([pP][Llm]\\|al\\)\\'" . cperl-mode))
(add-to-list 'interpreter-mode-alist '("perl" . cperl-mode))
(add-to-list 'interpreter-mode-alist '("perl5" . cperl-mode))
(add-to-list 'interpreter-mode-alist '("miniperl" . cperl-mode))
(add-hook 'cperl-mode-hook 'n-cperl-mode-hook t)
(defun n-cperl-mode-hook ()
(setq cperl-indent-level 4)
(setq cperl-continued-statement-offset 0)
(setq cperl-extra-newline-before-brace t)
(set-face-background 'cperl-array-face "wheat")
(set-face-background 'cperl-hash-face "wheat")
)
(setq indent-line-function 'indent-relative-maybe)
(setq standard-indent 2)

;; GAMS
;; This is a "~/.emacs.el" sample for gams.el
;;
;; First-written: <2001/08/13>
;; Time-stamp: <2010-10-17 23:05:56 >
;;
;; This file is created for gams.el version 3.5.
;;
;; Copy and paste the content of this file into "~/.emacs.el" file.
;;
;; You can see the detailed explanation of each variable with
;; M-x describe-variable.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Necessary settings.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; The following settings are necessary to use GAMS mode.
;; Load path setting. Suppose that c:/home/gams is a directory in which gams.el
;; is installed. Then you should add the following.
(add-to-list
'load-path
;; Please change the directory name according to your environment.
"/usr/share/emacs/site-lisp/gams-4.1"
)
;; By default, GAMS mode will automatically start only when you open a file with
;; an extension `gms'. If you want to add files with another extensions (for
;; example, `dat'), you need to set the following. NB: This setting must be
;; placed before (require 'gams) below.
(setq gams-file-extension '("gms" "dat"))
;; If you are an experienced user of Emacs, you may prefer the following
;; `auto-mode-alist' and `autoload' instead of (require 'gams).
;;
;; Add gms and lst files to auto-mode-alist.
; (setq auto-mode-alist
; (cons (cons "\\.\\(GMS\\|gms\\|DAT\\|dat\\)$" 'gams-mode) auto-mode-alist))
; (setq auto-mode-alist
; (cons (cons "\\.\\(LST\\|lst\\)$" 'gams-lst-mode) auto-mode-alist))
;; autoload setting.
; (autoload 'gams-mode "gams" "Enter GAMS mode" t)
; (autoload 'gams-lst-mode "gams" "Enter GAMS-LST mode" t)
;; The place of GAMS program.
;;
;; If you do not include GAMS system directory in your PATH environmental
;; variable, specify the place of gams program like
(setq gams:process-command-name "/opt/gams/gams")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Important settings.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; The following settings are not necessarily required, but they decide the
;; important behavior of GAMS mode.
;;
;; Log file. If non-nil, GAMS log (the content of process buffer) is written
;; down to log file even without lo=2 option.
(setq gams-process-log-to-file t)
; The extension of GAMS log file
(setq gams-log-file-extension "glg")
;; Template file name for GAMS-TEMPLATE.
;;
; A sample template file "gams-template.txt" is distributed with this file. If
; you want to try a sample file, you must save it in your HOME directory. Or
; you should specify the explicit name of your template file name like
;;
(setq gams-template-file "~/gams-template.txt")
;; Command line options passed to gams. The default value is
(setq gams:process-command-option "ll=0 lo=3 pw=100 ps=9999")
;;
;; Notice: If you are a NTEmacs user, you should include lo=3 option!!!
;; GAMS system directory. The directory where gams.exe exists. This is
;; necessary for `gams-model-library' and `gams-view-docs' command.
(setq gams-system-directory "/opt/gams/")
;; Use upper case or lower case for GAMS statements and dollar control options?
(setq gams-statement-upcase t) ; Use upper case for GAMS statements
(setq gams-dollar-control-upcase t) ; Use upper case for dollar operations.
;; Use MPSGE?
(setq gams-use-mpsge t) ; Yes (default)
; (setq gams-use-mpsge nil) ; No
;; Allow multiple GAMS processes?
; (setq gams-multi-process nil) ; No
(setq gams-multi-process t) ; Yes (default)
;; Initial values of statement and dollar control.
(setq gams-statement-name "parameter")
(setq gams-dollar-control-name "exit")
;; Re-coloring with recentering (C-l)?
(setq gams-recenter-font-lock t) ; Yes (default)
;; (setq gams-recenter-font-lock nil) ; No
;; The window height in the GAMS-OUTLINE mode.
;;
; This is the window height when two windows exist.
(setq gams-ol-height 4)
;;
;; This is the window height when three windows exist.
(setq gams-ol-height-two 20)
;; This is the window width of the GAMS-OUTLINE buffer.
(setq gams-ol-width 10)
;; The default display style in the GAMS-OUTLINE mode.
(setq gams-ol-display-style '(t t))
;; The default viewable items in the GAMS-OUTLINE mode.
(setq gams-ol-view-item
'(
("SUM" . t) ; SUMMARY
("VAR" . t) ; VAR
("EQU" . t) ; EQU
("PAR" . t) ; PARAMETER
("SET" . t) ; SET
("VRI" . t) ; VARIABLE. Not viewable by default.
("LOO" . t) ; LOOP
("OTH" . t) ; Other strings
("COM" . t) ; COMMENT
("INF" . t) ; E x e c u t i o n, C o m p i l a t i o n etc.
))
;; The default alist of viewable items.
;;
;; Each list consists of a pair of the item name and its flag
;;
;; ("ITEM_NAME" . flag)
;;
;; Non-nil (t) of the flag means the item is viewable by default. The order of
;; items in this alist has the meaning. Items are listed in the SELECT-ITEM
;; buffer according to this order. So, if you want to show COM on the top in the
;; SELECT-ITEM mode, you must write COM at the fisrt in this alist.
;; External program for GAMS-OUTLINE mode.
;;
;; The variables below matters only if you use the command
;; `gams-outline-external'. See the explanation of
;; `gams-outline-external'.
;;
;; If you use the C program (gamsolc.exe). and it is localted at the directory
;; "c:/home/gams"
;; (setq gams-ol-external-program "c:/home/gams/gamsolc.exe")
;;
;; If you use the Perl script gamsolperl.pl and it is located at the directory
;; "c:/home/gams" and perl.exe is localted at "c:/Perl/bin/"
;; (setq gams-ol-external-program "c:/home/gams/gamsperl.pl")
;; (setq gams-perl-command "c:/Perl/bin/perl.exe")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Other customizations.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; If you want to try the default values, please uncomment all the settings
;; below.
;; My comment template.
(setq gams-user-comment
"* ----------------------------------------------------------------------
* %
")
;; Close parenthesis and quotation?
;;
;; For example, if you want ) to be inserted automatically when you insert (,
;; then set t to `gams-close-paren-always'.
;;
;; (setq gams-close-paren-always nil) ; Not insert ) automatically.
(setq gams-close-paren-always t) ; Insert ) automatically (default)
;; (setq gams-close-double-quotation-always nil) ; No
(setq gams-close-single-quotation-always t) ; Yes
;; The default height of GAMS process buffer
(setq gams-default-pop-window-height 8) ; Default value is 10
;; Column number in GAMS mode.
(setq gams-fill-column 80)
;; Setting for viewing GAMS pdf documents.
;;
;; The GAMS document directory.
(setq gams-docs-directory "/opt/gams/docs")
;; By default, it is set to `gams-system-directory' + docs."
;;
;; The PDF file viewer.
(setq gams-docs-view-program "/opt/Adobe/Reader9/acroread")
;;; Setting for GAMS-TEMPLATE mode.
;;
;; Without a special reason, you had better set nil to the following variable.
;; (setq gams-save-template-change t) ; default is nil
;; Colorize the *Template Content* buffer in GAMS-TEMPLATE. nil makes
;; GAMS-TEMPLATE mode faster.
;;
(setq gams-template-cont-color t) ; Color (default)
;; (setq gams-template-cont-color nil) ; No color

;;; Setting for Automatic indentation.
;; Use automatic indent or not?
;; (setq gams-indent-on nil) ; No automatic indent.
(setq gams-indent-on t) ; Use automatic indent (default)
;; Column number for automatic indentation. All default values are 8.
;; Column number for normal lines.
(setq gams-indent-number 4)
;; Column number for lines in loop type enviroment (i.e, loop, if, while,
;; for etc.).
(setq gams-indent-number-loop 4)
;;
;; Column number for MPSGE block
(setq gams-indent-number-mpsge 4)
;;
;; Column number for equation definition.
(setq gams-indent-number-equation 4)
;; Indent equation blocks or not?
;;
;; For equation definition block
(setq gams-indent-equation-on t) ; Automatic indent (default)
;; (setq gams-indent-equation-on nil) ; No automatic indent
;; Use tabs for indent.
;;
;; Use only spaces for indent or allow tabs?
;; (setq indent-tabs-mode nil) ; Not use tabs for indent
(setq indent-tabs-mode t) ; Use tabs (default) fot indent
;;
;; To convert all tabs in region to multiple spaces, use M-x untabify.
;; Change the indentation style.
;;
;; If the `gams-indent-more-indent' is assigned non-nil value, the indentation
;; style is changed slightly.
(setq gams-indent-more-indent t) ; nil is default.
;; Insert dollar control options.
;;
;; Use $ key for inserting dollar control options?
;;
;; t => $ key is binded to `gams-insert-dollar-control'.
;; nil => $ key is binded to inserting $ itself
;;
; (setq gams-insert-dollar-control-on nil) ; No (default)
(setq gams-insert-dollar-control-on t) ; Yes
;; The default font-lock (coloring) level.
;; 0 = No coloring
;; 1 = Minumun coloring
;; 2 = Maximum coloring
;; All default values are 2.
;;
(setq gams-font-lock-level 2) ; GAMS mode
(setq gams-lst-font-lock-level 2) ; GAMS-LST mode
(setq gams-ol-font-lock-level 2) ; GAMS-OUTLINE mode.
;; Default inline and end-of-line comment symbols.
(setq gams-inlinecom-symbol-start-default "/*") ; default
(setq gams-inlinecom-symbol-end-default "*/") ; default
(setq gams-eolcom-symbol-default "#") ; default
;; Popup the GAMS process buffer?
;; When you run GAMS, the process buffer popups by default.
(setq gams-always-popup-process-buffer t) ; Popup (default)
;; (setq gams-always-popup-process-buffer nil) ; Not popup.
;; Search identifier definition in included files?
;;; Setting for GAMS-LXI mode.
;; (setq gams-lxi-command-name "c:/home/lisp/gamslxi.exe")
;; (setq gams-lxi-import-command-name "c:/home/lisp/gamslxi-import.exe")
;; Hook settings. For example,
;; (add-hook 'gams-mode-hook
;; '(lambda ()
;; (let ((map gams-mode-map))
;; ;; Bind indent-line to F2.
;; (define-key map [f2] 'gams-indent-line)
;; ;; Bind inserting TAB to TAB key.
;; (define-key map "\t" 'gams-insert-tab)
;; ;; Bind inserting GAMS statement to C-ca.
;; (define-key gams-mode-map "\C-ca" 'gams-insert-statement))
;; ))
;; (add-hook 'gams-lst-mode-hook
;; '(lambda ()
;; ;; a = widen the window.
;; (define-key gams-lst-mode-map "a" 'gams-lst-kill-buffer)
;; ))
;; (add-hook 'gams-ol-mode-hook
;; '(lambda ()
;; (font-lock-mode t)
;; (define-key gams-ol-mode-map "a" 'delete-other-windows)
;; (define-key gams-ol-mode-map [down] 'gams-ol-view-next)
;; (define-key gams-ol-mode-map [up] 'gams-ol-view-prev)
;; ))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Other configuration for Emacs.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; The configurations below change the behavior of Emacs in general.
;;
;;; Shell setting.
;; If you use cygwin bash.exe as the shell (and install it in "c:/cygwin/bin/")
;; File name to load inferior shells from.
;; (setq shell-file-name "c:/cygwin/bin/bash.exe")
;; explicit-shell-file-name.
;; (setq explicit-shell-file-name "c:/cygwin/bin/bash.exe")
;; (modify-coding-system-alist 'process ".*sh//exe" 'undecided-unix)
;; (setq shell-command-option "-c")
;; Completion with shell-mode
;; Get rid of ^M in shell mode.
;; (setq shell-file-name-chars "~/A-Za-z0-9_^$!#%&{}@`'.,:()-")
;; If you use cmdproxy.exe as the shell. cmdproxy.exe is placed at the
;; same directory as runemacs.exe.
;; (setq shell-file-name "c:/Emacs/bin/cmdproxy.exe")
;; (setq explicit-shell-file-name "c:/Emacs/bin/cmdproxy.exe")
;; (setq shell-command-option "/c")
;; (setq shell-file-name-chars "~/A-Za-z0-9_^$!#%&{}@`'.,:()-")
;; (setq w32-quote-process-args t)
;; (setq w32-start-process-show-window nil)
;;; Font lock.
(when (and window-system (not (featurep 'font-lock)))
(require 'font-lock)
(if (featurep 'xemacs)
(font-lock-mode 1)
(global-font-lock-mode t)))
;;; font-lock-support-mode (See BUGS_PROBLEMS.txt for the details)
;; The default setting for font-lock-support-mode in Emacs 21-23 is
;; `jit-lock-mode'. But `jit-lock-mode' often interferes with GAMS mode. To
;; resolve this problem, you had better set a large value to
;; `jit-lock-chunk-size' (its default value is 500).
;;
(setq jit-lock-chunk-size 50000)

;; Load the program file `gams.el'.
(require 'gams)
;; NB: If you use this (require 'gams), you had better put this at the end
;; of all configurations about gams.el. Because of the bug, the
;; configurations after (require 'gams) may not come into effect.

;; simple icicle
;;; buffcycle.el --- Buffer cycling for Emacs
;; Copyright (C) 2011 Dmitry Geurkov
;; Author: Dmitry Geurkov <***@mail.ru>
;; This program is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
;; Commentary:
;; Simple Buffer cycling for Emacs between file buffers only using C-tab
;; and killing buffer using C-q
;; To use add
;; (require 'buffcycle)
;; to your .emacs
;; Buffer Cycling
(defvar *buffcycle-ibuffer-time* 0.5)
(defvar *buffcycle-last-time* (float-time))
(defun next-buffer-cycle()
(interactive)
(let ((cur-buffer (buffer-name))
(time-diff 0.0))
(progn (setq time-diff (- (float-time) *buffcycle-last-time*))
(if (>= *buffcycle-ibuffer-time* time-diff)
(progn (setq *buffcycle-last-time* (float-time))
(ibuffer)))
(next-buffer)
(while (and (booleanp (buffer-file-name)) (not (string= (buffer-name) cur-buffer)))
(next-buffer))
(setq *buffcycle-last-time* (float-time))
(if (string= cur-buffer (buffer-name))
(ibuffer)))))
(defun kill-this-buffer-if-not-scratch()
(interactive)
(if (window-dedicated-p (selected-window))
(message "this is dedicated window")
(if (not (string= (buffer-name) "*scratch*"))
(kill-this-buffer)
(message "this is scratch unkillable"))))
;; Buffer Cycling keybindings
(global-set-key (kbd "<C-tab>") 'next-buffer-cycle)
(global-set-key (kbd "C-q") 'kill-this-buffer-if-not-scratch)
(provide 'buffcycle)
(require 'buffcycle)
;;; Emacs/W3 Configuration
(setq load-path (cons "/usr/share/emacs/site-lisp" load-path))
(condition-case ()
(require 'w3-auto "w3-auto") (error nil))
; --------------------
(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.
'(ede-project-directories (quote ("/home/andreltr"))))
(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.
)
; Local Variables:
; mode: emacs-lisp
; fill-column: 60
; End:

---------------------------- .bashrc ------------------------------------

# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples

# If not running interactively, don't do anything
[ -z "$PS1" ] && return

# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace

# append to the history file, don't overwrite it
shopt -s histappend

# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTFILESIZE=2000

# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize

# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"

# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi

# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
xterm-color) color_prompt=yes;;
esac

# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
#force_color_prompt=yes

if [ -n "$force_color_prompt" ]; then
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
# We have color support; assume it's compliant with Ecma-48
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
# a case would tend to support setf rather than setaf.)
color_prompt=yes
else
color_prompt=
fi
fi

if [ "$color_prompt" = yes ]; then
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
unset color_prompt force_color_prompt

# If this is an xterm set the title to ***@host:dir
case "$TERM" in
xterm*|rxvt*)
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
;;
*)
;;
esac

# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
#alias dir='dir --color=auto'
#alias vdir='vdir --color=auto'

alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi

# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'

# Add an "alert" alias for long running commands. Use like so:
# sleep 10; alert
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'

# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.

if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi

# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
. /etc/bash_completion
fi

export EDITOR=emacs

PATH=$PATH:/opt/gams:/opt/cmucl/bin:/opt/MagicDraw_UML/bin:/opt/CPNTools:/opt/Protege:/opt/bin:/opt/android-sdk:/opt/android-sdk/tools:/opt/android-sdk/platform-tools:/opt/smlnj:/opt/smlnj/bin:/opt/smlnj/lib
export PATH

# for frepple
export PATH=/usr/share/xerces-c-3.1.1-x86_64-linux-gcc-3.4:$PATH
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH

CLASSPATH=$CLASSPATH:/usr/local/lib/postgres/postgresql-8.4-703.jdbc4.jar:/opt/jade/lib/jade.jar:/opt/jade/lib/commons-codec/commons-codec-1.3.jar:/opt/jade/:/opt/jade/lib/:/opt/jade/lib/jadeTools.jar:/opt/jade/lib/Base64.jar:/opt/jade/lib/http.jar:/opt/Protege_4.1/plugins/beangenerator_4.1.jar:/opt/Protege_4.2_beta/plugins/beangenerator.jar:/opt/JSDAI_Standalone/JSDAI:/opt/JSDAI_Standalone/JSDAI/lib:/opt/jena/lib:/opt/jess:/opt/jess/jess.jar
export CLASSPATH

# /opt/jade/:/opt/jade/lib/:/opt/jade/lib/jadeTools.jar:/opt/jade/lib/Base64.jar:/opt/jade/lib/http.jar

export JAVA_HOME=/usr/lib/jvm/java-7-oracle
export JAVA=$JAVA_HOME:$JAVA
export PATH=$PATH:$JAVA_HOME/bin

PROTEGE_HOME=/opt/Protege_4.1
export PROTEGE_HOME

# JESS_HOME=/opt/Jess
JESS_HOME=/opt/jess
export JESS_HOME
export PATH=$PATH:$JESS_HOME

# MATLAB
export PATH=$PATH:/opt/matlab/bin

PYTHONPATH=$PYTHONPATH:/usr/share/python-support/python-simpy/SimPy
export PYTHONPATH

SVN_EDITOR=/usr/bin/emacs
export SVN_EDITOR

UGII_ROOT_DIR=/opt/ugs060
export UGII_ROOT_DIR
UGS_LICENSE_SERVER=/home/andreltr/CAD/UGS/nx6.lic
export UGS_LICENSE_SERVER

# Arduino
export ARDUINO_DIR=/usr/share/arduino
export ARDMK_DIR=/usr
export AVR_TOOLS_DIR=/usr

# devede and dvdauthor
VIDEO_FORMAT=PAL
export VIDEO_FORMAT
Alan Mackenzie
2013-05-19 11:35:32 UTC
Permalink
Post by AndreLTR
Hello,
All of a sudden, C-v and M-v no longer work. I've just a few changes
and cannot find where the actual error is. For instance, C-v makes
paste.
This suggests you've somehow got CUA mode key bindings mixed up in your
Emacs setup. Are you sure you were actually in Emacs when you tried C-v?
Post by AndreLTR
I use ubuntu 13.04. The .emacs and .bashrc are below. Any help
greatly appreciated.
I think your .emacs (and possibly .bashrc) are a bit big for searching
through. It might be more helpful if you could post the recent "few"
changes you've made (say, as a universal or context diff).
Post by AndreLTR
Sincerely,
Andre Luiz
--
Alan Mackenzie (Nuremberg, Germany).
Pedro Silva
2013-05-19 22:12:14 UTC
Permalink
Post by AndreLTR
Hello,
All of a sudden, C-v and M-v no longer work. I've just a few changes
and cannot find where the actual error is. For instance, C-v makes
paste. I use ubuntu 13.04. The .emacs and .bashrc are below. Any
help greatly appreciated.
[208 lines]
Post by AndreLTR
;; (setq cua-mode t)
[756 lines]

Did you evaluate this line at all? If you did, that would explain
it. Try restarting Emacs. If you don't know what CUA mode is, run M-x
describe-function cua-mode. If you want to see whether it is on, run M-x
describe-variable cua-mode.
--
Pedro
Loading...