[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
desktop-save
From: |
Enno Müntinga |
Subject: |
desktop-save |
Date: |
Sat, 04 Aug 2001 15:47:17 +0200 |
User-agent: |
Mozilla/5.0 (Windows; U; Win98; en-US; 0.8.1) Gecko/20010323 |
This bug report will be sent to the Free Software Foundation,
not to your local site managers!!
Please write in English, because the Emacs maintainers do not have
translators to read other languages for them.
In GNU Emacs 20.7.1 (i386-*-windows98.1998)
of Tue Jun 13 2000 on buffy
configured using `configure NT'
Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:
When I use "desktop-save" in order to save the desktop and enter the
directory
name without completion and don't type a slash ('/') at the end of the
directory-name, the filename (".emacs.desktop") is simply concatenated
to the directory name.
In my example this leads to the wrong filename
"bin.emacs.desktop"
one directory above the destination directory "bin".
This is the source-code in "desktop.el" which caused the error:
(defun desktop-save (dirname)
"Save the Desktop file. Parameter DIRNAME specifies where to save
desktop."
(interactive "DDirectory to save desktop file in: ")
(run-hooks 'desktop-save-hook)
(save-excursion
(let ((filename (expand-file-name
(concat dirname desktop-basefilename))) ;<--ERROR
(info (nreverse
(mapcar
.
.
.
.
the dirname must be validated before "concat" is executed.
Questions:
Is there already a lisp defun to check a directory name?
Can the completion facilities of emacs be used to check the input?
Directory after execution of desktop-save:
e:/Enno/eprg/emacs-20.7:
total 2204
drwxrwxrwx 2 unknown 123 0 May 1 19:16 .
drwxrwxrwx 2 unknown 123 0 Apr 30 21:12 ..
-rw-rw-rw- 1 unknown 123 937 Jun 17 1994 BUGS
-rw-rw-rw- 1 unknown 123 4737 Apr 8 1998
GETTING.GNU.SOFTWARE
-rw-rw-rw- 1 unknown 123 3416 Jun 12 2000 README
-rw-rw-rw- 1 unknown 123 8745 Jun 13 2000 README.W32
drwxrwxrwx 2 unknown 123 0 May 1 19:16 bin
wrong filename and dirname:
-rw-rw-rw- 1 unknown 123 10838 Aug 4 15:09 bin.emacs.desktop
-rw-rw-rw- 1 unknown 123 2227893 Jul 16 20:39 elisp.html
drwxrwxrwx 2 unknown 123 0 May 1 19:16 etc
drwxrwxrwx 2 unknown 123 0 May 1 19:16 info
drwxrwxrwx 2 unknown 123 0 May 1 19:16 lisp
drwxrwxrwx 2 unknown 123 0 May 1 19:16 lock
drwxrwxrwx 2 unknown 123 0 May 1 19:16 site-lisp
Recent input:
right right right right right down down down down down
down down down down down down down down down down down
down up up up up up up up up up up up up up up up up
up up up down down down down down down down f12 C-f10
pause down up d y y up x M-x d e s k t tab s a v tab
return C-a C-k e : / E n n tab e p r tab e m a tab
b i n return M-x r e p o r t tab return
Recent messages:
Composing main Info directory...done
Mark saved where search started
Loading emacsbug...
Loading emacsbug...done
Loading view...
Loading view...done
Fontifying *mail*...
Fontifying *mail*... (regexps........)
Loading view...done
Commands: d, s, x, u; f, o, 1, 2, m, v; ~, %; q to quit; ? for help.
Enno
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- desktop-save,
Enno Müntinga <=