From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Fred J." Newsgroups: gmane.emacs.help Subject: Re: unable to create a .cpp file Date: Thu, 20 Jul 2006 04:37:12 -0700 (PDT) Message-ID: <20060720113712.5236.qmail@web54614.mail.yahoo.com> References: <87hd1dj3db.fsf@hans.local.net> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1129500698==" X-Trace: sea.gmane.org 1153412890 30072 80.91.229.2 (20 Jul 2006 16:28:10 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 20 Jul 2006 16:28:10 +0000 (UTC) Cc: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jul 20 18:28:04 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1G3bNP-0003fG-2I for geh-help-gnu-emacs@m.gmane.org; Thu, 20 Jul 2006 18:27:53 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G3bNN-0003vY-16 for geh-help-gnu-emacs@m.gmane.org; Thu, 20 Jul 2006 12:27:49 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1G3WqG-0001Wb-51 for help-gnu-emacs@gnu.org; Thu, 20 Jul 2006 07:37:20 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1G3WqF-0001W9-2E for help-gnu-emacs@gnu.org; Thu, 20 Jul 2006 07:37:19 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G3WqE-0001W0-Ro for help-gnu-emacs@gnu.org; Thu, 20 Jul 2006 07:37:18 -0400 Original-Received: from [206.190.49.184] (helo=web54614.mail.yahoo.com) by monty-python.gnu.org with smtp (Exim 4.52) id 1G3WqN-0001dg-VL for help-gnu-emacs@gnu.org; Thu, 20 Jul 2006 07:37:28 -0400 Original-Received: (qmail 5240 invoked by uid 60001); 20 Jul 2006 11:37:12 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=lVK4VIMYwPTJhO6MwrTMqRroMcP75RujjdZrY0kD/waC4FZ1/X3es9BGzA0Mhyl+PDp/E4m3wBNLO0Jqt2+mWEAGqZpbYpJJK6iCtzmxSY7GtMMAQoeTmwK+YtqoVL6NPr+OOpkUDUUB1pEUfj3714/rG8ndnRJy5sEGh7k8VWI= ; Original-Received: from [58.178.94.147] by web54614.mail.yahoo.com via HTTP; Thu, 20 Jul 2006 04:37:12 PDT Original-To: Dieter Wilhelm In-Reply-To: <87hd1dj3db.fsf@hans.local.net> X-Mailman-Approved-At: Thu, 20 Jul 2006 12:27:34 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:36126 Archived-At: --===============1129500698== Content-Type: multipart/alternative; boundary="0-404973416-1153395432=:4965" Content-Transfer-Encoding: 8bit --0-404973416-1153395432=:4965 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Dieter Wilhelm wrote: Gary Wessle writes: > I deleted every thing in .emacs reloaded the file and the problem is > still there. Well, the presumably broken lisp definitions from the .emcas file then still persist in the computer memory, they aren't overwritten. > it is only when I delete .emacs from my home dir that the problem does > not duplicate. Without ~/.emacs it works? Why don't you show your complete .emacs file, maybe somebody sees immediately what's wrong with it (and has the time to help)? By the way, it would probably be best starting .emacs from scratch and using for that purpose the Emacs customisation facility. Have a look under the Options menu -> Customize Emacs. -- Best wishes Dieter Wilhelm Darmstadt, Germany it is only when I comment this section below that the problem does not duplicate, but then I loose the functionality it provides. this section here is copied from the .emacs file below for easy of illustration ;; uncomment this section to associate pdf and python files with modes ;; opens a a file 'pdf' with xpdf and so on... (require 'extview) (push '("\\.pdf$" . "xpdf %s") extview-application-associations) (push '("\\.py$" . nil) extview-application-associations) here is my .emacs ==================================== (load "~/.emacs-mc394") ;; makes relavent files executable (add-hook 'after-save-hook #'executable-make-buffer-file-executable-if-script-p) ;; hitting shift-f8 will save the current buffer with permission 700 (defun chmod-save () "Save and chmod 700 current buffer" (interactive) (save-buffer) (setq command (concat "chmod 700 " (buffer-file-name))) (message "%s " command) (shell-command command) ) (global-set-key [(shift f8)] 'chmod-save) ;; uncomment this section to associate pdf and python files with modes ;; opens a a file 'pdf' with xpdf and so on... (require 'extview) (push '("\\.pdf$" . "xpdf %s") extview-application-associations) (push '("\\.py$" . nil) extview-application-associations) (add-hook 'octave-mode-hook '(lambda () (local-set-key [f9] 'octave-send-line))) (add-hook 'c++-mode-hook '(lambda () (turn-on-auto-fill) ;;Insert a newline if line gets to long. (c-toggle-auto-state 1) ;;Make ; and { and } and : all electric (c-set-style "mc394-style"))) (add-hook 'c++-mode-hook 'setnu-mode) ;line numbers (add-hook 'c++-mode-hook 'bar-cursor-mode) ;cursor to a bar (add-hook 'c++-mode-hook 'show-paren-mode) ;marrying brackets show (add-hook 'comint-output-filter-functions ;R bottom the prompt 'comint-show-maximum-output nil t) (global-font-lock-mode 1) ;; ;; Color highlighting stuff ;; (defvar xemacs-p ;; (string-match "XEmacs" emacs-version)) ;; (if (not xemacs-p) ;; (progn ;; (global-font-lock-mode t) ;; ; If using global-font-lock-mode, make control-L update colors ;; (global-set-key "\C-l" ;; (function (lambda (arg) (interactive "P") ;; (font-lock-fontify-block 100) ;; (recenter arg)))))) ;; this is needed for semantic and ECB to work correctly (setq auto-mode-alist (append '( ("configure.in" . m4-mode) ("\\.m4$" . m4-mode) ("\\.am$" . makefile-mode) ("\\.cpp$" . c++-mode) ("\\.h$" . c++-mode) ("\\.py$" . python-mode)) auto-mode-alist)) (defun other-window-backward (&optional n) "Select Nth previous window" (interactive "P") (other-window (- (prefix-numeric-value n)))) (global-set-key "\C-x\C-p" 'other-window-backward) (windmove-default-keybindings) (global-set-key [f6] 'setnu-mode) ;set-number use twice after C-y (global-set-key "\C-x\C-b" 'buffer-menu) ;binds the key C-x C-b to buffer-menu (global-set-key [f7] (kbd "M-h M-;")) ;comment region (global-set-key [f11] 'compile) ;compiles a program (global-set-key [f12] 'clipboard-kill-ring-save);copy marked region to Primary Selection, M-w copies to Clipboard, middle mouse botton to paste Primary, M-y pastes the clipboard contents (global-set-key [f10] 'cut-ctrlM) ; cut all ^M. (defun cut-ctrlM () "Cut all visible ^M." (interactive) (beginning-of-buffer) (while (search-forward "\r" nil t) (replace-match "" nil t)) ) (global-set-key "\C-cw" "\M-b\C-@\M-f\M-w") ;copy word under point (global-set-key "\C-cl" "\C-a\C-@\C-e\M-w") ;copy line under point (global-set-key "\C-cs" "\M-a\C-@\M-e\M-w") ;copy sentence under point (global-set-key "\C-cp" "\M-h\C-f\M-w") ;copy paragraph under point (setq ecb-auto-activate t) (setq user-full-name "Gary Wessle") (setq user-mail-address "phddas@yahoo.com") (setq fill-column 70) ;Text lines limited to 70 chars (setq make-backup-files nil) ;don't make backup files (setq kill-whole-line t) ;killing line also deletes \n (setq next-line-add-newlines nil) ;down arror won't add \n at end (setq line-number-mode t) ;put line number in display (setq column-number-mode t) ;put column number in display (setq inhibit-startup-message t) ;disable startup message (setq display-time-24hr-format t) ;display 24h time formate (setq transient-mark-mode t) ;highlight marked (setq default-major-mode 'text-mode) ;new buffers are text mode (add-hook 'text-mode-hook 'turn-on-auto-fill) ;line limit in text mode (add-hook 'text-mode-hook 'flyspell-mode t) ; check spelling (add-hook 'text-mode-hook 'text-mode-hook-identify) (add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on);ls not show ^[[0m (display-time) ;time on line-mode (tool-bar-mode 0) ; turn-off tool-bar (menu-bar-mode 0) ; turn-off tool-bar (scroll-bar-mode -1) ; turn-off scroll bar (setq-default visible-bell t) ; no beeps, flash on errors ;; don't show password (add-hook 'comint-output-filter-functions 'comint-watch-for-password-prompt) ;; makes a vertical split along the horisontal line (defun htv-horizontal-to-vertical () (interactive) (let ((one-buf (window-buffer (selected-window))) (buf-point (point))) (other-window 1) (delete-other-windows) (split-window-horizontally) (switch-to-buffer one-buf) (goto-char buf-point))) ;; makes a vertical split along the horisontal line (defun vth-vertical-to-horizontal () (interactive) (let ((one-buf (window-buffer (selected-window))) (buf-point (point))) (other-window 1) (delete-other-windows) (split-window-vertically) (switch-to-buffer one-buf) (goto-char buf-point))) ;; remove comments lines from region (defun nea-kill-all-comments-in-region (begin end) "Kill all comments in region." (interactive "r") (save-excursion (goto-char begin) (kill-comment (count-lines begin end)))) ;; remove comments lines from buffer (defun nea-kill-all-comments-in-buffer () "Kill all comments in buffer." (interactive) (save-excursion (beginning-of-buffer) (kill-comment (count-lines (point-min) (point-max))))) (require 'xcscope) ;"$man cscope" for more info (custom-set-variables ;; custom-set-variables was added by Custom -- don't edit or cut/paste it! ;; Your init file should contain only one such instance. '(ecb-methods-nodes-expand-spec (quote all)) '(ecb-options-version "2.27")) (custom-set-faces ;; custom-set-faces was added by Custom -- don't edit or cut/paste it! ;; Your init file should contain only one such instance. '(default ((t (:stipple nil :background "black" :foreground "white" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 123 :width normal :family "adobe-courier")))) '(comint-highlight-input ((t (:background "black" :weight bold)))) '(cursor ((t (:background "yellow")))) '(mouse ((t (:background "yellow"))))) (put 'erase-buffer 'disabled nil) here is my .emcas-mc394 ===================================== ;; Modified by Mike Hvidsten from MC38J emacs file ;; Feb. 4, 2004 (c-add-style "mc394-style" '("cc-mode" (c-basic-offset . 3) ; In general, indent 3 spaces (c-hanging-braces-alist (defun-open after)) ; brace that opens a function definition (c-cleanup-list brace-else-brace brace-elseif-brace empty-defun-braces defun-close-semi scope-operator) (c-hanging-braces-alist ; These determine whether a newline appears before ; and/or after a brace in various situations. (brace-list-open) (block-open after) ; statement block open brace (defun-open after) ; brace that opens a function definition (substatement-open after); the brace that opens a substatement block (block-close . c-snug-do-while)) (c-hanging-colons-alist (access-label after)) ; Newline after protected: or private: (c-hungry-delete-key t))) ; delete black space all at once ;; Variable should be t if we are running xemacs. (defvar xemacs-p (string-match "XEmacs" emacs-version)) (if (not xemacs-p) (progn (global-font-lock-mode t) ; If using global-font-lock-mode, make control-L update colors (global-set-key "\C-l" (function (lambda (arg) (interactive "P") (font-lock-fontify-block 100) (recenter arg)))))) (setq auto-mode-alist (append '(("\\.h$" . c++-mode)) auto-mode-alist)) --------------------------------- Do you Yahoo!? Get on board. You're invited to try the new Yahoo! Mail Beta. --0-404973416-1153395432=:4965 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit

Dieter Wilhelm <dieter@duenenhof-wilhelm.de> wrote:
Gary Wessle writes:

> I deleted every thing in .emacs reloaded the file and the problem is
> still there.

Well, the presumably broken lisp definitions from the .emcas file then
still persist in the computer memory, they aren't overwritten.

> it is only when I delete .emacs from my home dir that the problem does
> not duplicate.

Without ~/.emacs it works? Why don't you show your complete .emacs
file, maybe somebody sees immediately what's wrong with it (and has
the time to help)?

By the way, it would probably be best starting .emacs from scratch and
using for that purpose the Emacs customisation facility. Have a look
under the Options menu -> Customize Emacs.

--
Best wishes

Dieter Wilhelm
Darmstadt, Germany
it is only when I comment this section below that the problem does not duplicate, but then I loose the functionality it provides.
this section here is copied from the .emacs file below for easy of illustration
;; uncomment this section to associate pdf and python files with modes
;; opens a a file 'pdf' with xpdf and so on...
(require 'extview)
(push '("\\.pdf$" . "xpdf %s") extview-application-associations)
(push '("\\.py$" . nil) extview-application-associations)



here is  my .emacs
====================================
(load "~/.emacs-mc394")

;; makes relavent files executable
(add-hook 'after-save-hook
       #'executable-make-buffer-file-executable-if-script-p)

;; hitting shift-f8 will save the current buffer with permission 700
(defun chmod-save ()
  "Save and chmod 700 current buffer"
  (interactive)
  (save-buffer)
  (setq command (concat "chmod 700 " (buffer-file-name)))
  (message "%s " command)
  (shell-command command)
  )
(global-set-key [(shift f8)] 'chmod-save)

;; uncomment this section to associate pdf and python files with modes
;; opens a a file 'pdf' with xpdf and so on...
(require 'extview)
(push '("\\.pdf$" . "xpdf %s") extview-application-associations)
(push '("\\.py$" . nil) extview-application-associations)

(add-hook 'octave-mode-hook
          '(lambda ()
             (local-set-key [f9] 'octave-send-line)))

(add-hook 'c++-mode-hook
          '(lambda ()
      &n bsp;      (turn-on-auto-fill) ;;Insert a newline if line gets to long.
             (c-toggle-auto-state 1) ;;Make ; and { and } and : all electric
             (c-set-style "mc394-style")))

(add-hook 'c++-mode-hook 'setnu-mode)   ;line numbers
(add-hook 'c++-mode-hook 'bar-cursor-mode) ;cursor to a bar
(add-hook 'c++-mode-hook 'show-paren-mode) ;marrying brackets show


(add-hook 'comint-output-filter-functions ;R bottom the prompt
       'comint-show-maximum-output nil t)

(global-font-lock-mode 1)


;; ;; Color highlighting stuff
;; (defvar xemacs-p
;;   (string-match "XEmacs" emacs-version))
;; (if (not xemacs-p)
;;     (progn
;;       (global-font-lock-mode t)
;; ; If using global-font-lock-mode, make control-L update colors
;;       (global-set-key "\C-l"
;;                       (function (lambda (arg) (interactive "P")
;;                                   (font-lock-fontify-block 100)
;;                                   (recenter arg))))))

;; this is needed for semantic and ECB to work correctly
(setq auto-mode-alist
  (append '(
    ("configure.in" . m4-mode)
  &nb sp; ("\\.m4$" . m4-mode)
    ("\\.am$" . makefile-mode)
    ("\\.cpp$" . c++-mode)
    ("\\.h$" . c++-mode)
    ("\\.py$" . python-mode))
   auto-mode-alist))


(defun other-window-backward (&optional n)
    "Select Nth previous window"
    (interactive "P")
    (other-window (- (prefix-numeric-value n))))
(global-set-key "\C-x\C-p" 'other-window-backward)

(windmove-default-keybindings)


(global-set-key [f6] 'setnu-mode)      ;set-number use twice after C-y
(global-set-key "\C-x\C-b" 'buffer-menu) ;binds the key C-x C-b to buffer-menu
(global-set-key [f7] (kbd "M-h M-;")) ;comment region
(global-set-key [f11] 'compile)         ;compiles a program
(global-set-key [f12] 'clipboard-kill-ring-save);copy marked region to Primary Selection, M-w copies to Clipboard, middle mouse botton to paste Primary, M-y pastes the clipboard contents

(global-set-key [f10]      'cut-ctrlM)   ; cut all ^M.
(defun cut-ctrlM () 
  "Cut all visible ^M."
  (interactive)
  (beginning-of-buffer)
  (while (search-forward "\r" nil t)
    (replace-match "" nil t))
  )

(global-set-key "\C-cw" "\M-b\C-@\M-f\M-w") ;copy word under point
(global-set-key "\C-cl" "\C-a\C-@\C-e\M-w") ;copy line under point
(global-set-key "\C-cs" "\M-a\C-@\M-e\M-w") ;copy sentence under point
(global-set-key "\C-cp" "\M-h\C-f\M-w")     ;copy paragraph under point

(setq ecb-auto-activate t)
(setq user-full-name "Gary Wessle")
(setq user-mail-address "phddas@yahoo.com")
(setq fill-column 70)            & nbsp;     ;Text lines limited to 70 chars
(setq make-backup-files nil)           ;don't make backup files
(setq kill-whole-line t)               ;killing line also deletes \n
(setq next-line-add-newlines nil)      ;down arror won't add \n at end
(setq line-number-mode t)              ;put line number in display
(setq column-number-mode t)            ;put column number in display
(setq inhibit-startup-message t)       ;disable startup message
(setq display-time-24hr-format t)      ;display 24h time formate
(setq transient-mark-mode t)           ;highlight marked
(se tq default-major-mode 'text-mode)   ;new buffers are text mode
(add-hook 'text-mode-hook 'turn-on-auto-fill) ;line limit in text mode
(add-hook 'text-mode-hook 'flyspell-mode t) ; check spelling
(add-hook 'text-mode-hook 'text-mode-hook-identify)
(add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on);ls not show ^[[0m
(display-time)                    ;time on line-mode
(tool-bar-mode 0)               ; turn-off tool-bar
(menu-bar-mode 0)               ; turn-off tool-bar
(scroll-bar-mode -1)                  ; turn-off scroll bar
(setq-default visible-bell t)          ; n o beeps, flash on errors


;; don't show password
(add-hook 'comint-output-filter-functions
'comint-watch-for-password-prompt)

;; makes a vertical split along the horisontal line
(defun htv-horizontal-to-vertical ()
  (interactive)
  (let ((one-buf (window-buffer (selected-window)))
        (buf-point (point)))
    (other-window 1)
    (delete-other-windows)
    (split-window-horizontally)
    (switch-to-buffer one-buf)
    (goto-char buf-point)))

;; makes a vertical split along the horisontal line
(defun vth-vertical-to-horizontal ()
  (interactive)
  (let ((one-buf (window-buffer (selected-window)))
        (buf-point (point)))
    (other-window 1)
    (delete-other-windows)
  & nbsp; (split-window-vertically)
    (switch-to-buffer one-buf)
    (goto-char buf-point)))

;; remove comments lines from region
(defun nea-kill-all-comments-in-region (begin end)
       "Kill all comments in region."
       (interactive "r")
       (save-excursion
      (goto-char begin)
       (kill-comment (count-lines begin end))))

;; remove comments lines from buffer
(defun nea-kill-all-comments-in-buffer ()
       "Kill all comments in buffer."
       (interactive)
       (save-excursion
      (beginning-of-buffer)
      (kill-comment
     (count-lines (point-min) ( point-max)))))   


(require 'xcscope) ;"$man cscope" for more info
(custom-set-variables
  ;; custom-set-variables was added by Custom -- don't edit or cut/paste it!
  ;; Your init file should contain only one such instance.
 '(ecb-methods-nodes-expand-spec (quote all))
 '(ecb-options-version "2.27"))


(custom-set-faces
  ;; custom-set-faces was added by Custom -- don't edit or cut/paste it!
  ;; Your init file should contain only one such instance.
 '(default ((t (:stipple nil :background "black" :foreground "white" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 123 :width normal :family "adobe-courier"))))
 '(comint-highlight-input ((t (:background "black" :weight bold))))
 '(cursor ((t (:background "yellow"))))
 '(mouse ((t (:background "yellow")))))

(put 'erase-buffer 'disabled n il)


here is my .emcas-mc394
=====================================
;; Modified by Mike Hvidsten from MC38J emacs file
;;  Feb. 4, 2004

(c-add-style "mc394-style"
             '("cc-mode"
               (c-basic-offset . 3)      ; In general, indent 3 spaces
               (c-hanging-braces-alist
                (defun-open after))      ; brace that opens a function definition
               (c-cleanup-list brace-else-brace
                                brace-elseif-brace
                               empty-defun-braces
                               defun-close-semi
                               scope-operator)
               (c-hanging-braces-alist
                ; These determine whether a newline appears before
  &nbs p;             ; and/or after a brace in various situations.
                (brace-list-open)
                (block-open after)       ; statement block open brace
                (defun-open after)       ; brace that opens a function definition
                (substatement-open after); the brace that opens a substatement block
                (block-close . c-snug-do-while))
               (c-hanging-colons-alist
                (access-label after)) ; Newline after protected: or private:
               (c-hungry-delete-key t))) ; delete black space all at once

;; Variable should be t if we are running xemacs.
(defvar xemacs-p
  (string-match "XEmacs" emacs-version))

(if (not xemacs-p)
    (progn
      (global-font-lock-mode t)
       ; If using global-font-lock-mode, make control-L update colors
      (global-set-key "\C-l"
                      (function (lambda (arg) (interactive "P")
                                  (font-lock-fontify-block 100)
                                  (recenter arg))))))
(setq auto-mode-alist (append '(("\\.h$" . c++-mode)) auto-mode-alist))


Do you Yahoo!?
Get on board. You're invited to try the new Yahoo! Mail Beta. --0-404973416-1153395432=:4965-- --===============1129500698== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ help-gnu-emacs mailing list help-gnu-emacs@gnu.org http://lists.gnu.org/mailman/listinfo/help-gnu-emacs --===============1129500698==--