From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.bugs Subject: bug#3016: 23.0.92.2; offer to make a directory when saving if it is needed Date: Wed, 20 Feb 2013 16:28:21 -0500 Message-ID: References: <766594.81278.qm@web53212.mail.re2.yahoo.com> <87621n0zm1.wl%%xmue@d1.dion.ne.jp> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1361395733 17648 80.91.229.3 (20 Feb 2013 21:28:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 20 Feb 2013 21:28:53 +0000 (UTC) Cc: dcl441-bugs@yahoo.com, 3016@debbugs.gnu.org To: Kazuhiro Ito Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Feb 20 22:29:15 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1U8HE2-0006Ep-QO for geb-bug-gnu-emacs@m.gmane.org; Wed, 20 Feb 2013 22:29:14 +0100 Original-Received: from localhost ([::1]:43055 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U8HDi-0002Na-J1 for geb-bug-gnu-emacs@m.gmane.org; Wed, 20 Feb 2013 16:28:54 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:44205) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U8HDf-0002N5-3d for bug-gnu-emacs@gnu.org; Wed, 20 Feb 2013 16:28:53 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U8HDe-0002Ob-1r for bug-gnu-emacs@gnu.org; Wed, 20 Feb 2013 16:28:51 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35168) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U8HDd-0002OW-VH for bug-gnu-emacs@gnu.org; Wed, 20 Feb 2013 16:28:49 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1U8HEo-0001wt-JS for bug-gnu-emacs@gnu.org; Wed, 20 Feb 2013 16:30:02 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: <766594.81278.qm@web53212.mail.re2.yahoo.com> Resent-From: Glenn Morris Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 20 Feb 2013 21:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 3016 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 3016-submit@debbugs.gnu.org id=B3016.13613957787431 (code B ref 3016); Wed, 20 Feb 2013 21:30:02 +0000 Original-Received: (at 3016) by debbugs.gnu.org; 20 Feb 2013 21:29:38 +0000 Original-Received: from localhost ([127.0.0.1]:40632 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U8HEP-0001vn-HO for submit@debbugs.gnu.org; Wed, 20 Feb 2013 16:29:38 -0500 Original-Received: from fencepost.gnu.org ([208.118.235.10]:58162) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U8HEN-0001vg-Kc for 3016@debbugs.gnu.org; Wed, 20 Feb 2013 16:29:36 -0500 Original-Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1U8HDB-0000wd-4q; Wed, 20 Feb 2013 16:28:21 -0500 X-Spook: quiche 64 Vauxhall Cross Armani Delta Force Bellcore X-Ran: )I~o^u}40r.QcWZ1#y54N(:M6q0+PY+oF/UNMPp2=JFA7$fO^g#7l7deLOeik?a_NS_!R, X-Hue: cyan X-Attribution: GM User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:71566 Archived-At: Kazuhiro Ito wrote: > I want this check is done more later. Because, in draft buffers of > Wanderlust (a message user agent), buffer-file-name does not indicate > actual file name and saving file is done via hook functions (such as > write-contents-functions, local-write-file-hooks, > write-file-functions). In such case, this offer could make incorrect > directory. My initial reaction is to ask why you can't just set buffer-file-name to the right value (or to nil, so that basic-save-buffer will prompt for it); or at least to something whose parent directory exists, and then do whatever checks you want in your hook functions? By doing it the way you do, it sounds like you must already be missing the other checks that basic-save-buffer does (overwriting an existing file, saving to a directory rather than a file, verify file modtime), though they may not be relevant in your case.