Gnus development mailing list
 help / color / mirror / Atom feed
From: Adrian Lanz <lanz@wsl.ch>
To: ding@gnus.org
Subject: Re: mm-default-directory not honoured
Date: Wed, 06 Oct 2010 01:39:42 +0200	[thread overview]
Message-ID: <yovask0kgqf5.fsf@sampling.wsl.ch> (raw)
In-Reply-To: <m3d3ro606o.fsf@quimbies.gnus.org>

>>>>> On Tue, 05 Oct 2010 19:04:15 +0200
>>>>> Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

    > Adrian Lanz <lanz@wsl.ch> 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.




  reply	other threads:[~2010-10-05 23:39 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-05  8:58 Adrian Lanz
2010-10-05 17:04 ` Lars Magne Ingebrigtsen
2010-10-05 23:39   ` Adrian Lanz [this message]
2010-10-07 19:33     ` Lars Magne Ingebrigtsen
2010-10-09 11:31       ` Adrian Lanz
2010-10-09 14:02         ` Lars Magne Ingebrigtsen
2010-10-26 11:57       ` Adrian Lanz
2010-10-29 23:01         ` Lars Magne Ingebrigtsen
2010-11-01  8:46           ` Adrian Lanz
2010-11-01 11:54             ` Lars Magne Ingebrigtsen
2010-11-02 10:47               ` Adrian Lanz
2010-11-04 19:56                 ` Lars Magne Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=yovask0kgqf5.fsf@sampling.wsl.ch \
    --to=lanz@wsl.ch \
    --cc=ding@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).