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

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

bug#982: marked as done (23.0.60; file-truename causes an error.)


From: Emacs bug Tracking System
Subject: bug#982: marked as done (23.0.60; file-truename causes an error.)
Date: Wed, 17 Sep 2008 00:05:08 -0700

Your message dated Wed, 17 Sep 2008 08:54:29 +0200
with message-id <48D0A9A5.8070208@gmx.at>
and subject line Re: bug#982: 23.0.60; file-truename causes an error.
has caused the Emacs bug report #982,
regarding 23.0.60; file-truename causes an error.
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact don@donarmstrong.com
immediately.)


-- 
982: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=982
Emacs Bug Tracking System
Contact don@donarmstrong.com with problems
--- Begin Message --- Subject: 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.




--- End Message ---
--- Begin Message --- Subject: Re: bug#982: 23.0.60; file-truename causes an error. Date: Wed, 17 Sep 2008 08:54:29 +0200 User-agent: Thunderbird 2.0.0.16 (Windows/20080708)
> (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.

Fixed as

2008-09-15  Martin Rudalics  <rudalics@gmx.at>

        * files.el (file-truename): Don't raise args-out-of-range error
        when filename has no separator on windows-nt.  (Bug#982)

Thanks for reporting, martin.


--- End Message ---

reply via email to

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