From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eric Hanchrow Newsgroups: gmane.emacs.bugs,gmane.emacs.pretest.bugs Subject: bug#2259: 23.0.90; PATCH: getenv mistakenly passes a frame to getenv_internal, when it should instead pass a CONS Date: Mon, 9 Feb 2009 19:37:47 -0800 Message-ID: <36366a980902091937x40e025cbm6b351ab4620d6281@mail.gmail.com> Reply-To: Eric Hanchrow , 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 1234238690 333 80.91.229.12 (10 Feb 2009 04:04:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 10 Feb 2009 04:04:50 +0000 (UTC) To: emacs-pretest-bug@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Feb 10 05:06: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 1LWjsQ-00070p-2R for geb-bug-gnu-emacs@m.gmane.org; Tue, 10 Feb 2009 05:05:54 +0100 Original-Received: from localhost ([127.0.0.1]:54511 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LWjr6-0000Ld-6j for geb-bug-gnu-emacs@m.gmane.org; Mon, 09 Feb 2009 23:04:16 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LWjqV-0008QH-EE for bug-gnu-emacs@gnu.org; Mon, 09 Feb 2009 23:03:39 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LWjqT-0008P2-QQ for bug-gnu-emacs@gnu.org; Mon, 09 Feb 2009 23:03:38 -0500 Original-Received: from [199.232.76.173] (port=55093 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LWjqT-0008Oj-0k for bug-gnu-emacs@gnu.org; Mon, 09 Feb 2009 23:03:37 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:40118) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LWjqR-0000WF-Jy for bug-gnu-emacs@gnu.org; Mon, 09 Feb 2009 23:03: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 n1A43X2w005605; Mon, 9 Feb 2009 20:03:33 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id n1A3j2VR000837; Mon, 9 Feb 2009 19:45:02 -0800 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Eric Hanchrow Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Tue, 10 Feb 2009 03:45:02 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: report 2259 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.123423707832061 (code B ref -1); Tue, 10 Feb 2009 03:45:02 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 10 Feb 2009 03:37:58 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n1A3boXD032053 for ; Mon, 9 Feb 2009 19:37:51 -0800 Original-Received: from mx10.gnu.org ([199.232.76.166]:58241) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1LWjPe-0002HS-Q5 for emacs-pretest-bug@gnu.org; Mon, 09 Feb 2009 22:35:54 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1LWjRV-0006i7-7I for emacs-pretest-bug@gnu.org; Mon, 09 Feb 2009 22:37:50 -0500 Original-Received: from wf-out-1314.google.com ([209.85.200.173]:49486) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LWjRU-0006hz-Nj for emacs-pretest-bug@gnu.org; Mon, 09 Feb 2009 22:37:49 -0500 Original-Received: by wf-out-1314.google.com with SMTP id 28so2304072wfc.24 for ; Mon, 09 Feb 2009 19:37:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=eboYHM99NjpZt0kTUqguMXneSOyUKX0BiuRFjIS/SZk=; b=F24n+fVPja0npqmx2F3YdAXh8prxNZ8UmlnMf/gSsvXcxdKO3McQa2uPx7tcX1bwf+ bavV+86XeJEO98yqVyS+UnXnuFSGFXSKZlMqsDagVdH+XaiAXdBcJmZGE5bmMLxDgvKD t2i0SkmOCwqtH2mAeTrJUGKc2exOiYpeCMddg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=U/PtPiamGyQv50q1HWjpjdgY1DKemDyUBPWcZW0GZM4U24GLr6gogXC7uS8DrcRc/9 /key0niYEQ0P0YY7bCaNU322R7TwRDLrOMoJ7TlH0icf6fbQMhyBnmxJwX7MhXoPYhxp d1hjH5/mPFDIaSQENV5OdGKrycbSvkhrC7Ko8= Original-Received: by 10.142.43.7 with SMTP id q7mr413050wfq.161.1234237067435; Mon, 09 Feb 2009 19:37:47 -0800 (PST) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Mon, 09 Feb 2009 23:03:38 -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:25098 gmane.emacs.pretest.bugs:23879 Archived-At: Please write in English if possible, because the Emacs maintainers usually do not have translators to read other languages for them. Your bug report will be posted to the emacs-pretest-bug@gnu.org mailing list. Please describe exactly what actions triggered the bug and the precise symptoms of the bug: I noticed that (getenv "SSH_TTY" (selected-frame)) returned nil even though (assoc 'environment (frame-parameters (selected-frame))) returned an environment that indeed defined that variable. I poked around and saw that getenv was passing a frame to getenv_internal, but getenv_internal only consults that second argument if it's a CONS. This patch seems to fix the problem. diff --git a/lisp/env.el b/lisp/env.el index 8d8bebe..ad88ba8 100644 --- a/lisp/env.el +++ b/lisp/env.el @@ -198,7 +198,7 @@ in the environment list of the selected frame." (encode-coding-string variable locale-coding-system) variable) - frame))) + (and frame (assoc 'environment (frame-parameters frame)))))) (if (and enable-multibyte-characters value) (setq value (decode-coding-string value locale-coding-system))) (when (interactive-p) If Emacs crashed, and you have the Emacs process in the gdb debugger, please include the output from the following gdb commands: `bt full' and `xbacktrace'. If you would like to further debug the crash, please read the file /usr/local/src/emacs/etc/DEBUG for instructions. In GNU Emacs 23.0.90.1 (i686-pc-linux-gnu, GTK+ Version 2.14.4) of 2009-02-05 on debian Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: nil value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default-enable-multibyte-characters: t Major mode: Emacs-Lisp Minor modes in effect: auto-fill-function: do-auto-fill recentf-mode: t erc-ring-mode: t erc-pcomplete-mode: t erc-netsplit-mode: t eldoc-mode: t erc-button-mode: t erc-fill-mode: t erc-stamp-mode: t erc-autojoin-mode: t erc-track-mode: t erc-track-minor-mode: t erc-match-mode: t erc-services-mode: t erc-networks-mode: t erc-irccontrols-mode: t erc-noncommands-mode: t erc-readonly-mode: t desktop-save-mode: t display-time-mode: t global-auto-revert-mode: t diff-auto-refine-mode: t shell-dirtrack-mode: t tooltip-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t global-auto-composition-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: F RET C-x n d C-x b RET ESC C-n ESC C-p ESC C-n ESC C-p ESC C-n ESC C-f C-x b RET C-u C-n C-u C-n C-u C-n C-p C-p C-e ESC b C-s C-w C-s C-s C-a C-x b RET C-x b RET ESC C-n ESC C-n C-n C-x n w ESC C-d C-s C-w C-w C-s C-s C-s C-s C-s C-s C-a C-x n d C-x n w C-x 2 C-u C-@ ESC - C-l C-l C-x 0 C-x n d C-e ESC b C-s C-w C-s C-s C-s C-s C-s C-s C-s C-a C-x b RET C-x n w C-x v g l ESC 0 C-l C-x k RET C-x o C-x b i n i RET C-x b s c r RET C-p C-p ESC C-@ ESC w C-x o ESC m C-y ESC C-k TAB ESC b ESC C-u ESC C-k f r a m e C-x o ESC > ESC ( f r a m ESC / SPC n i l C-e C-j ESC C-p C-k C-p ESC C-d C-h f RET C-x b RET C-l ESC m ESC 1 ESC ( a n d SPC f r a m e SPC C-x C-s ESC C-x C-x b C-s RET ESC C-u ESC C-n C-x C-e C-x e DEL C-x b e m a RET C-g C-r s n o g ESC > r u d TAB s e e n SPC s n o g TAB g ESC / RET n u t s . RET C-x b RET C-x o C-x b C-s RET ESC x b y t e - r TAB RET RET RET y C-x v = C-x o ESC x r e p o r t - e m a c s - b u g RET Recent messages: Checking /usr/local/src/emacs/lisp/obsolete... Checking /usr/local/src/emacs/lisp/org... Checking /usr/local/src/emacs/lisp/play... Checking /usr/local/src/emacs/lisp/progmodes... Checking /usr/local/src/emacs/lisp/term... Checking /usr/local/src/emacs/lisp/textmodes... Checking /usr/local/src/emacs/lisp/url... Done (Total of 1 file compiled) Finding changes in /usr/local/src/emacs/lisp/env.el...done Scanning for dabbrevs...100% -- If there were a little guy running around inside the computer executing our programs, he would probably have as long and plaintive a tale to tell about his job as a federal government employee. -- Paul Graham