From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/72676 Path: news.gmane.org!not-for-mail From: Adrian Lanz Newsgroups: gmane.emacs.gnus.general Subject: Re: mm-default-directory not honoured Date: Wed, 06 Oct 2010 01:39:42 +0200 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1286322103 4928 80.91.229.12 (5 Oct 2010 23:41:43 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 5 Oct 2010 23:41:43 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M21048@lists.math.uh.edu Wed Oct 06 01:41:42 2010 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1P3H8g-0004nm-5S for ding-account@gmane.org; Wed, 06 Oct 2010 01:41:42 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1P3H7T-0004Mu-KO; Tue, 05 Oct 2010 18:40:27 -0500 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1P3H7S-0004Mf-55 for ding@lists.math.uh.edu; Tue, 05 Oct 2010 18:40:26 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtp (Exim 4.72) (envelope-from ) id 1P3H7D-0003M7-OI for ding@lists.math.uh.edu; Tue, 05 Oct 2010 18:40:25 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1P3H7C-00073d-00 for ; Wed, 06 Oct 2010 01:40:10 +0200 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1P3H7C-0004XM-Ge for ding@gnus.org; Wed, 06 Oct 2010 01:40:10 +0200 Original-Received: from public.wsl.ch ([193.134.202.252]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 06 Oct 2010 01:40:10 +0200 Original-Received: from lanz by public.wsl.ch with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 06 Oct 2010 01:40:10 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 72 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: public.wsl.ch User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:uy5nawodu40FLwuam9wyheRdNZE= X-Spam-Score: -1.9 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:72676 Archived-At: >>>>> On Tue, 05 Oct 2010 19:04:15 +0200 >>>>> Lars Magne Ingebrigtsen writes: > Adrian Lanz writes: >> Since the last update of emacs_snapshot on debian/sid >> gnus-mime-save-part does not honour the mm-default-directory set >> in .gnus.el. > The code is: > (setq file > (read-file-name (or prompt > (format "Save MIME part to (default %s): " > (or filename ""))) > (or mm-default-directory > default-directory) > (or filename ""))) > And it works for me. Could the snapshot be old? Don't think so. I have the snapshots of 01-OCT-2010 on two different machines (32 Bit and 64 Bit). Same effect on both mchines. If I instrument mm-save-part for debugging, the above function returns the filename alone (without directory path). The function call is (assuming mm-default-directory is "/my-dir/") (read-file-name "save MIME part to (default foo.bar): " "/my-dir/" "foo.bar") and the variable file is "foo.bar". Shouldn't variable file be "/my-dir/foo.bar"? Afterwards in line (setq mm-default-directory (file-name-directory file)) (file-name-directory file) returns nil and mm-default-directory is set to nil. Does it really work for you as expected? BTW, now that I have a look into this code: as a user I never liked the effect of this line (setq mm-default-directory (file-name-directory file)). I think, the user configured default place for saving mime parts (mm-default-directory) should not be changed on the fly... In my daily work, mm-default-directory is really the (quick and dirty and fast and first) place, where I save all my attachments when reading through the new mail. Later, when I start or continue to work on some project, I get/copy/move the relevant documents from the mm-default-directory into the project's directory tree. >From time to time, I save an attachments directly to some other place, because I have time to do so, and/or because I want the file (only) at that specific place. But with the above code, the default directory is lost and all the following attachments get saved to this new place. Often, I do not realise this immediately. I am getting upset a couple of days or hours later, when I do not find the documents at the usual place (mm-default-directory). Of course, the implemented behaviour can be considered a feature. For me, it would be nice to have a switch. Something like "mm-default-directory-fixed" and t would mean do not change mm-default-directory and nil would indicate the current implementation. Cheers, Adrian.