From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Jason Spiro" Newsgroups: gmane.emacs.devel Subject: Re: save-buffer when directory doesn't exist Date: Sun, 8 Apr 2007 17:42:09 -0400 Message-ID: References: <45F27DDC.9080006@gmx.at> <45FFAD68.9060601@gmx.at> <46174932.2030209@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1176097953 30065 80.91.229.12 (9 Apr 2007 05:52:33 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 9 Apr 2007 05:52:33 +0000 (UTC) Cc: emacs-devel@gnu.org To: "martin rudalics" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Apr 09 07:51:42 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Hammw-0004DH-Ti for ged-emacs-devel@m.gmane.org; Mon, 09 Apr 2007 07:51:39 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hamqi-0004sb-5v for ged-emacs-devel@m.gmane.org; Mon, 09 Apr 2007 01:55:32 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HafD4-0004B4-Bs for emacs-devel@gnu.org; Sun, 08 Apr 2007 17:46:06 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HafD2-00048T-IQ for emacs-devel@gnu.org; Sun, 08 Apr 2007 17:46:05 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HafD2-00048O-Ds for emacs-devel@gnu.org; Sun, 08 Apr 2007 17:46:04 -0400 Original-Received: from ik-out-1112.google.com ([66.249.90.179]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Haf9H-0004c0-AW for emacs-devel@gnu.org; Sun, 08 Apr 2007 17:42:11 -0400 Original-Received: by ik-out-1112.google.com with SMTP id b32so988650ika for ; Sun, 08 Apr 2007 14:42:10 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=AR+fChO4KvWfE1wVinN/NtLWMTVf16U1T8zsC+rkmXwoVVo01TIR4AfKet8gs2V49riZLEQ1a3Ov6wjbSNI1RBFfp5Uk7NK4IkjwPstJSIp8AikrPxCNwRg67yaXdjY/TvCeQxrQwM2/fwjzDgL2HzG159gj3S2KwJPeCqsyS5w= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=LyGiLv5ah/qQsq5YFWp3MlOhTeoOWlSeBDf40rr+wgL4pHFZUh+KBYzG5nvYLMu06xWR8XGBPopQKNOpVTgiGnp5nbrSJW/8xStooBHLC6kp3hikr7Ir2T4veWGCVbr4WFs4NcVXHsed5di235WQVPu/JZUCe7/hArMOV+aCg6I= Original-Received: by 10.78.123.4 with SMTP id v4mr791780huc.1176068529961; Sun, 08 Apr 2007 14:42:09 -0700 (PDT) Original-Received: by 10.78.25.19 with HTTP; Sun, 8 Apr 2007 14:42:09 -0700 (PDT) In-Reply-To: <46174932.2030209@gmx.at> Content-Disposition: inline X-Google-Sender-Auth: 1c1dbf13a487045b X-detected-kernel: Linux 2.4-2.6 (Google crawlbot) X-Mailman-Approved-At: Mon, 09 Apr 2007 01:55:29 -0400 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:69211 Archived-At: 2007/4/7, martin rudalics 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: info@jspiro.com / MSN: jasonspiro@hotmail.com