all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Joseph Shraibman <jks@spam.me.not.akula.com>
Subject: "Args out of range:" error when opening existing files
Date: Tue, 08 Oct 2002 23:46:45 -0000	[thread overview]
Message-ID: <uq6rj57k0p9i4d@corp.supernews.com> (raw)

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)

             reply	other threads:[~2002-10-08 23:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-08 23:46 Joseph Shraibman [this message]
2002-10-09 15:15 ` "Args out of range:" error when opening existing files Glenn Morris
2002-10-09 18:13   ` Joseph Shraibman
  -- strict thread matches above, loose matches on Subject: below --
2002-10-09 18:48 Bingham, Jay

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=uq6rj57k0p9i4d@corp.supernews.com \
    --to=jks@spam.me.not.akula.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.