Gnus development mailing list
 help / color / mirror / Atom feed
From: Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann)
Cc: ding@gnus.org, Florian Weimer <fw@deneb.enyo.de>
Subject: Re: {PATCH] minor gpg.el fix for MS Windows
Date: Tue, 30 Apr 2002 17:47:38 +0200	[thread overview]
Message-ID: <vafelgxtch1.fsf@INBOX.auto.gnus.tok.lucy.cs.uni-dortmund.de> (raw)
In-Reply-To: <lmb5gr22.fsf@mail.ru> (Dmitry Bely's message of "Tue, 30 Apr 2002 19:11:01 +0400")

Dmitry Bely <dbely@mail.ru> writes:

>  (defcustom gpg-temp-directory 
> -  (expand-file-name "~/tmp")
> +  (if (memq system-type '(windows-nt cygwin32 win32 w32 mswindows))
> +      (temp-directory)
> +    (expand-file-name "~/tmp"))

I use the following code to get a temp directory in Tramp:

(defun tramp-temporary-file-directory ()
  "Return name of directory for temporary files (compat function).
For Emacs, this is the variable `temporary-file-directory', for XEmacs
this is the function `temp-directory'."
  (cond ((boundp 'temporary-file-directory)
         (symbol-value 'temporary-file-directory))
        ((fboundp 'temp-directory)
         (funcall (symbol-function 'temp-directory))) ;pacify byte-compiler
        ((let ((d (getenv "TEMP"))) (and d (file-directory-p d)))
         (file-name-as-directory (getenv "TEMP")))
        ((let ((d (getenv "TMP"))) (and d (file-directory-p d)))
         (file-name-as-directory (getenv "TMP")))
        ((let ((d (getenv "TMPDIR"))) (and d (file-directory-p d)))
         (file-name-as-directory (getenv "TMPDIR")))
        ((file-exists-p "c:/temp") (file-name-as-directory "c:/temp"))
        (t (message (concat "Neither `temporary-file-directory' nor "
                            "`temp-directory' is defined -- using /tmp."))
           (file-name-as-directory "/tmp"))))

Opinions?

kai
-- 
Silence is foo!



  parent reply	other threads:[~2002-04-30 15:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-30 15:11 Dmitry Bely
2002-04-30 15:24 ` Florian Weimer
2002-04-30 16:45   ` Dmitry Bely
2002-04-30 16:50     ` Dmitry Bely
2002-04-30 15:47 ` Kai Großjohann [this message]
2002-04-30 16:33   ` Dmitry Bely
2002-04-30 16:48     ` Kai Großjohann

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=vafelgxtch1.fsf@INBOX.auto.gnus.tok.lucy.cs.uni-dortmund.de \
    --to=kai.grossjohann@cs.uni-dortmund.de \
    --cc=ding@gnus.org \
    --cc=fw@deneb.enyo.de \
    /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).