From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/44522 Path: main.gmane.org!not-for-mail From: Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai =?iso-8859-1?q?Gro=DFjohann?=) Newsgroups: gmane.emacs.gnus.general Subject: Re: {PATCH] minor gpg.el fix for MS Windows Date: Tue, 30 Apr 2002 17:47:38 +0200 Sender: owner-ding@hpc.uh.edu Message-ID: References: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1020181804 29226 127.0.0.1 (30 Apr 2002 15:50:04 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 30 Apr 2002 15:50:04 +0000 (UTC) Cc: ding@gnus.org, Florian Weimer Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 172ZtD-0007bH-00 for ; Tue, 30 Apr 2002 17:50:03 +0200 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 172Zs6-0000dC-00; Tue, 30 Apr 2002 10:48:54 -0500 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Tue, 30 Apr 2002 10:49:07 -0500 (CDT) Original-Received: from sclp3.sclp.com (qmailr@sclp3.sclp.com [209.196.61.66]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id KAA02295 for ; Tue, 30 Apr 2002 10:48:56 -0500 (CDT) Original-Received: (qmail 16520 invoked by alias); 30 Apr 2002 15:48:12 -0000 Original-Received: (qmail 16515 invoked from network); 30 Apr 2002 15:48:12 -0000 Original-Received: from waldorf.cs.uni-dortmund.de (129.217.4.42) by gnus.org with SMTP; 30 Apr 2002 15:48:12 -0000 Original-Received: from lothlorien.cs.uni-dortmund.de (lothlorien [129.217.19.67]) by waldorf.cs.uni-dortmund.de with ESMTP id g3UFlhb01114; Tue, 30 Apr 2002 17:47:43 +0200 (MES) Original-Received: from lucy.cs.uni-dortmund.de (lucy [129.217.19.80]) by lothlorien.cs.uni-dortmund.de id RAA26984; Tue, 30 Apr 2002 17:47:38 +0200 (MET DST) Original-Received: by lucy.cs.uni-dortmund.de (Postfix, from userid 6104) id 5679A3ACE5; Tue, 30 Apr 2002 17:47:38 +0200 (CEST) Original-To: Dmitry Bely In-Reply-To: (Dmitry Bely's message of "Tue, 30 Apr 2002 19:11:01 +0400") Original-Lines: 34 User-Agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.2.50 (i686-pc-linux-gnu) Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:44522 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:44522 Dmitry Bely 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!