From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Luis Gerhorst Newsgroups: gmane.emacs.bugs Subject: bug#32129: 26.1; Bug in add-dir-local-variable when used with eval, progn and setenv Date: Thu, 12 Jul 2018 01:07:17 +0200 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1531350367 24225 195.159.176.226 (11 Jul 2018 23:06:07 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 11 Jul 2018 23:06:07 +0000 (UTC) User-Agent: mu4e 1.0; emacs 26.1 To: 32129@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jul 12 01:06:03 2018 Return-path: Envelope-to: geb-bug-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 1fdOBO-0006Dt-KZ for geb-bug-gnu-emacs@m.gmane.org; Thu, 12 Jul 2018 01:06:02 +0200 Original-Received: from localhost ([::1]:55746 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fdODV-0002ej-PL for geb-bug-gnu-emacs@m.gmane.org; Wed, 11 Jul 2018 19:08:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60069) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fdODO-0002eY-Jv for bug-gnu-emacs@gnu.org; Wed, 11 Jul 2018 19:08:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fdODK-00064V-Ga for bug-gnu-emacs@gnu.org; Wed, 11 Jul 2018 19:08:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:48160) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fdODK-00063b-1T for bug-gnu-emacs@gnu.org; Wed, 11 Jul 2018 19:08:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fdODJ-0000QH-Pl for bug-gnu-emacs@gnu.org; Wed, 11 Jul 2018 19:08:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Luis Gerhorst Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 11 Jul 2018 23:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 32129 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.15313504561591 (code B ref -1); Wed, 11 Jul 2018 23:08:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 11 Jul 2018 23:07:36 +0000 Original-Received: from localhost ([127.0.0.1]:56057 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fdOCu-0000Pa-5l for submit@debbugs.gnu.org; Wed, 11 Jul 2018 19:07:36 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:40645) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fdOCs-0000PO-KI for submit@debbugs.gnu.org; Wed, 11 Jul 2018 19:07:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fdOCm-0005lU-Hy for submit@debbugs.gnu.org; Wed, 11 Jul 2018 19:07:29 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:56629) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fdOCm-0005lQ-EA for submit@debbugs.gnu.org; Wed, 11 Jul 2018 19:07:28 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59845) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fdOCl-0002dp-Cn for bug-gnu-emacs@gnu.org; Wed, 11 Jul 2018 19:07:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fdOCh-0005jA-BF for bug-gnu-emacs@gnu.org; Wed, 11 Jul 2018 19:07:27 -0400 Original-Received: from out4-smtp.messagingengine.com ([66.111.4.28]:59667) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fdOCh-0005iq-1h for bug-gnu-emacs@gnu.org; Wed, 11 Jul 2018 19:07:23 -0400 Original-Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 4C39521B20 for ; Wed, 11 Jul 2018 19:07:21 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Wed, 11 Jul 2018 19:07:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=luisgerhorst.de; h=content-type:date:from:message-id:mime-version:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=mesmtp; bh=Q0W9AkXxfdXtgj bPPY6hY11qgNoNOwbkep2h7cK44YA=; b=M7oY2cRAIHUXRuXdLxHK5EqYLIeBhD yGq6LqBL2tog49lp5RtdDEeCXYirHI8n3/luaGBvd+1WWarLOmhMfoHOUeNOhe/i S9FTQAOuWuFstSBvLhSbNLxafQKIYXdGg3NSQhBUTQ0O9OnLp86i1ZVoWzUdQUjL 4u/afpfrxRHt0= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=Q0W9AkXxfdXtgjbPPY6hY11qgNoNOwbkep2h7cK44YA=; b=hPJZAa8R 4B0tkLkTA14irM7fXgSiOI49lP6hd9TvpMjRyqP/hP8jblh7/TIjItlMLGWIdrKv ksxZUHjhY57ZVzKUP4CsJWqY1ZKAizPRcW2Re0qy4XUCaJxRS6UwqscCYgjAYaxx n2I9svOSttDXT42XP7INemgadbV0OcwwR0UjLP5A0sn1fWJdTQDnVRkk4meIgpwI sp78SUi6doO8310FbZO0pmg+c71r3+VB9oRkp3Ru2BCAWSwB51EQ1gOSynFgjcYy 249kX+slu8VgioJurG/0rcttfRZQFAj60ucvO5UZ6JirDPMFszHUM8z/VZ9c9urU +v1SONDcCisjfA== X-ME-Proxy: X-ME-Sender: Original-Received: from luis-imac.fritz.box (p4fd7bb07.dip0.t-ipconnect.de [79.215.187.7]) by mail.messagingengine.com (Postfix) with ESMTPA id 8628D10268 for ; Wed, 11 Jul 2018 19:07:20 -0400 (EDT) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:148456 Archived-At: (1) Open Emacs with emacs -Q (2) Type the following code into *scratch* (add-dir-local-variable 'c-mode 'eval '(progn (make-local-variable 'process-environment) (setq process-environment (copy-sequence process-environment)) (setenv "TEST" "hello"))) (3) M-x eval-buffer Expected .dir-locals.el contents: ((c-mode (eval . (progn (make-local-variable 'process-environment) (setq process-environment (copy-sequence process-environment)) (setenv "TEST" "hello"))))) Actual contents: ((c-mode (eval progn (make-local-variable 'process-environment) (setq process-environment (copy-sequence process-environment)) (setenv "TEST" "hello")))) When I open a C file and inspect process-environment, TEST is not set. When I manually create a .dir-locals.el with the expected contents, it works. Please correct me if I'm using add-dir-local-variable wrong, I was not able to find a version that works as expected with the above progn. Strangely, if I use (progn (message "hello")), instead of the progn with setenv, "hello" gets printed every time I open a C file. Configured using: 'configure --prefix=/home/cip/2016/un65esoq/local' Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 THREADS LCMS2 Important settings: value of $LC_ALL: en_US.UTF-8 value of $LC_CTYPE: C.UTF-8 value of $LC_MESSAGES: C.UTF-8 value of $LC_MONETARY: de_DE.UTF-8 value of $LC_NUMERIC: de_DE.UTF-8 value of $LC_TIME: de_DE.UTF-8 value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix