From unknown Mon Aug 18 18:01:59 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#2211: server-socket-dir and make-temp-file Reply-To: "Roland Winkler" , 2211@debbugs.gnu.org Resent-From: "Roland Winkler" Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Thu, 05 Feb 2009 17:35:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: report 2211 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.123385491123344 (code B ref -1); Thu, 05 Feb 2009 17:35:03 +0000 Received: (at submit) by emacsbugs.donarmstrong.com; 5 Feb 2009 17:28:31 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=0.0 required=4.0 tests=none autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n15HSRs2023338 for ; Thu, 5 Feb 2009 09:28:29 -0800 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LV81b-0007cn-CM for bug-gnu-emacs@gnu.org; Thu, 05 Feb 2009 12:28:27 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LV81Y-0007c6-L2 for bug-gnu-emacs@gnu.org; Thu, 05 Feb 2009 12:28:26 -0500 Received: from [199.232.76.173] (port=58846 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LV81Y-0007c3-Ea for bug-gnu-emacs@gnu.org; Thu, 05 Feb 2009 12:28:24 -0500 Received: from tfkpsv.physik.uni-erlangen.de ([131.188.164.197]:3239) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LV81Y-000502-1B for bug-gnu-emacs@gnu.org; Thu, 05 Feb 2009 12:28:24 -0500 Received: from tfkp04.physik.uni-erlangen.de (tfkp04.physik.uni-erlangen.de [131.188.164.204]) by tfkpsv.physik.uni-erlangen.de (Postfix) with ESMTP id 98272215D1 for ; Thu, 5 Feb 2009 18:28:20 +0100 (CET) Date: Thu, 05 Feb 2009 18:28:19 +0100 Message-Id: From: "Roland Winkler" To: bug-gnu-emacs@gnu.org X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.4-2.6 server-socket-dir is by default a directory in /tmp. With CVS emacs it also takes the TMPDIR environment variable into account. Shouldn't this variable be initialized using make-temp-file so that it obeys any customization of temporary-file-directory? Actually, I ran the following command in the emacs directory $ grep "\"/tmp\"" lisp/*el lisp/*/*el Browsing through the matches, it seems to me that pmail-mime-attachment-dirs-alist and url-temporary-directory should be updated, too. A related issue: I do not quite understand a piece of code like (make-temp-file (concat (file-name-as-directory (or (getenv "TMPDIR") "/tmp")) "artist-stdin.")) used in the function artist-system. If the PREFIX arg of make-temp-file is an absolute directory as in the example above, make-temp-file will ignore any user customization of temporary-file-directory. The function ps-run-make-tmp-filename behaves similarly. In GNU Emacs 22.2.1 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of 2008-03-27 on tfkp07 From unknown Mon Aug 18 18:01:59 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#2211: server-socket-dir and make-temp-file Reply-To: Stefan Monnier , 2211@debbugs.gnu.org Resent-From: Stefan Monnier Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Thu, 05 Feb 2009 20:00:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 2211 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 2211-submit@emacsbugs.donarmstrong.com id=B2211.123386347326881 (code B ref 2211); Thu, 05 Feb 2009 20:00:04 +0000 Received: (at 2211) by emacsbugs.donarmstrong.com; 5 Feb 2009 19:51:13 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-0.5 required=4.0 tests=HAS_BUG_NUMBER,XIRONPORT autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from ironport2-out.teksavvy.com (ironport2-out.teksavvy.com [206.248.154.182]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n15Jp9gK026875 for <2211@emacsbugs.donarmstrong.com>; Thu, 5 Feb 2009 11:51:11 -0800 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsIEAHzRiklFxIvi/2dsb2JhbACBbsBqCI1+gloIgTQGgwI X-IronPort-AV: E=Sophos;i="4.37,386,1231131600"; d="scan'208";a="33392332" Received: from 69-196-139-226.dsl.teksavvy.com (HELO pastel.home) ([69.196.139.226]) by ironport2-out.teksavvy.com with ESMTP; 05 Feb 2009 14:51:03 -0500 Received: by pastel.home (Postfix, from userid 20848) id D319083D4; Thu, 5 Feb 2009 14:51:02 -0500 (EST) From: Stefan Monnier To: Roland Winkler Cc: 2211@debbugs.gnu.org Message-ID: References: Date: Thu, 05 Feb 2009 14:51:02 -0500 In-Reply-To: (Roland Winkler's message of "Thu, 05 Feb 2009 18:28:19 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii > server-socket-dir is by default a directory in /tmp. With CVS emacs > it also takes the TMPDIR environment variable into account. > Shouldn't this variable be initialized using make-temp-file so that > it obeys any customization of temporary-file-directory? No, because emacsclient needs to access server-socket-dir but doesn't read the .emacs so can't adapt to changes in temporary-file-directory (it does pay attention to $TMPDIR, on the other hand). > Actually, I ran the following command in the emacs directory > $ grep "\"/tmp\"" lisp/*el lisp/*/*el > Browsing through the matches, it seems to me that > pmail-mime-attachment-dirs-alist and url-temporary-directory > should be updated, too. You're probably right on these ones. > A related issue: I do not quite understand a piece of code like > (make-temp-file > (concat (file-name-as-directory > (or (getenv "TMPDIR") "/tmp")) > "artist-stdin.")) > used in the function artist-system. If the PREFIX arg of > make-temp-file is an absolute directory as in the example above, > make-temp-file will ignore any user customization of > temporary-file-directory. The function ps-run-make-tmp-filename > behaves similarly. At first, I was going to say that (concat (file-name-as-directory (or (getenv "TMPDIR") "/tmp")) "artist-stdin.") should be replaced by (expand-file-name "artist-stdin." (or (getenv "TMPDIR") "/tmp")) but indeed, it's better to just skip it all and let `make-temp-file' use temporary-file-directory. Stefan From unknown Mon Aug 18 18:01:59 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#2211: server-socket-dir and make-temp-file Reply-To: "Roland Winkler" , 2211@debbugs.gnu.org Resent-From: "Roland Winkler" Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sat, 07 Feb 2009 16:40:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 2211 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 2211-submit@emacsbugs.donarmstrong.com id=B2211.123402439323432 (code B ref 2211); Sat, 07 Feb 2009 16:40:04 +0000 Received: (at 2211) by emacsbugs.donarmstrong.com; 7 Feb 2009 16:33:13 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.0 required=4.0 tests=HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from tfkpsv.physik.uni-erlangen.de (tfkpsv.physik.uni-erlangen.de [131.188.164.197]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n17GX5Ne023424 for <2211@emacsbugs.donarmstrong.com>; Sat, 7 Feb 2009 08:33:06 -0800 Received: from tfkp04.physik.uni-erlangen.de (tfkp04.physik.uni-erlangen.de [131.188.164.204]) by tfkpsv.physik.uni-erlangen.de (Postfix) with ESMTP id 4D415215D1; Sat, 7 Feb 2009 17:32:59 +0100 (CET) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18829.47035.312670.911617@tfkp04.physik.uni-erlangen.de> Date: Sat, 7 Feb 2009 17:32:59 +0100 From: "Roland Winkler" To: Stefan Monnier Cc: 2211@debbugs.gnu.org In-Reply-To: References: X-Mailer: VM 8.0.9 under Emacs 22.2.1 (i686-pc-linux-gnu) On Thu Feb 5 2009 Stefan Monnier wrote: > > server-socket-dir is by default a directory in /tmp. With CVS emacs > > it also takes the TMPDIR environment variable into account. > > Shouldn't this variable be initialized using make-temp-file so that > > it obeys any customization of temporary-file-directory? > > No, because emacsclient needs to access server-socket-dir but doesn't > read the .emacs so can't adapt to changes in temporary-file-directory > (it does pay attention to $TMPDIR, on the other hand). Thanks, I see. The lisp code defining server-socket-dir for emacs matches a corresponding piece of C code in emacsclient.c > > Actually, I ran the following command in the emacs directory > > $ grep "\"/tmp\"" lisp/*el lisp/*/*el > > Browsing through the matches, it seems to me that > > pmail-mime-attachment-dirs-alist and url-temporary-directory > > should be updated, too. > > You're probably right on these ones. I could update those. Yet I just realized that emacs 23 is already in pretest. Is this the kind of thing that should be changed nonethless or should I better wait? > At first, I was going to say that > > (concat (file-name-as-directory > (or (getenv "TMPDIR") "/tmp")) > "artist-stdin.") > > should be replaced by > > (expand-file-name "artist-stdin." (or (getenv "TMPDIR") "/tmp")) > > but indeed, it's better to just skip it all and let `make-temp-file' use > temporary-file-directory. Same for these changes: better do them now or wait? Thanks, Roland From unknown Mon Aug 18 18:01:59 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#2211: server-socket-dir and make-temp-file Reply-To: Stefan Monnier , 2211@debbugs.gnu.org Resent-From: Stefan Monnier Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sat, 07 Feb 2009 21:25:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 2211 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 2211-submit@emacsbugs.donarmstrong.com id=B2211.123404135230721 (code B ref 2211); Sat, 07 Feb 2009 21:25:04 +0000 Received: (at 2211) by emacsbugs.donarmstrong.com; 7 Feb 2009 21:15:52 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-0.5 required=4.0 tests=HAS_BUG_NUMBER,XIRONPORT autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from ironport2-out.teksavvy.com (ironport2-out.teksavvy.com [206.248.154.182]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n17LFmXE030715 for <2211@emacsbugs.donarmstrong.com>; Sat, 7 Feb 2009 13:15:50 -0800 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtwFAGiIjUlFxIvi/2dsb2JhbACBbcsVhBoGgx0 X-IronPort-AV: E=Sophos;i="4.37,397,1231131600"; d="scan'208";a="33515518" Received: from 69-196-139-226.dsl.teksavvy.com (HELO ceviche.home) ([69.196.139.226]) by ironport2-out.teksavvy.com with ESMTP; 07 Feb 2009 16:15:42 -0500 Received: by ceviche.home (Postfix, from userid 20848) id AC0C6B4015; Sat, 7 Feb 2009 16:15:42 -0500 (EST) From: Stefan Monnier To: "Roland Winkler" Cc: 2211@debbugs.gnu.org Message-ID: References: <18829.47035.312670.911617@tfkp04.physik.uni-erlangen.de> Date: Sat, 07 Feb 2009 16:15:42 -0500 In-Reply-To: <18829.47035.312670.911617@tfkp04.physik.uni-erlangen.de> (Roland Winkler's message of "Sat, 7 Feb 2009 17:32:59 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii > Thanks, I see. The lisp code defining server-socket-dir for Emacs > matches a corresponding piece of C code in emacsclient.c It deserves a comment (in both places), indeed. >> You're probably right on these ones. > I could update those. Yet I just realized that emacs 23 is already > in pretest. Is this the kind of thing that should be changed > nonethless or should I better wait? I'd rather postpone those things to 23.2. Stefan From unknown Mon Aug 18 18:01:59 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.420 (Entity 5.420) X-Loop: owner@emacsbugs.donarmstrong.com From: help-debbugs@gnu.org (Emacs bug Tracking System) To: "Roland Winkler" Subject: bug#2211 closed by Chong Yidong (Re: bug#2211: server-socket-dir and make-temp-file) Message-ID: References: <87skmpucx5.fsf@cyd.mit.edu> X-Emacs-PR-Message: they-closed 2211 X-Emacs-PR-Package: emacs Reply-To: 2211@debbugs.gnu.org Date: Sat, 07 Feb 2009 22:05:06 +0000 Content-Type: multipart/mixed; boundary="----------=_1234044306-9412-1" This is a multi-part message in MIME format... ------------=_1234044306-9412-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This is an automatic notification regarding your bug report which was filed against the emacs package: #2211: server-socket-dir and make-temp-file It has been closed by Chong Yidong . Their explanation is attached below along with your original report. If this explanation is unsatisfactory and you have not received a better one in a separate message then please contact Chong Yidong by replying to this email. --=20 2211: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D2211 Emacs Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1234044306-9412-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 2211-done) by emacsbugs.donarmstrong.com; 7 Feb 2009 21:58:07 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.0 required=4.0 tests=HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from cyd.mit.edu (CYD.MIT.EDU [18.115.2.24]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n17Lw4g7007855 for <2211-done@emacsbugs.donarmstrong.com>; Sat, 7 Feb 2009 13:58:05 -0800 Received: by cyd.mit.edu (Postfix, from userid 1000) id D692257E20B; Sat, 7 Feb 2009 16:58:46 -0500 (EST) From: Chong Yidong To: "Roland Winkler" Cc: 2211-done@debbugs.gnu.org Subject: Re: bug#2211: server-socket-dir and make-temp-file Date: Sat, 07 Feb 2009 16:58:46 -0500 Message-ID: <87skmpucx5.fsf@cyd.mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii > I could update those. Yet I just realized that emacs 23 is already in > pretest. Is this the kind of thing that should be changed nonethless > or should I better wait? I think it's better to fix these now. I've just done that. Thanks for finding the problem. ------------=_1234044306-9412-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by emacsbugs.donarmstrong.com; 5 Feb 2009 17:28:31 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=0.0 required=4.0 tests=none autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n15HSRs2023338 for ; Thu, 5 Feb 2009 09:28:29 -0800 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LV81b-0007cn-CM for bug-gnu-emacs@gnu.org; Thu, 05 Feb 2009 12:28:27 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LV81Y-0007c6-L2 for bug-gnu-emacs@gnu.org; Thu, 05 Feb 2009 12:28:26 -0500 Received: from [199.232.76.173] (port=58846 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LV81Y-0007c3-Ea for bug-gnu-emacs@gnu.org; Thu, 05 Feb 2009 12:28:24 -0500 Received: from tfkpsv.physik.uni-erlangen.de ([131.188.164.197]:3239) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LV81Y-000502-1B for bug-gnu-emacs@gnu.org; Thu, 05 Feb 2009 12:28:24 -0500 Received: from tfkp04.physik.uni-erlangen.de (tfkp04.physik.uni-erlangen.de [131.188.164.204]) by tfkpsv.physik.uni-erlangen.de (Postfix) with ESMTP id 98272215D1 for ; Thu, 5 Feb 2009 18:28:20 +0100 (CET) Date: Thu, 05 Feb 2009 18:28:19 +0100 Message-Id: From: "Roland Winkler" To: bug-gnu-emacs@gnu.org Subject: server-socket-dir and make-temp-file X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.4-2.6 server-socket-dir is by default a directory in /tmp. With CVS emacs it also takes the TMPDIR environment variable into account. Shouldn't this variable be initialized using make-temp-file so that it obeys any customization of temporary-file-directory? Actually, I ran the following command in the emacs directory $ grep "\"/tmp\"" lisp/*el lisp/*/*el Browsing through the matches, it seems to me that pmail-mime-attachment-dirs-alist and url-temporary-directory should be updated, too. A related issue: I do not quite understand a piece of code like (make-temp-file (concat (file-name-as-directory (or (getenv "TMPDIR") "/tmp")) "artist-stdin.")) used in the function artist-system. If the PREFIX arg of make-temp-file is an absolute directory as in the example above, make-temp-file will ignore any user customization of temporary-file-directory. The function ps-run-make-tmp-filename behaves similarly. In GNU Emacs 22.2.1 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of 2008-03-27 on tfkp07 ------------=_1234044306-9412-1--