[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

"Args out of range:" error when opening existing files

From: Joseph Shraibman
Subject: "Args out of range:" error when opening existing files
Date: Tue, 08 Oct 2002 23:46:45 -0000
User-agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (Linux/2.2.18 (i686))

I keep getting errors like this when opening existing files:

Args out of range: "/etc/hosts", 0, 18

The filename differs but the 0, 18 is always the same. The buffer is actually 
but emacs doesn't switch to it.  Here is the contents of the messages buffer 
running  emacs /etc/hosts on the command line:

(emacs /etc/hosts)
Loading tool-bar...done
Loading image...done
Loading tooltip...done
Loading /usr/share/emacs/site-lisp/site-start.d/lang.emacs.el (source)...done
Loading /usr/share/emacs/site-lisp/site-start.d/php-mode-init.el (source)...done
Loading /usr/share/emacs/site-lisp/site-start.d/po-mode-init.el (source)...done
Loading regexp-opt...done
For information about the GNU Project and its goals, type C-h C-p.
string-equal: Args out of range: "/etc/hosts", 0, 18

I'm using emacs 21.2.1 that I built from the redhat 8.0 source rpm. This is a 
redhat 6.x 
system. Before I was using an older version, but I was waiting until I upgraded 
before I asked for help. I this a known problem?  I tried a google search but 
find anything.  My .emacs is:

;NOTE: use C-j in *scratch* buffer to eval lisp
(setq-default indent-tab-modes nil)

; turn off auto parsing when a java file changes.
;(setq jde-auto-parse-enable nil)
;setting this variable here wasn't working, so I changed the default in the jde 
to nil.

 '(global-font-lock-mode t nil (font-lock)))

;(add-to-list 'load-path (expand-file-name "/usr/local/emacsl/jde/lisp"))
;(add-to-list 'load-path (expand-file-name "/usr/local/emacsl/jde-2.2.5/lisp"))
(add-to-list 'load-path (expand-file-name "/usr/local/emacsl/jde-2.2.8/lisp"))
;(add-to-list 'load-path (expand-file-name "/usr/local/emacsl/jde-2.1.9/lisp"))

      (add-to-list 'load-path (expand-file-name 
;      (add-to-list 'load-path (expand-file-name 
;      (add-to-list 'load-path (expand-file-name "/usr/local/emacsl/semantic"))

;      (add-to-list 'load-path (expand-file-name "/usr/local/emacsl/speedbar"))
;      (add-to-list 'load-path (expand-file-name 
      (add-to-list 'load-path (expand-file-name 

      (add-to-list 'load-path (expand-file-name "/usr/local/emacsl/elib-1.0"))
      (add-to-list 'load-path (expand-file-name "/usr/local/emacsl/eieio"))

(setq-default indent-tab-modes nil)

;(require 'jde)
(setq defer-loading-jde t)
(if defer-loading-jde
      (autoload 'jde-mode "jde" "JDE mode." t)
      (setq auto-mode-alist
             '(("\\.java\\'" . jde-mode))
  (require 'jde))

;; Sets the basic indentation for Java source files
;; to two spaces.
(defun my-jde-mode-hook ()
 (setq indent-tabs-mode nil) ; added to set no-tab mode
  (setq c-basic-offset 4))

(add-hook 'jde-mode-hook 'my-jde-mode-hook)

;this is on top and on bottom.
(setq-default indent-tab-modes nil)

;; check for files with a path containing "postgres" or "pgsql"
(setq auto-mode-alist (cons '("\\(postgres\\|pgsql\\).*\\.[ch]\\'" . 
(setq auto-mode-alist (cons '("\\(postgres\\|pgsql\\).*\\.cc\\'" . 

(defun pgsql-c-mode ()
  ;; sets up formatting for Postgres C code
  (setq-default tab-width 4); This isn't the source of my tab problems
  (c-set-style "bsd")             ; set c-basic-offset to 4, plus other stuff
  (c-set-offset 'case-label '+)   ; tweak case indent to match PG custom
  (setq indent-tabs-mode t))      ; make sure we keep tabs when indenting

;this is on top and on bottom.
(setq-default indent-tab-modes nil)

; this is the emacs default that I changed
;(setq backup-enable-predicate(lambda (name) (or (< (length name) 5) (not 
"/tmp/" (substring name 0 5))))) )

; this prevents the creating of ~ backup files in the jsp directory, bec. the ~ 
are visible to anyone who accesses them with a web browser
(setq backup-enable-predicate(lambda (name) (or (< (length name) 5) (and  (not 
(string-equal "/tmp/" (substring name 0 5))) (not (string-equal 
(substring name 0 18)))))))

; another attempt to solve the tab hell problem
(setq indent-tabs-mode nil)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]