From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: dir-locals.el process-environment Date: Wed, 28 Feb 2018 18:37:20 +0200 Message-ID: <838tbdyssf.fsf@gnu.org> References: <4e91a74757fbe232c3a91ed3104013d0@openmail.cc> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1519835741 10567 195.159.176.226 (28 Feb 2018 16:35:41 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 28 Feb 2018 16:35:41 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Feb 28 17:35:37 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1er4hZ-0002Kh-RD for geh-help-gnu-emacs@m.gmane.org; Wed, 28 Feb 2018 17:35:33 +0100 Original-Received: from localhost ([::1]:45472 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1er4jc-00076M-Bn for geh-help-gnu-emacs@m.gmane.org; Wed, 28 Feb 2018 11:37:40 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43667) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1er4jD-000769-NM for help-gnu-emacs@gnu.org; Wed, 28 Feb 2018 11:37:17 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1er4jA-0001LK-K5 for help-gnu-emacs@gnu.org; Wed, 28 Feb 2018 11:37:15 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:60431) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1er4jA-0001LD-GT for help-gnu-emacs@gnu.org; Wed, 28 Feb 2018 11:37:12 -0500 Original-Received: from [176.228.60.248] (port=3487 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1er4jA-0003mj-1l for help-gnu-emacs@gnu.org; Wed, 28 Feb 2018 11:37:12 -0500 In-reply-to: <4e91a74757fbe232c3a91ed3104013d0@openmail.cc> (edgar@openmail.cc) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:116096 Archived-At: > Date: Wed, 28 Feb 2018 05:47:57 +0000 > From: edgar@openmail.cc > Cc: eliz@gnu.org > > >> However, if I printf "$CC" I get nothing. How can I achieve this? > > > > What exactly do you do to 'printf "$CC"'? > > Thanks for your reply, Eli! I'm sorry that I was not clear. This is how > I do it: > > ┌──── emacs-lisp > │ ( > │ ("src" ;https://stackoverflow.com/a/19521152 > │ . ((c++-mode > ;https://www.gnu.org/software/emacs/manual/html_node/emacs/Directory-Variables.html > │ . > │ ((eval ;https://emacs.stackexchange.com/a/35965 > │ . (progn > │ (make-local-variable 'process-environment) > │ (setq process-environment > │ (copy-sequence process-environment)) > │ (setenv "CC" "mpicc"))) > │ (compile-command . "printf x$CC")))))) > └──── So you are saying that in some buffer that visits a file from that directory, you verified that compile-command's value is "printf x$CC", but running "M-x compile RET" from that same buffer produces an empty result?