From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Joseph Shraibman Newsgroups: gmane.emacs.help Subject: "Args out of range:" error when opening existing files Date: Tue, 08 Oct 2002 23:46:45 -0000 Sender: help-gnu-emacs-admin@gnu.org Message-ID: NNTP-Posting-Host: localhost.gmane.org X-Trace: main.gmane.org 1034121357 14597 127.0.0.1 (8 Oct 2002 23:55:57 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 8 Oct 2002 23:55:57 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17z4Ci-0003nH-00 for ; Wed, 09 Oct 2002 01:55:56 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17z486-00075d-00; Tue, 08 Oct 2002 19:51:10 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!sn-xit-03!sn-xit-06!sn-post-01!supernews.com!corp.supernews.com!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (Linux/2.2.18 (i686)) Original-X-Complaints-To: abuse@supernews.com Original-Lines: 108 Original-Xref: shelby.stanford.edu gnu.emacs.help:105847 Original-To: help-gnu-emacs@gnu.org Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:2394 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:2394 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 created, but emacs doesn't switch to it. Here is the contents of the messages buffer after 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 emacs before I asked for help. I this a known problem? I tried a google search but couldn't 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 source to nil. (custom-set-variables '(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 "/usr/local/emacsl/semantic-1.4beta11")) ; (add-to-list 'load-path (expand-file-name "/usr/local/emacsl/semantic-1.2.1")) ; (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 "/usr/local/emacsl/speedbar-0.12")) (add-to-list 'load-path (expand-file-name "/usr/local/emacsl/speedbar-0.13a")) (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 (progn (autoload 'jde-mode "jde" "JDE mode." t) (setq auto-mode-alist (append '(("\\.java\\'" . jde-mode)) auto-mode-alist))) (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]\\'" . pgsql-c-mode) auto-mode-alist)) (setq auto-mode-alist (cons '("\\(postgres\\|pgsql\\).*\\.cc\\'" . pgsql-c-mode) auto-mode-alist)) (defun pgsql-c-mode () ;; sets up formatting for Postgres C code (interactive) (c-mode) (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 (string-equal "/tmp/" (substring name 0 5))))) ) ; this prevents the creating of ~ backup files in the jsp directory, bec. the ~ files 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 "/local/www/htdocs/" (substring name 0 18))))))) ; another attempt to solve the tab hell problem (setq indent-tabs-mode nil)