emacs-devel
[Top][All Lists]
Advanced

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

Re: save-buffer when directory doesn't exist


From: Jason Spiro
Subject: Re: save-buffer when directory doesn't exist
Date: Sun, 8 Apr 2007 17:42:09 -0400

2007/4/7, martin rudalics <address@hidden> wrote:
 > I like the new error message much better.  But now that I think about
 > it, the error message could be improved even more.  Instead of
 > "/ho,e/j/Desktop/: no such directory", how about this?
 >
 > Cannot save /ho,e/jspiro/Desktop/todo.txt because directory /ho,e does
 > not exist
 >
 > I did 4 things different in my suggested example:  I used the word
 > "because";  I added a verbose explanation of why it failed;  I left
 > out the trailing slash on the directory name since I think it looks
 > better that way;  and I only mentioned the nonexistent directory /ho,e
 > and not its subdirectories.

Then I would have to change the text in `basic-save-buffer-2' as well.
I don't want to think about the consequences of doing that now.  BTW,
`file-exists-p' won't tell me which subdirectory doesn't exist.

That's fair.  But wouldn't it be better to at least use a more verbose
text like "Cannot save file: no such directory /ho,e/j/Desktop"?

 > By the way, what can be done about the annoying "can't auto-save"
 > messages?  I wish emacs would just auto-save to /tmp by default.

Are you sure that you get them now?  When the directory doesn't exist
`set-visited-file-name' should _not_ be executed and auto-saving should
_not_ try to save the buffer.  Anything else wold be a bug.

Never mind.

Regards,
Jason

--
Jason Spiro: computer consulting with a smile.
I provide software development and training services to clients worldwide.
Contact me for a FREE consultation. Satisfaction guaranteed.
+1 (416) 781-5938 / Email: address@hidden / MSN: address@hidden




reply via email to

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