* bug#982: 23.0.60; file-truename causes an error
@ 2008-09-15 9:27 martin rudalics
0 siblings, 0 replies; 2+ messages in thread
From: martin rudalics @ 2008-09-15 9:27 UTC (permalink / raw)
To: 982; +Cc: TAKAHASHI Yoshio
> I have a file "c:/tmp/a.txt", but don't have "c:/tmp/b.txt".
> [...]
> (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.
I've checked in a fix which should remove the args-out-of-range error.
Please try it since I'm not sure whether the directory part should be
handled better.
Thanks for reporting, martin.
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#982: 23.0.60; file-truename causes an error.
@ 2008-09-15 5:37 TAKAHASHI Yoshio
0 siblings, 0 replies; 2+ messages in thread
From: TAKAHASHI Yoshio @ 2008-09-15 5:37 UTC (permalink / raw)
To: emacs-pretest-bug
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-09-15 9:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-15 9:27 bug#982: 23.0.60; file-truename causes an error martin rudalics
-- strict thread matches above, loose matches on Subject: below --
2008-09-15 5:37 TAKAHASHI Yoshio
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.