bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#982: 23.0.60; file-truename causes an error.


From: TAKAHASHI Yoshio
Subject: bug#982: 23.0.60; file-truename causes an error.
Date: Mon, 15 Sep 2008 14:37:25 +0900
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.60 (windows-nt)

I have a file "c:/tmp/a.txt", but don't have "c:/tmp/b.txt".

(pwd)
"Directory c:/tmp/"

(w32-long-file-name "/tmp/a.txt")
"c:/tmp/a.txt"

(file-truename "./a.txt")
"c:/tmp/a.txt"

(file-truename "a.txt")
"c:/tmp/a.txt"

(w32-long-file-name "/tmp/b.txt")
nil

(file-truename "./b.txt")
"c:/tmp/b.txt"

(file-truename "b.txt")
Debugger entered--Lisp error: (args-out-of-range "b.txt" 0 -1)
  substring("b.txt" 0 -6)
  (setq rest (substring filename 0 (* -1 ...)))


>From files.el:

(defun file-truename (filename &optional counter prev-dirs)
  ...
                (setq missing (concat "/" (file-name-nondirectory filename)))
                (setq rest (substring filename 0 (* -1 (length missing))))
  ...

When FILENAME has no directory separator, MISSING is one char longer
than FILENAME.  In this case, substring raises an out-of-range error.




Please write in English if possible, because the Emacs maintainers
usually do not have translators to read other languages for them.

Your bug report will be posted to the emacs-pretest-bug@gnu.org mailing list.

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:



If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
    `bt full' and `xbacktrace'.
If you would like to further debug the crash, please read the file
c:/opt/emacs/23.0.60/etc/DEBUG for instructions.


In GNU Emacs 23.0.60.1 (i386-mingw-nt5.1.2600)
 of 2008-09-15 on HIBARI
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4) --cflags -I/gnuwin32/include'

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: C
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: JPN
  value of $XMODIFIERS: nil
  locale-coding-system: cp932
  default-enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  tool-bar-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  global-auto-composition-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<menu-bar> <help-menu> <send-emacs-bug-report>

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.







reply via email to

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