From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.bugs Subject: bug#2259: 23.0.90; PATCH: getenv mistakenly passes a frame to getenv_internal, when it should instead pass a CONS Date: Tue, 10 Feb 2009 17:10:20 +0100 Message-ID: References: <36366a980902091937x40e025cbm6b351ab4620d6281@mail.gmail.com> Reply-To: Juanma Barranquero , 2259@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1234283030 5021 80.91.229.12 (10 Feb 2009 16:23:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 10 Feb 2009 16:23:50 +0000 (UTC) Cc: 2259@emacsbugs.donarmstrong.com To: Eric Hanchrow , Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Feb 10 17:25:04 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LWvPz-0006iu-Mf for geb-bug-gnu-emacs@m.gmane.org; Tue, 10 Feb 2009 17:25:03 +0100 Original-Received: from localhost ([127.0.0.1]:42836 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LWvOf-0008AZ-VK for geb-bug-gnu-emacs@m.gmane.org; Tue, 10 Feb 2009 11:23:42 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LWvOb-0008AF-Rb for bug-gnu-emacs@gnu.org; Tue, 10 Feb 2009 11:23:37 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LWvOa-00089v-BS for bug-gnu-emacs@gnu.org; Tue, 10 Feb 2009 11:23:37 -0500 Original-Received: from [199.232.76.173] (port=60995 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LWvOa-00089s-7R for bug-gnu-emacs@gnu.org; Tue, 10 Feb 2009 11:23:36 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:42397) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LWvOZ-0005od-OV for bug-gnu-emacs@gnu.org; Tue, 10 Feb 2009 11:23:36 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n1AGNXuT027945; Tue, 10 Feb 2009 08:23:33 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id n1AGF2t2025086; Tue, 10 Feb 2009 08:15:02 -0800 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Juanma Barranquero Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Tue, 10 Feb 2009 16:15:02 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 2259 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: patch Original-Received: via spool by 2259-submit@emacsbugs.donarmstrong.com id=B2259.123428223424791 (code B ref 2259); Tue, 10 Feb 2009 16:15:02 +0000 Original-Received: (at 2259) by emacsbugs.donarmstrong.com; 10 Feb 2009 16:10:34 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from mail-ew0-f10.google.com (mail-ew0-f10.google.com [209.85.219.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n1AGAQ2q024777 for <2259@emacsbugs.donarmstrong.com>; Tue, 10 Feb 2009 08:10:28 -0800 Original-Received: by ewy3 with SMTP id 3so3183486ewy.1 for <2259@emacsbugs.donarmstrong.com>; Tue, 10 Feb 2009 08:10:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=YCvtXAVrtZ2g7vJFZjgWLQ+AIfVbz+rslx7vyp2voKA=; b=HyO6f9W/nA7/ZBWVimr0nyf/WmKtTBR4YL1iLxtFWhRhWjQSTP9d1ocPPex/ExPiXp SoFHCAWT1/3sKETUofsf2MC6G+3KkzjdSIGwblB5TxoIEJ3GapPwjorELasWurddsGOJ D0Ywro1K0ADWvdOCOnawUJRKMHsz8AayBcdS8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=XCuzRZtTQjvwBxMC11BTaWUPuu8VjiYSzMfelU10p/D1FAlkC0YlevpYLoiJJd1TIe UCCVieV3gAMMtDhXnOa7DiiZ+VQKRVQxW+mDjOxtQGChfKQuTIOhec7XIXahlGQSlo4a aRuiEzWt+zqm55ljzMMGUChydAX1bcgkI7PLQ= Original-Received: by 10.210.34.19 with SMTP id h19mr3346024ebh.199.1234282220811; Tue, 10 Feb 2009 08:10:20 -0800 (PST) In-Reply-To: X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Tue, 10 Feb 2009 11:23:37 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:25122 Archived-At: On Tue, Feb 10, 2009 at 11:24, Juanma Barranquero wrote: > or it > is known at that point that the ENV arg of `server-with-environment' > will never contain negative entries (i.e., can the output of > (process-get process 'env) contain negative entries)? If it is > intended, perhaps a comment would be in order. OK, I see now that "ENV should be in the same format as `process-environment'", and that, in `process-environment', "[e]ach element should be a string of the form ENVVARNAME=VALUE". So yes, it is known that there shouldn't be negative entries, and it is even documented. Still, perhaps this change would be useful... Juanma Index: server.el =================================================================== RCS file: /sources/emacs/emacs/lisp/server.el,v retrieving revision 1.188 diff -u -2 -r1.188 server.el --- server.el 7 Feb 2009 21:59:35 -0000 1.188 +++ server.el 10 Feb 2009 15:55:04 -0000 @@ -241,7 +241,7 @@ (dolist (,var ,vars) (let ((,value (getenv-internal ,var ,env))) - (push (if (null ,value) - ,var - (concat ,var "=" ,value)) + (push (if (stringp ,value) + (concat ,var "=" ,value) + ,var) process-environment))) (progn ,@body))))